From 6cf732e6ec4fcba03b861e0d2b5657fc94551851 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 3 Feb 2024 11:37:21 -0800
Subject: [PATCH] Add Japanese translation (#5641)
---
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 | 34 +++++++++-------
src/paperless/settings.py | 1 +
7 files changed, 57 insertions(+), 34 deletions(-)
diff --git a/src-ui/angular.json b/src-ui/angular.json
index ad328c072..92f15d769 100644
--- a/src-ui/angular.json
+++ b/src-ui/angular.json
@@ -31,6 +31,7 @@
"fr-FR": "src/locale/messages.fr_FR.xlf",
"hu-HU": "src/locale/messages.hu_HU.xlf",
"it-IT": "src/locale/messages.it_IT.xlf",
+ "ja-JP": "src/locale/messages.ja_JP.xlf",
"lb-LU": "src/locale/messages.lb_LU.xlf",
"nl-NL": "src/locale/messages.nl_NL.xlf",
"no-NO": "src/locale/messages.no_NO.xlf",
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 3bf02bf6c..9f163e3b8 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -7057,137 +7057,144 @@
130
+
+ Japanese
+
+ src/app/services/settings.service.ts
+ 136
+
+
Luxembourgish
src/app/services/settings.service.ts
- 136
+ 142
Dutch
src/app/services/settings.service.ts
- 142
+ 148
Norwegian
src/app/services/settings.service.ts
- 148
+ 154
Polish
src/app/services/settings.service.ts
- 154
+ 160
Portuguese (Brazil)
src/app/services/settings.service.ts
- 160
+ 166
Portuguese
src/app/services/settings.service.ts
- 166
+ 172
Romanian
src/app/services/settings.service.ts
- 172
+ 178
Russian
src/app/services/settings.service.ts
- 178
+ 184
Slovak
src/app/services/settings.service.ts
- 184
+ 190
Slovenian
src/app/services/settings.service.ts
- 190
+ 196
Serbian
src/app/services/settings.service.ts
- 196
+ 202
Swedish
src/app/services/settings.service.ts
- 202
+ 208
Turkish
src/app/services/settings.service.ts
- 208
+ 214
Ukrainian
src/app/services/settings.service.ts
- 214
+ 220
Chinese Simplified
src/app/services/settings.service.ts
- 220
+ 226
ISO 8601
src/app/services/settings.service.ts
- 228
+ 234
Successfully completed one-time migratration of settings to the database!
src/app/services/settings.service.ts
- 471
+ 477
Unable to migrate settings to the database, please try saving manually.
src/app/services/settings.service.ts
- 472
+ 478
You can restart the tour from the settings page.
src/app/services/settings.service.ts
- 542
+ 548
diff --git a/src-ui/setup-jest.ts b/src-ui/setup-jest.ts
index 494d90d39..f2767ebf0 100644
--- a/src-ui/setup-jest.ts
+++ b/src-ui/setup-jest.ts
@@ -23,6 +23,7 @@ import localeFi from '@angular/common/locales/fi'
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 localeLb from '@angular/common/locales/lb'
import localeNl from '@angular/common/locales/nl'
import localeNo from '@angular/common/locales/no'
@@ -53,6 +54,7 @@ registerLocaleData(localeFi)
registerLocaleData(localeFr)
registerLocaleData(localeHu)
registerLocaleData(localeIt)
+registerLocaleData(localeJa)
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 6d39bfecf..a20a69eb8 100644
--- a/src-ui/src/app/app.module.ts
+++ b/src-ui/src/app/app.module.ts
@@ -295,6 +295,7 @@ import localeFi from '@angular/common/locales/fi'
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 localeLb from '@angular/common/locales/lb'
import localeNl from '@angular/common/locales/nl'
import localeNo from '@angular/common/locales/no'
@@ -325,6 +326,7 @@ registerLocaleData(localeFi)
registerLocaleData(localeFr)
registerLocaleData(localeHu)
registerLocaleData(localeIt)
+registerLocaleData(localeJa)
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 4bbeb1dde..67804fa12 100644
--- a/src-ui/src/app/services/settings.service.ts
+++ b/src-ui/src/app/services/settings.service.ts
@@ -131,6 +131,12 @@ const LANGUAGE_OPTIONS = [
englishName: 'Italian',
dateInputFormat: 'dd/mm/yyyy',
},
+ {
+ code: 'ja-jp',
+ name: $localize`Japanese`,
+ englishName: 'Japanese',
+ 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 83398f10c..0c7242462 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-02-02 20:15-0800\n"
+"POT-Creation-Date: 2024-02-02 20:17-0800\n"
"PO-Revision-Date: 2022-02-17 04:17\n"
"Last-Translator: \n"
"Language-Team: English\n"
@@ -1153,62 +1153,66 @@ msgid "Italian"
msgstr ""
#: paperless/settings.py:633
-msgid "Luxembourgish"
+msgid "Japanese"
msgstr ""
#: paperless/settings.py:634
-msgid "Norwegian"
+msgid "Luxembourgish"
msgstr ""
#: paperless/settings.py:635
-msgid "Dutch"
+msgid "Norwegian"
msgstr ""
#: paperless/settings.py:636
-msgid "Polish"
+msgid "Dutch"
msgstr ""
#: paperless/settings.py:637
-msgid "Portuguese (Brazil)"
+msgid "Polish"
msgstr ""
#: paperless/settings.py:638
-msgid "Portuguese"
+msgid "Portuguese (Brazil)"
msgstr ""
#: paperless/settings.py:639
-msgid "Romanian"
+msgid "Portuguese"
msgstr ""
#: paperless/settings.py:640
-msgid "Russian"
+msgid "Romanian"
msgstr ""
#: paperless/settings.py:641
-msgid "Slovak"
+msgid "Russian"
msgstr ""
#: paperless/settings.py:642
-msgid "Slovenian"
+msgid "Slovak"
msgstr ""
#: paperless/settings.py:643
-msgid "Serbian"
+msgid "Slovenian"
msgstr ""
#: paperless/settings.py:644
-msgid "Swedish"
+msgid "Serbian"
msgstr ""
#: paperless/settings.py:645
-msgid "Turkish"
+msgid "Swedish"
msgstr ""
#: paperless/settings.py:646
-msgid "Ukrainian"
+msgid "Turkish"
msgstr ""
#: paperless/settings.py:647
+msgid "Ukrainian"
+msgstr ""
+
+#: paperless/settings.py:648
msgid "Chinese Simplified"
msgstr ""
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
index c9d5848c0..17ec2765d 100644
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -630,6 +630,7 @@ LANGUAGES = [
("fr-fr", _("French")),
("hu-hu", _("Hungarian")),
("it-it", _("Italian")),
+ ("ja-jp", _("Japanese")),
("lb-lu", _("Luxembourgish")),
("no-no", _("Norwegian")),
("nl-nl", _("Dutch")),