Add Chinese Traditional translation

This commit is contained in:
LokiHung 2025-02-11 21:25:05 +08:00
parent ea94626b82
commit d56bfbf02b
5 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,8 @@
"sv-SE": "src/locale/messages.sv_SE.xlf",
"tr-TR": "src/locale/messages.tr_TR.xlf",
"uk-UA": "src/locale/messages.uk_UA.xlf",
"zh-CN": "src/locale/messages.zh_CN.xlf"
"zh-CN": "src/locale/messages.zh_CN.xlf",
"zh-TW": "src/locale/messages.zh_TW.xlf"
}
},
"architect": {

View File

@ -40,6 +40,7 @@ import localeSv from '@angular/common/locales/sv'
import localeTr from '@angular/common/locales/tr'
import localeUk from '@angular/common/locales/uk'
import localeZh from '@angular/common/locales/zh'
import localeZhTw from '@angular/common/locales/zh-TW'
registerLocaleData(localeAf)
registerLocaleData(localeAr)
@ -73,6 +74,7 @@ registerLocaleData(localeSv)
registerLocaleData(localeTr)
registerLocaleData(localeUk)
registerLocaleData(localeZh)
registerLocaleData(localeZhTw)
/* global mocks for jsdom */
const mock = () => {

View File

@ -244,6 +244,12 @@ const LANGUAGE_OPTIONS = [
englishName: 'Chinese Simplified',
dateInputFormat: 'yyyy-mm-dd',
},
{
code: 'zh-tw',
name: $localize`Chinese Traditional`,
englishName: 'Chinese Traditional',
dateInputFormat: 'yyyy/mm/dd',
},
]
const ISO_LANGUAGE_OPTION: LanguageOption = {

View File

@ -181,6 +181,7 @@ import localeSv from '@angular/common/locales/sv'
import localeTr from '@angular/common/locales/tr'
import localeUk from '@angular/common/locales/uk'
import localeZh from '@angular/common/locales/zh'
import localeZhTw from '@angular/common/locales/zh-TW'
import { CorrespondentNamePipe } from './app/pipes/correspondent-name.pipe'
import { DocumentTypeNamePipe } from './app/pipes/document-type-name.pipe'
import { StoragePathNamePipe } from './app/pipes/storage-path-name.pipe'
@ -217,6 +218,7 @@ registerLocaleData(localeSv)
registerLocaleData(localeTr)
registerLocaleData(localeUk)
registerLocaleData(localeZh)
registerLocaleData(localeZhTw)
function initializeApp(settings: SettingsService) {
return () => {

View File

@ -749,6 +749,7 @@ LANGUAGES = [
("tr-tr", _("Turkish")),
("uk-ua", _("Ukrainian")),
("zh-cn", _("Chinese Simplified")),
("zh-tw", _("Chinese Traditional")),
]
LOCALE_PATHS = [os.path.join(BASE_DIR, "locale")]