Add Ukrainian localization (#2336)
parent
1f38e9b197
commit
401b3401c7
|
@ -1,6 +1,6 @@
|
||||||
/** @type {import('@lingui/conf').LinguiConfig} */
|
/** @type {import('@lingui/conf').LinguiConfig} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
locales: ['en', 'hi', 'ja', 'fr', 'de', 'es', 'ko', 'es', 'pt-BR'],
|
locales: ['en', 'hi', 'ja', 'fr', 'de', 'es', 'ko', 'es', 'pt-BR', 'uk'],
|
||||||
catalogs: [
|
catalogs: [
|
||||||
{
|
{
|
||||||
path: '<rootDir>/src/locale/locales/{locale}/messages',
|
path: '<rootDir>/src/locale/locales/{locale}/messages',
|
||||||
|
|
|
@ -126,6 +126,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
||||||
return AppLanguage.ko
|
return AppLanguage.ko
|
||||||
case 'pt-BR':
|
case 'pt-BR':
|
||||||
return AppLanguage.pt_BR
|
return AppLanguage.pt_BR
|
||||||
|
case 'uk':
|
||||||
|
return AppLanguage.uk
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {messages as messagesHi} from '#/locale/locales/hi/messages'
|
||||||
import {messages as messagesJa} from '#/locale/locales/ja/messages'
|
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 {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
||||||
import {AppLanguage} from '#/locale/languages'
|
import {AppLanguage} from '#/locale/languages'
|
||||||
|
@ -49,6 +50,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
||||||
i18n.loadAndActivate({locale, messages: messagesPt_BR})
|
i18n.loadAndActivate({locale, messages: messagesPt_BR})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case AppLanguage.uk: {
|
||||||
|
i18n.loadAndActivate({locale, messages: messagesUk})
|
||||||
|
break
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
i18n.loadAndActivate({locale, messages: messagesEn})
|
i18n.loadAndActivate({locale, messages: messagesEn})
|
||||||
break
|
break
|
||||||
|
|
|
@ -41,6 +41,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
||||||
mod = await import(`./locales/pt-BR/messages`)
|
mod = await import(`./locales/pt-BR/messages`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case AppLanguage.uk: {
|
||||||
|
mod = await import(`./locales/uk/messages`)
|
||||||
|
break
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
mod = await import(`./locales/en/messages`)
|
mod = await import(`./locales/en/messages`)
|
||||||
break
|
break
|
||||||
|
|
|
@ -14,6 +14,7 @@ export enum AppLanguage {
|
||||||
ja = 'ja',
|
ja = 'ja',
|
||||||
ko = 'ko',
|
ko = 'ko',
|
||||||
pt_BR = 'pt-BR',
|
pt_BR = 'pt-BR',
|
||||||
|
uk = 'uk',
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AppLanguageConfig {
|
interface AppLanguageConfig {
|
||||||
|
@ -31,6 +32,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
||||||
{code2: AppLanguage.ja, name: '日本語'},
|
{code2: AppLanguage.ja, name: '日本語'},
|
||||||
{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: 'Українська'},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const LANGUAGES: Language[] = [
|
export const LANGUAGES: Language[] = [
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue