From 323557ccc7187e96474b6ddd3e3a2cdb19c42842 Mon Sep 17 00:00:00 2001 From: watchakorn-18k <74919942+watchakorn-18k@users.noreply.github.com> Date: Thu, 23 Mar 2023 13:38:37 +0700 Subject: [PATCH 1/4] Add thai language i18n --- src/node/i18n/index.ts | 5 ++++- src/node/i18n/locales/th.json | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/node/i18n/locales/th.json diff --git a/src/node/i18n/index.ts b/src/node/i18n/index.ts index b3b280b4da96..cbc411f0da2a 100644 --- a/src/node/i18n/index.ts +++ b/src/node/i18n/index.ts @@ -1,7 +1,7 @@ import i18next, { init } from "i18next" import * as en from "./locales/en.json" import * as zhCn from "./locales/zh-cn.json" - +import * as th from "./locales/th.json" init({ lng: "en", fallbackLng: "en", // language to use if translations in user language are not available. @@ -15,6 +15,9 @@ init({ "zh-cn": { translation: zhCn, }, + "th": { + translation: th, + }, }, }) diff --git a/src/node/i18n/locales/th.json b/src/node/i18n/locales/th.json new file mode 100644 index 000000000000..ab359f48b49c --- /dev/null +++ b/src/node/i18n/locales/th.json @@ -0,0 +1,13 @@ +{ + "LOGIN_TITLE": "เข้าสู่ระบบ {{app}}", + "LOGIN_BELOW": "กรุณาเข้าสู่ระบบด้านล่าง", + "WELCOME": "ยินดีต้อนรับสู่ {{app}}", + "LOGIN_PASSWORD": "ตรวจสอบไฟล์กำหนดค่าที่ {{configFile}} เพื่อดูรหัสผ่าน", + "LOGIN_USING_ENV_PASSWORD": "รหัสผ่านถูกกำหนดเป็น $PASSWORD", + "LOGIN_USING_HASHED_PASSWORD": "รรหัสผ่านถูกกำหนดเป็น $HASHED_PASSWORD", + "SUBMIT": "ส่ง", + "PASSWORD_PLACEHOLDER": "รหัสผ่าน", + "LOGIN_RATE_LIMIT": "ถึงขีดจำกัดอัตราการเข้าสู่ระบบ!", + "MISS_PASSWORD": "รหัสผ่านหายไป", + "INCORRECT_PASSWORD": "รหัสผ่านไม่ถูกต้อง" +} From 216682a4c416d86ce55a7d82b78ada8b7dfcbbeb Mon Sep 17 00:00:00 2001 From: watchakorn-18k <74919942+watchakorn-18k@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:36:24 +0700 Subject: [PATCH 2/4] format Prettier --- src/node/i18n/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node/i18n/index.ts b/src/node/i18n/index.ts index cbc411f0da2a..c1aef0772a8b 100644 --- a/src/node/i18n/index.ts +++ b/src/node/i18n/index.ts @@ -1,7 +1,7 @@ -import i18next, { init } from "i18next" -import * as en from "./locales/en.json" -import * as zhCn from "./locales/zh-cn.json" -import * as th from "./locales/th.json" +import i18next, { init } from "i18next"; +import * as en from "./locales/en.json"; +import * as zhCn from "./locales/zh-cn.json"; +import * as th from "./locales/th.json"; init({ lng: "en", fallbackLng: "en", // language to use if translations in user language are not available. @@ -15,10 +15,10 @@ init({ "zh-cn": { translation: zhCn, }, - "th": { + th: { translation: th, }, }, -}) +}); -export default i18next +export default i18next; From f81d820eff033322aea5d4cc9354f967d6af49db Mon Sep 17 00:00:00 2001 From: watchakorn-18k <74919942+watchakorn-18k@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:37:53 +0700 Subject: [PATCH 3/4] format Prettier --- src/node/i18n/locales/th.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node/i18n/locales/th.json b/src/node/i18n/locales/th.json index ab359f48b49c..e5cd2cf14722 100644 --- a/src/node/i18n/locales/th.json +++ b/src/node/i18n/locales/th.json @@ -3,11 +3,11 @@ "LOGIN_BELOW": "กรุณาเข้าสู่ระบบด้านล่าง", "WELCOME": "ยินดีต้อนรับสู่ {{app}}", "LOGIN_PASSWORD": "ตรวจสอบไฟล์กำหนดค่าที่ {{configFile}} เพื่อดูรหัสผ่าน", - "LOGIN_USING_ENV_PASSWORD": "รหัสผ่านถูกกำหนดเป็น $PASSWORD", - "LOGIN_USING_HASHED_PASSWORD": "รรหัสผ่านถูกกำหนดเป็น $HASHED_PASSWORD", - "SUBMIT": "ส่ง", - "PASSWORD_PLACEHOLDER": "รหัสผ่าน", - "LOGIN_RATE_LIMIT": "ถึงขีดจำกัดอัตราการเข้าสู่ระบบ!", - "MISS_PASSWORD": "รหัสผ่านหายไป", - "INCORRECT_PASSWORD": "รหัสผ่านไม่ถูกต้อง" + "LOGIN_USING_ENV_PASSWORD": "รหัสผ่านถูกกำหนดเป็น $PASSWORD", + "LOGIN_USING_HASHED_PASSWORD": "รรหัสผ่านถูกกำหนดเป็น $HASHED_PASSWORD", + "SUBMIT": "ส่ง", + "PASSWORD_PLACEHOLDER": "รหัสผ่าน", + "LOGIN_RATE_LIMIT": "ถึงขีดจำกัดอัตราการเข้าสู่ระบบ!", + "MISS_PASSWORD": "รหัสผ่านหายไป", + "INCORRECT_PASSWORD": "รหัสผ่านไม่ถูกต้อง" } From 5d240c418abc98b29a6ae9e5239603b0c9587d7e Mon Sep 17 00:00:00 2001 From: watchakorn-18k <74919942+watchakorn-18k@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:39:16 +0700 Subject: [PATCH 4/4] Fix format prettier again --- src/node/i18n/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node/i18n/index.ts b/src/node/i18n/index.ts index c1aef0772a8b..2bd7b18e90a9 100644 --- a/src/node/i18n/index.ts +++ b/src/node/i18n/index.ts @@ -1,7 +1,7 @@ -import i18next, { init } from "i18next"; -import * as en from "./locales/en.json"; -import * as zhCn from "./locales/zh-cn.json"; -import * as th from "./locales/th.json"; +import i18next, { init } from "i18next" +import * as en from "./locales/en.json" +import * as zhCn from "./locales/zh-cn.json" +import * as th from "./locales/th.json" init({ lng: "en", fallbackLng: "en", // language to use if translations in user language are not available. @@ -19,6 +19,6 @@ init({ translation: th, }, }, -}); +}) -export default i18next; +export default i18next