From 3364289034e5575e979f469ee4f1e7c51196f253 Mon Sep 17 00:00:00 2001 From: l2D <20911264+l2D@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:24:44 +0700 Subject: [PATCH] =?UTF-8?q?feat(i18n):=20add=20support=20for=20Thai=20(?= =?UTF-8?q?=E0=B9=84=E0=B8=97=E0=B8=A2)=20language=20(th)=20(#117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(i18n): add Thai language support and translations for commit messages --- src/i18n/index.ts | 4 ++++ src/i18n/th.json | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 src/i18n/th.json diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 128f3cf..e7b282e 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -14,6 +14,7 @@ import nl from '../i18n/nl.json' assert { type: 'json' }; import ru from '../i18n/ru.json' assert { type: 'json' }; import id_ID from '../i18n/id_ID.json' assert { type: 'json' }; import pl from '../i18n/pl.json' assert { type: 'json' }; +import th from '../i18n/th.json' assert { type: 'json' }; export enum I18nLocals { 'en' = 'en', @@ -31,6 +32,7 @@ export enum I18nLocals { 'ru' = 'ru', 'id_ID' = 'id_ID', 'pl' = 'pl', + 'th' = 'th', } export const i18n = { @@ -50,6 +52,7 @@ export const i18n = { nl, ru, pl, + th }; export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { @@ -69,6 +72,7 @@ export const I18N_CONFIG_ALIAS: { [key: string]: string[] } = { ru: ['ru', 'Russian', 'русский'], id_ID: ['id_ID', 'Bahasa', 'bahasa'], pl: ['pl', 'Polish', 'Polski'], + th: ['th', 'Thai', 'ไทย'] }; export function getI18nLocal(value: string): string | boolean { diff --git a/src/i18n/th.json b/src/i18n/th.json new file mode 100644 index 0000000..6a9800c --- /dev/null +++ b/src/i18n/th.json @@ -0,0 +1,6 @@ +{ + "localLanguage": "ไทย", + "commitFix": "fix(server.ts): เปลี่ยนตัวพิมพ์ของตัวแปร จากตัวพิมพ์เล็ก port เป็นตัวพิมพ์ใหญ่ PORT", + "commitFeat": "feat(server.ts): เพิ่มการรองรับสำหรับตัวแปรสภาพแวดล้อม process.env.PORT", + "commitDescription": "ตอนนี้ตัวแปรพอร์ตมีชื่อว่า PORT, ซึ่งปรับปรุงความสอดคล้องกับหลักการตั้งชื่อเนื่องจาก PORT เป็นค่าคงที่. การสนับสนุนสำหรับตัวแปรสภาพแวดล้อม ช่วยให้แอปพลิเคชันมีความยืดหยุ่นมากขึ้นเนื่องจาก สามารถทำงานบนพอร์ตใด ๆ ตามที่กำหนด ซึ่งระบุผ่านตัวแปรสภาพแวดล้อม process.env.PORT" +}