diff --git a/src/components/LocaleSelector.tsx b/src/components/LocaleSelector.tsx index 9613b2c..14ac7f3 100644 --- a/src/components/LocaleSelector.tsx +++ b/src/components/LocaleSelector.tsx @@ -32,6 +32,10 @@ const localeItemList: LocaleItem[] = [ value: "de", label: "Deutsch", }, + { + value: "th", + label: "ยาสุฟุมิ", + }, ]; const LocaleSelector = () => { diff --git a/src/locales/i18n.ts b/src/locales/i18n.ts index 74def12..5bc9feb 100644 --- a/src/locales/i18n.ts +++ b/src/locales/i18n.ts @@ -6,6 +6,7 @@ import zhHant from "./zh-Hant.json"; import esLocale from "./es.json"; import jpLocale from "./jp.json"; import deLocale from "./de.json"; +import thLocale from "./th.json"; i18n.use(initReactI18next).init({ resources: { @@ -27,6 +28,9 @@ i18n.use(initReactI18next).init({ de: { translation: deLocale, }, + th: { + translation: thLocale, + }, }, fallbackLng: "en", }); diff --git a/src/locales/th.json b/src/locales/th.json new file mode 100644 index 0000000..6da2416 --- /dev/null +++ b/src/locales/th.json @@ -0,0 +1,77 @@ +{ + "common": { + "clear": "ล้าง", + "close": "ปิด", + "confirm": "ยืนยัน", + "save": "บันทึก", + "edit": "แก้ไข", + "loading": "กำลังโหลด", + "setting": "ตั้งค่า", + "copy": "คัดลอก", + "delete": "ลบ", + "execute": "ดำเนินการ" + }, + "conversation": { + "new-chat": "แชทใหม่", + "conversation-title": "หัวข้อการสนทนา", + "update": "อัปเดตการสนทนา", + "title": "หัวข้อ" + }, + "connection": { + "self": "การเชื่อมต่อ", + "new": "สร้างการเชื่อมต่อ", + "edit": "แก้ไขการเชื่อมต่อ", + "select-database": "เลือกฐานข้อมูลของคุณ", + "database-type": "ประเภทฐานข้อมูล", + "title": "หัวข้อ", + "host": "โฮสต์", + "port": "พอร์ต", + "database-name": "ชื่อฐานข้อมูล", + "username": "ชื่อผู้ใช้", + "password": "รหัสผ่าน" + }, + "assistant": { + "self": "บอท", + "create-your-bot": "ไม่พบบอทที่คุณต้องการ? สร้างใหม่" + }, + "execution": { + "title": "ดำเนินการ SQL", + "message": { + "executing": "กำลังดำเนินการคำสั่ง...", + "no-connection": "ไม่ได้เลือกการเชื่อมต่อ", + "no-data": "ไม่มีข้อมูลที่ส่งกลับ" + } + }, + "editor": { + "placeholder": "กรอกคำถามของคุณที่นี่..." + }, + "setting": { + "self": "ตั้งค่า", + "basic": { + "self": "พื้นฐาน", + "language": "ภาษา" + }, + "theme": { + "self": "ธีม", + "system": "ตามระบบ", + "light": "สว่าง", + "dark": "เข้ม" + }, + "openai-api-configuration": { + "self": "การกำหนดค่า OpenAI API" + }, + "data": { + "self": "ข้อมูล", + "clear-all-data": "ลบข้อมูลทั้งหมด" + } + }, + "social": { + "join-discord-channel": "เข้าร่วมช่อง Discord", + "join-wechat-group": "เข้าร่วมกลุ่ม WeChat" + }, + "banner": { + "data-storage": "การตั้งค่าการเชื่อมต่อจะถูกเก็บไว้ในเบราว์เซอร์ของคุณ", + "non-select-sql-warning": "คำสั่งปัจจุบันอาจเป็นคำสั่ง SQL ที่ไม่ใช่ SELECT ซึ่งจะทำให้เกิดการเปลี่ยนแปลงโครงสร้างฐานข้อมูลหรือข้อมูล โปรดตรวจสอบว่าคุณรู้ว่าตัวเองกำลังทำอะไร", + "product-hunt": "🚀🚀🚀 เราเพิ่งเปิดตัวบน Product Hunt โปรดโหวตเรา! 🚀🚀🚀" + } +} diff --git a/src/types/setting.ts b/src/types/setting.ts index 71deb45..636a85f 100644 --- a/src/types/setting.ts +++ b/src/types/setting.ts @@ -1,4 +1,4 @@ -export type Locale = "en" | "zh" | "zhHant" | "es" | "jp" | "de"; +export type Locale = "en" | "zh" | "zhHant" | "es" | "jp" | "de" | "th"; export type Theme = "light" | "dark" | "system";