diff --git a/src-ui/angular.json b/src-ui/angular.json index c93770860..4c7fb6c12 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -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": { diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index 52dccaf02..6a3c3f724 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -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 = () => { diff --git a/src-ui/src/app/services/settings.service.ts b/src-ui/src/app/services/settings.service.ts index 9e1b3e360..80e3b3474 100644 --- a/src-ui/src/app/services/settings.service.ts +++ b/src-ui/src/app/services/settings.service.ts @@ -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 = { diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts index 484a77c82..e787faf75 100644 --- a/src-ui/src/main.ts +++ b/src-ui/src/main.ts @@ -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 () => { diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 6a5e98f46..bf10496e3 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -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")]