Chinese localization (#2668)
* Chinese localization * fixed languages.ts typo * crosscheck with proofreading of translation * fixed messages.po string styles * a minor adjustment * Update Chinese localization * fixed a typo & modify the translation of handle * based on the latest messages.po translation * removed unused strings * based on the latest messages.po translationzio/stable
parent
0b37cf4ee7
commit
a5cd1d377f
|
@ -12,6 +12,7 @@ module.exports = {
|
||||||
'pt-BR',
|
'pt-BR',
|
||||||
'uk',
|
'uk',
|
||||||
'ca',
|
'ca',
|
||||||
|
'zh-CN',
|
||||||
],
|
],
|
||||||
catalogs: [
|
catalogs: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,6 +138,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
||||||
return AppLanguage.uk
|
return AppLanguage.uk
|
||||||
case 'ca':
|
case 'ca':
|
||||||
return AppLanguage.ca
|
return AppLanguage.ca
|
||||||
|
case 'zh-CN':
|
||||||
|
return AppLanguage.zh_CN
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ 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 {messages as messagesCa} from '#/locale/locales/ca/messages'
|
||||||
|
import {messages as messagesZh_CN} from '#/locale/locales/zh-CN/messages'
|
||||||
|
|
||||||
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
||||||
import {AppLanguage} from '#/locale/languages'
|
import {AppLanguage} from '#/locale/languages'
|
||||||
|
@ -62,6 +63,9 @@ export async function dynamicActivate(locale: AppLanguage) {
|
||||||
i18n.loadAndActivate({locale, messages: messagesCa})
|
i18n.loadAndActivate({locale, messages: messagesCa})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case AppLanguage.zh_CN: {
|
||||||
|
i18n.loadAndActivate({locale, messages: messagesZh_CN})
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
i18n.loadAndActivate({locale, messages: messagesEn})
|
i18n.loadAndActivate({locale, messages: messagesEn})
|
||||||
break
|
break
|
||||||
|
|
|
@ -52,6 +52,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
||||||
mod = await import(`./locales/ca/messages`)
|
mod = await import(`./locales/ca/messages`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case AppLanguage.zh_CN: {
|
||||||
|
mod = await import(`./locales/zh-CN/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 {
|
||||||
pt_BR = 'pt-BR',
|
pt_BR = 'pt-BR',
|
||||||
uk = 'uk',
|
uk = 'uk',
|
||||||
ca = 'ca',
|
ca = 'ca',
|
||||||
|
zh_CN = 'zh-CN',
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AppLanguageConfig {
|
interface AppLanguageConfig {
|
||||||
|
@ -35,6 +36,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
||||||
{code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'},
|
{code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'},
|
||||||
{code2: AppLanguage.uk, name: 'Українська – Ukrainian'},
|
{code2: AppLanguage.uk, name: 'Українська – Ukrainian'},
|
||||||
{code2: AppLanguage.ca, name: 'Català – Catalan'},
|
{code2: AppLanguage.ca, name: 'Català – Catalan'},
|
||||||
|
{code2: AppLanguage.zh_CN, name: '简体中文(中国) – Chinese (Simplified)'},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const LANGUAGES: Language[] = [
|
export const LANGUAGES: Language[] = [
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue