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