Add zh-TW localization (#2781)
* add zh-TW localization * fix typo * fix languages.ts * improve translation * improve translation * 部分翻譯修正 - 使用全形標點符號 - 將部分簡體字修正為正體字 - 更改部分用語 * fix incorrectly commented strings * small fix and suggestion * update translation team * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify the translation based on the review suggestions * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: noeFly <jeffyang0123@gmail.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * modify translation by review * minor fixes * minor fixes * Update messages.po * translate new strings * fix typo * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update src/locale/locales/zh-TW/messages.po Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com> * Update messages.po * Update messages.po * Update messages.po * Update messages.po * fixed typo * Update messages.po * correct translation * Update messages.po * modify translation by review * Update messages.po * Update messages.po --------- Co-authored-by: noeFly <jeffyang0123@gmail.com> Co-authored-by: Kuwa Lee <kuwalee1069@gmail.com> Co-authored-by: Yuki Cheung <13027432+snowleo208@users.noreply.github.com> Co-authored-by: Howard Guo <50100922+toto6038@users.noreply.github.com>zio/stable
parent
75d6535402
commit
b76bf9484d
|
@ -14,6 +14,7 @@ module.exports = {
|
|||
'uk',
|
||||
'ca',
|
||||
'zh-CN',
|
||||
'zh-TW',
|
||||
'it',
|
||||
],
|
||||
catalogs: [
|
||||
|
|
|
@ -142,6 +142,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
|||
return AppLanguage.ca
|
||||
case 'zh-CN':
|
||||
return AppLanguage.zh_CN
|
||||
case 'zh-TW':
|
||||
return AppLanguage.zh_TW
|
||||
case 'it':
|
||||
return AppLanguage.it
|
||||
default:
|
||||
|
|
|
@ -15,6 +15,7 @@ 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 {messages as messagesZh_TW} from '#/locale/locales/zh-TW/messages'
|
||||
import {messages as messagesIt} from '#/locale/locales/it/messages'
|
||||
|
||||
import {sanitizeAppLanguageSetting} from '#/locale/helpers'
|
||||
|
@ -77,6 +78,9 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
i18n.loadAndActivate({locale, messages: messagesIt})
|
||||
break
|
||||
}
|
||||
case AppLanguage.zh_TW: {
|
||||
i18n.loadAndActivate({locale, messages: messagesZh_TW})
|
||||
}
|
||||
default: {
|
||||
i18n.loadAndActivate({locale, messages: messagesEn})
|
||||
break
|
||||
|
|
|
@ -60,6 +60,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||
mod = await import(`./locales/zh-CN/messages`)
|
||||
break
|
||||
}
|
||||
case AppLanguage.zh_TW: {
|
||||
mod = await import(`./locales/zh-TW/messages`)
|
||||
break
|
||||
}
|
||||
case AppLanguage.it: {
|
||||
mod = await import(`./locales/it/messages`)
|
||||
break
|
||||
|
|
|
@ -18,6 +18,7 @@ export enum AppLanguage {
|
|||
uk = 'uk',
|
||||
ca = 'ca',
|
||||
zh_CN = 'zh-CN',
|
||||
zh_TW = 'zh-TW',
|
||||
it = 'it',
|
||||
}
|
||||
|
||||
|
@ -40,6 +41,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
|||
{code2: AppLanguage.uk, name: 'Українська – Ukrainian'},
|
||||
{code2: AppLanguage.ca, name: 'Català – Catalan'},
|
||||
{code2: AppLanguage.zh_CN, name: '简体中文(中国) – Chinese (Simplified)'},
|
||||
{code2: AppLanguage.zh_TW, name: '繁體中文(臺灣) – Chinese (Traditional)'},
|
||||
{code2: AppLanguage.it, name: 'Italiano - Italian'},
|
||||
]
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue