From dad3a1ff28992891688810186dd4df051c4385b8 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:10:23 -0700 Subject: [PATCH] Feature: add Korean language (#7573) --- src-ui/angular.json | 1 + src-ui/messages.xlf | 45 ++++++++++++--------- src-ui/setup-jest.ts | 2 + src-ui/src/app/app.module.ts | 2 + src-ui/src/app/services/settings.service.ts | 6 +++ src/locale/en_US/LC_MESSAGES/django.po | 42 ++++++++++--------- src/paperless/settings.py | 1 + 7 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src-ui/angular.json b/src-ui/angular.json index a1bb47f1a..90a54e133 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -33,6 +33,7 @@ "it-IT": "src/locale/messages.it_IT.xlf", "ja-JP": "src/locale/messages.ja_JP.xlf", "lb-LU": "src/locale/messages.lb_LU.xlf", + "ko-KR": "src/locale/messages.ko_KR.xlf", "nl-NL": "src/locale/messages.nl_NL.xlf", "no-NO": "src/locale/messages.no_NO.xlf", "pl-PL": "src/locale/messages.pl_PL.xlf", diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 75f585b76..71cda881d 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -8602,137 +8602,144 @@ 142 + + Korean + + src/app/services/settings.service.ts + 148 + + Luxembourgish src/app/services/settings.service.ts - 148 + 154 Dutch src/app/services/settings.service.ts - 154 + 160 Norwegian src/app/services/settings.service.ts - 160 + 166 Polish src/app/services/settings.service.ts - 166 + 172 Portuguese (Brazil) src/app/services/settings.service.ts - 172 + 178 Portuguese src/app/services/settings.service.ts - 178 + 184 Romanian src/app/services/settings.service.ts - 184 + 190 Russian src/app/services/settings.service.ts - 190 + 196 Slovak src/app/services/settings.service.ts - 196 + 202 Slovenian src/app/services/settings.service.ts - 202 + 208 Serbian src/app/services/settings.service.ts - 208 + 214 Swedish src/app/services/settings.service.ts - 214 + 220 Turkish src/app/services/settings.service.ts - 220 + 226 Ukrainian src/app/services/settings.service.ts - 226 + 232 Chinese Simplified src/app/services/settings.service.ts - 232 + 238 ISO 8601 src/app/services/settings.service.ts - 240 + 246 Successfully completed one-time migratration of settings to the database! src/app/services/settings.service.ts - 567 + 573 Unable to migrate settings to the database, please try saving manually. src/app/services/settings.service.ts - 568 + 574 You can restart the tour from the settings page. src/app/services/settings.service.ts - 638 + 644 diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts index 3486d17fc..f545e7295 100644 --- a/src-ui/setup-jest.ts +++ b/src-ui/setup-jest.ts @@ -24,6 +24,7 @@ import localeFr from '@angular/common/locales/fr' import localeHu from '@angular/common/locales/hu' import localeIt from '@angular/common/locales/it' import localeJa from '@angular/common/locales/ja' +import localeKo from '@angular/common/locales/ko' import localeLb from '@angular/common/locales/lb' import localeNl from '@angular/common/locales/nl' import localeNo from '@angular/common/locales/no' @@ -55,6 +56,7 @@ registerLocaleData(localeFr) registerLocaleData(localeHu) registerLocaleData(localeIt) registerLocaleData(localeJa) +registerLocaleData(localeKo) registerLocaleData(localeLb) registerLocaleData(localeNl) registerLocaleData(localeNo) diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 3c4edc085..005de5369 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -347,6 +347,7 @@ import localeFr from '@angular/common/locales/fr' import localeHu from '@angular/common/locales/hu' import localeIt from '@angular/common/locales/it' import localeJa from '@angular/common/locales/ja' +import localeKo from '@angular/common/locales/ko' import localeLb from '@angular/common/locales/lb' import localeNl from '@angular/common/locales/nl' import localeNo from '@angular/common/locales/no' @@ -378,6 +379,7 @@ registerLocaleData(localeFr) registerLocaleData(localeHu) registerLocaleData(localeIt) registerLocaleData(localeJa) +registerLocaleData(localeKo) registerLocaleData(localeLb) registerLocaleData(localeNl) registerLocaleData(localeNo) diff --git a/src-ui/src/app/services/settings.service.ts b/src-ui/src/app/services/settings.service.ts index 517098557..91d1cc320 100644 --- a/src-ui/src/app/services/settings.service.ts +++ b/src-ui/src/app/services/settings.service.ts @@ -143,6 +143,12 @@ const LANGUAGE_OPTIONS = [ englishName: 'Japanese', dateInputFormat: 'yyyy/mm/dd', }, + { + code: 'ko-kr', + name: $localize`Korean`, + englishName: 'Korean', + dateInputFormat: 'yyyy-mm-dd', + }, { code: 'lb-lu', name: $localize`Luxembourgish`, diff --git a/src/locale/en_US/LC_MESSAGES/django.po b/src/locale/en_US/LC_MESSAGES/django.po index 7eeb97d17..0c2f6dd4b 100644 --- a/src/locale/en_US/LC_MESSAGES/django.po +++ b/src/locale/en_US/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: paperless-ngx\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-19 23:29-0700\n" +"POT-Creation-Date: 2024-08-28 17:12-0700\n" "PO-Revision-Date: 2022-02-17 04:17\n" "Last-Translator: \n" "Language-Team: English\n" @@ -936,21 +936,21 @@ msgstr "" msgid "enabled" msgstr "" -#: documents/serialisers.py:119 +#: documents/serialisers.py:120 #, python-format msgid "Invalid regular expression: %(error)s" msgstr "" -#: documents/serialisers.py:435 +#: documents/serialisers.py:467 msgid "Invalid color." msgstr "" -#: documents/serialisers.py:1331 +#: documents/serialisers.py:1397 #, python-format msgid "File type %(type)s not supported" msgstr "" -#: documents/serialisers.py:1440 +#: documents/serialisers.py:1506 msgid "Invalid variable detected." msgstr "" @@ -1387,62 +1387,66 @@ msgid "Japanese" msgstr "" #: paperless/settings.py:699 -msgid "Luxembourgish" +msgid "Korean" msgstr "" #: paperless/settings.py:700 -msgid "Norwegian" +msgid "Luxembourgish" msgstr "" #: paperless/settings.py:701 -msgid "Dutch" +msgid "Norwegian" msgstr "" #: paperless/settings.py:702 -msgid "Polish" +msgid "Dutch" msgstr "" #: paperless/settings.py:703 -msgid "Portuguese (Brazil)" +msgid "Polish" msgstr "" #: paperless/settings.py:704 -msgid "Portuguese" +msgid "Portuguese (Brazil)" msgstr "" #: paperless/settings.py:705 -msgid "Romanian" +msgid "Portuguese" msgstr "" #: paperless/settings.py:706 -msgid "Russian" +msgid "Romanian" msgstr "" #: paperless/settings.py:707 -msgid "Slovak" +msgid "Russian" msgstr "" #: paperless/settings.py:708 -msgid "Slovenian" +msgid "Slovak" msgstr "" #: paperless/settings.py:709 -msgid "Serbian" +msgid "Slovenian" msgstr "" #: paperless/settings.py:710 -msgid "Swedish" +msgid "Serbian" msgstr "" #: paperless/settings.py:711 -msgid "Turkish" +msgid "Swedish" msgstr "" #: paperless/settings.py:712 -msgid "Ukrainian" +msgid "Turkish" msgstr "" #: paperless/settings.py:713 +msgid "Ukrainian" +msgstr "" + +#: paperless/settings.py:714 msgid "Chinese Simplified" msgstr "" diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 27c609e8d..ee6110732 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -696,6 +696,7 @@ LANGUAGES = [ ("hu-hu", _("Hungarian")), ("it-it", _("Italian")), ("ja-jp", _("Japanese")), + ("ko-kr", _("Korean")), ("lb-lu", _("Luxembourgish")), ("no-no", _("Norwegian")), ("nl-nl", _("Dutch")),