Add catalan
parent
0902b4ba41
commit
34c1aebda6
|
@ -1,6 +1,18 @@
|
|||
/** @type {import('@lingui/conf').LinguiConfig} */
|
||||
module.exports = {
|
||||
locales: ['en', 'de', 'es', 'fr', 'hi', 'id', 'ja', 'ko', 'pt-BR', 'uk'],
|
||||
locales: [
|
||||
'en',
|
||||
'de',
|
||||
'es',
|
||||
'fr',
|
||||
'hi',
|
||||
'id',
|
||||
'ja',
|
||||
'ko',
|
||||
'pt-BR',
|
||||
'uk',
|
||||
'ca',
|
||||
],
|
||||
catalogs: [
|
||||
{
|
||||
path: '<rootDir>/src/locale/locales/{locale}/messages',
|
||||
|
|
|
@ -137,6 +137,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
|||
return AppLanguage.pt_BR
|
||||
case 'uk':
|
||||
return AppLanguage.uk
|
||||
case 'ca':
|
||||
return AppLanguage.ca
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import {messages as messagesJa} from '#/locale/locales/ja/messages'
|
|||
import {messages as messagesKo} from '#/locale/locales/ko/messages'
|
||||
import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages'
|
||||
import {messages as messagesUk} from '#/locale/locales/uk/messages'
|
||||
import {messages as messagesCa} from '#/locale/locales/ca/messages'
|
||||
|
||||
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
||||
import {AppLanguage} from '#/locale/languages'
|
||||
|
@ -59,6 +60,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
i18n.loadAndActivate({locale, messages: messagesUk})
|
||||
break
|
||||
}
|
||||
case AppLanguage.ca: {
|
||||
i18n.loadAndActivate({locale, messages: messagesCa})
|
||||
break
|
||||
}
|
||||
default: {
|
||||
i18n.loadAndActivate({locale, messages: messagesEn})
|
||||
break
|
||||
|
|
|
@ -49,6 +49,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
mod = await import(`./locales/uk/messages`)
|
||||
break
|
||||
}
|
||||
case AppLanguage.ca: {
|
||||
mod = await import(`./locales/ca/messages`)
|
||||
break
|
||||
}
|
||||
default: {
|
||||
mod = await import(`./locales/en/messages`)
|
||||
break
|
||||
|
|
|
@ -16,6 +16,7 @@ export enum AppLanguage {
|
|||
ko = 'ko',
|
||||
pt_BR = 'pt-BR',
|
||||
uk = 'uk',
|
||||
ca = 'ca',
|
||||
}
|
||||
|
||||
interface AppLanguageConfig {
|
||||
|
@ -35,6 +36,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
|||
{code2: AppLanguage.ko, name: '한국어'},
|
||||
{code2: AppLanguage.pt_BR, name: 'Português (BR)'},
|
||||
{code2: AppLanguage.uk, name: 'Українська'},
|
||||
{code2: AppLanguage.ca, name: 'Catalan'},
|
||||
]
|
||||
|
||||
export const LANGUAGES: Language[] = [
|
||||
|
|
Loading…
Reference in New Issue