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',
|
||||
'uk',
|
||||
'ca',
|
||||
'zh-CN',
|
||||
],
|
||||
catalogs: [
|
||||
{
|
||||
|
|
|
@ -138,6 +138,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
|||
return AppLanguage.uk
|
||||
case 'ca':
|
||||
return AppLanguage.ca
|
||||
case 'zh-CN':
|
||||
return AppLanguage.zh_CN
|
||||
default:
|
||||
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 messagesUk} from '#/locale/locales/uk/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 {AppLanguage} from '#/locale/languages'
|
||||
|
@ -62,6 +63,9 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
i18n.loadAndActivate({locale, messages: messagesCa})
|
||||
break
|
||||
}
|
||||
case AppLanguage.zh_CN: {
|
||||
i18n.loadAndActivate({locale, messages: messagesZh_CN})
|
||||
}
|
||||
default: {
|
||||
i18n.loadAndActivate({locale, messages: messagesEn})
|
||||
break
|
||||
|
|
|
@ -52,6 +52,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
mod = await import(`./locales/ca/messages`)
|
||||
break
|
||||
}
|
||||
case AppLanguage.zh_CN: {
|
||||
mod = await import(`./locales/zh-CN/messages`)
|
||||
break
|
||||
}
|
||||
default: {
|
||||
mod = await import(`./locales/en/messages`)
|
||||
break
|
||||
|
|
|
@ -16,6 +16,7 @@ export enum AppLanguage {
|
|||
pt_BR = 'pt-BR',
|
||||
uk = 'uk',
|
||||
ca = 'ca',
|
||||
zh_CN = 'zh-CN',
|
||||
}
|
||||
|
||||
interface AppLanguageConfig {
|
||||
|
@ -35,6 +36,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
|||
{code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'},
|
||||
{code2: AppLanguage.uk, name: 'Українська – Ukrainian'},
|
||||
{code2: AppLanguage.ca, name: 'Català – Catalan'},
|
||||
{code2: AppLanguage.zh_CN, name: '简体中文(中国) – Chinese (Simplified)'},
|
||||
]
|
||||
|
||||
export const LANGUAGES: Language[] = [
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue