Skip to content

Commit 8ae82d5

Browse files
charIeszhaogao-sun
andauthored
feat(phrases): add Thai translations to Console and sign-in experience (#7730)
* feat(phrases): add Thai translations to Console and Sign-in Experience * chore: add changeset * refactor: update changeset Co-authored-by: Gao Sun <[email protected]> --------- Co-authored-by: Gao Sun <[email protected]>
1 parent 7dc7bc5 commit 8ae82d5

File tree

110 files changed

+4749
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+4749
-0
lines changed

.changeset/dull-fishes-relate.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@logto/phrases-experience": minor
3+
"@logto/phrases": minor
4+
---
5+
6+
add Thai translations to Logto Console and sign-in experience

packages/phrases-experience/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import plPL from './locales/pl-pl/index.js';
1515
import ptBR from './locales/pt-br/index.js';
1616
import ptPT from './locales/pt-pt/index.js';
1717
import ru from './locales/ru/index.js';
18+
import th from './locales/th/index.js';
1819
import trTR from './locales/tr-tr/index.js';
1920
import ukUA from './locales/uk-ua/index.js';
2021
import zhCN from './locales/zh-cn/index.js';
@@ -39,6 +40,7 @@ export const builtInLanguages = [
3940
'pt-PT',
4041
'pt-BR',
4142
'ru',
43+
'th',
4244
'tr-TR',
4345
'uk-UA',
4446
'zh-CN',
@@ -70,6 +72,7 @@ const resource: Resource = {
7072
'pt-PT': ptPT,
7173
'pt-BR': ptBR,
7274
ru,
75+
th,
7376
'tr-TR': trTR,
7477
'uk-UA': ukUA,
7578
'zh-CN': zhCN,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const action = {
2+
sign_in: 'เข้าสู่ระบบ',
3+
continue: 'ดำเนินการต่อ',
4+
continue_as: 'ดำเนินการต่อในชื่อ {{name}}',
5+
create_account: 'สร้างบัญชี',
6+
create_account_without_linking: 'สร้างบัญชีใหม่แทน',
7+
create: 'สร้าง',
8+
enter_passcode: 'กรอกรหัสยืนยัน',
9+
confirm: 'ยืนยัน',
10+
cancel: 'ยกเลิก',
11+
save_password: 'บันทึกรหัสผ่าน',
12+
bind: 'เชื่อมต่อกับ {{address}}',
13+
bind_and_continue: 'เชื่อมต่อและดำเนินการต่อ',
14+
back: 'กลับ',
15+
nav_back: 'ย้อนกลับ',
16+
nav_skip: 'ข้าม',
17+
agree: 'ยอมรับ',
18+
got_it: 'รับทราบ',
19+
sign_in_with: 'เข้าสู่ระบบด้วย {{name}}',
20+
forgot_password: 'ลืมรหัสผ่าน?',
21+
switch_to: 'เปลี่ยนเป็น {{method}}',
22+
sign_in_via_passcode: 'เข้าสู่ระบบด้วยรหัสยืนยัน',
23+
sign_in_via_password: 'เข้าสู่ระบบด้วยรหัสผ่าน',
24+
change: 'เปลี่ยน {{method}}',
25+
link_another_email: 'เชื่อมต่ออีเมลอื่น',
26+
link_another_phone: 'เชื่อมต่อเบอร์โทรศัพท์อื่น',
27+
link_another_email_or_phone: 'เชื่อมต่ออีเมลหรือเบอร์โทรศัพท์อื่น',
28+
show_password: 'แสดงรหัสผ่าน',
29+
copy: 'คัดลอก',
30+
verify_via_passkey: 'ยืนยันด้วยกุญแจรหัสผ่าน',
31+
download: 'ดาวน์โหลด',
32+
single_sign_on: 'เข้าสู่ระบบ SSO',
33+
authorize: 'อนุมัติ',
34+
use_another_account: 'ใช้บัญชีอื่น',
35+
back_to_current_account: 'กลับไปยังบัญชีปัจจุบัน',
36+
};
37+
38+
export default Object.freeze(action);
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
const description = {
2+
email: 'อีเมล',
3+
phone_number: 'หมายเลขโทรศัพท์',
4+
username: 'ชื่อผู้ใช้',
5+
reminder: 'การแจ้งเตือน',
6+
not_found: '404 ไม่พบหน้านี้',
7+
agree_with_terms: 'ข้าพเจ้าได้อ่านและยอมรับ ',
8+
agree_with_terms_modal: 'ในการดำเนินการต่อ โปรดยอมรับ <link></link>.',
9+
terms_of_use: 'ข้อกำหนดการใช้งาน',
10+
sign_in: 'เข้าสู่ระบบ',
11+
privacy_policy: 'นโยบายความเป็นส่วนตัว',
12+
create_account: 'สร้างบัญชี',
13+
switch_account: 'สลับบัญชี',
14+
or: 'หรือ',
15+
and: 'และ',
16+
enter_passcode: 'รหัสยืนยันได้ถูกส่งไปยัง {{address}} {{target}} แล้ว',
17+
passcode_sent: 'ได้ส่งรหัสยืนยันใหม่อีกครั้งแล้ว',
18+
resend_after_seconds: 'ยังไม่ได้รับใช่ไหม? ขอรหัสใหม่ได้หลัง <span>{{seconds}}</span> วินาที',
19+
resend_passcode: 'ยังไม่ได้รับใช่ไหม? <a>ขอรหัสยืนยันใหม่</a>',
20+
create_account_id_exists: 'บัญชี {{type}} {{value}} นี้มีอยู่แล้ว คุณต้องการเข้าสู่ระบบไหม?',
21+
link_account_id_exists: 'บัญชี {{type}} {{value}} นี้มีอยู่แล้ว คุณต้องการเชื่อมโยงหรือไม่?',
22+
sign_in_id_does_not_exist:
23+
'บัญชี {{type}} {{value}} นี้ยังไม่มีอยู่ คุณต้องการสร้างบัญชีใหม่หรือไม่?',
24+
sign_in_id_does_not_exist_alert: 'บัญชี {{type}} {{value}} นี้ยังไม่มีอยู่',
25+
create_account_id_exists_alert:
26+
'บัญชี {{type}} {{value}} นี้ได้เชื่อมโยงกับบัญชีอื่นแล้ว โปรดลองใช้ {{type}} อื่น',
27+
social_identity_exist:
28+
'{{type}} {{value}} นี้ได้เชื่อมโยงกับบัญชีอื่นแล้ว โปรดลองใช้ {{type}} อื่น',
29+
bind_account_title: 'เชื่อมหรือสร้างบัญชี',
30+
social_create_account: 'คุณสามารถสร้างบัญชีใหม่ได้',
31+
social_link_email: 'คุณสามารถเชื่อมโยงอีเมลอื่น',
32+
social_link_phone: 'คุณสามารถเชื่อมโยงเบอร์โทรศัพท์อื่น',
33+
social_link_email_or_phone: 'คุณสามารถเชื่อมโยงอีเมลหรือเบอร์โทรศัพท์อื่น',
34+
social_bind_with_existing:
35+
'เราพบบัญชีที่เกี่ยวข้องที่ได้ลงทะเบียนไว้แล้ว คุณสามารถเชื่อมโยงได้โดยตรง',
36+
skip_social_linking: 'ข้ามการเชื่อมบัญชีกับบัญชีที่มีอยู่?',
37+
reset_password: 'รีเซ็ตรหัสผ่าน',
38+
reset_password_description:
39+
'กรอก {{types, list(type: disjunction;)}} ที่เชื่อมโยงกับบัญชีของคุณ แล้วเราจะส่งรหัสยืนยันเพื่อรีเซ็ตรหัสผ่าน',
40+
new_password: 'รหัสผ่านใหม่',
41+
set_password: 'ตั้งรหัสผ่าน',
42+
password_changed: 'เปลี่ยนรหัสผ่านแล้ว',
43+
no_account: 'ยังไม่มีบัญชีใช่ไหม? ',
44+
have_account: 'มีบัญชีอยู่แล้ว?',
45+
enter_password: 'กรอกรหัสผ่าน',
46+
enter_password_for: 'เข้าสู่ระบบด้วยรหัสผ่านสำหรับ {{method}} {{value}}',
47+
enter_username: 'ตั้งชื่อผู้ใช้',
48+
enter_username_description:
49+
'ชื่อผู้ใช้สามารถใช้เข้าสู่ระบบแทนได้ ต้องประกอบด้วยตัวอักษร ตัวเลข และขีดล่างเท่านั้น',
50+
link_email: 'เชื่อมโยงอีเมล',
51+
link_phone: 'เชื่อมโยงเบอร์โทรศัพท์',
52+
link_email_or_phone: 'เชื่อมโยงอีเมลหรือเบอร์โทรศัพท์',
53+
link_email_description: 'เพื่อความปลอดภัยเพิ่มเติม กรุณาเชื่อมโยงอีเมลกับบัญชีของคุณ',
54+
link_phone_description: 'เพื่อความปลอดภัยเพิ่มเติม กรุณาเชื่อมโยงเบอร์โทรศัพท์กับบัญชีของคุณ',
55+
link_email_or_phone_description:
56+
'เพื่อความปลอดภัยเพิ่มเติม กรุณาเชื่อมโยงอีเมลหรือเบอร์โทรศัพท์กับบัญชีของคุณ',
57+
continue_with_more_information: 'เพื่อความปลอดภัย กรุณากรอกรายละเอียดบัญชีด้านล่างให้ครบถ้วน',
58+
create_your_account: 'สร้างบัญชีของคุณ',
59+
sign_in_to_your_account: 'เข้าสู่บัญชีของคุณ',
60+
no_region_code_found: 'ไม่พบรหัสประเทศ',
61+
verify_email: 'ยืนยันอีเมลของคุณ',
62+
verify_phone: 'ยืนยันหมายเลขโทรศัพท์ของคุณ',
63+
password_requirements: 'รหัสผ่านต้องมี {{items, list}}',
64+
password_requirement: {
65+
length_one: 'ต้องมีอย่างน้อย {{count}} ตัวอักษร',
66+
length_two: 'ต้องมีอย่างน้อย {{count}} ตัวอักษร',
67+
length_few: 'ต้องมีอย่างน้อย {{count}} ตัวอักษร',
68+
length_many: 'ต้องมีอย่างน้อย {{count}} ตัวอักษร',
69+
length_other: 'ต้องมีอย่างน้อย {{count}} ตัวอักษร',
70+
character_types_one:
71+
'ต้องมีอย่างน้อย {{count}} ประเภทในตัวพิมพ์ใหญ่ ตัวพิมพ์เล็ก ตัวเลข และสัญลักษณ์',
72+
character_types_two:
73+
'ต้องมีอย่างน้อย {{count}} ประเภทในตัวพิมพ์ใหญ่ ตัวพิมพ์เล็ก ตัวเลข และสัญลักษณ์',
74+
character_types_few:
75+
'ต้องมีอย่างน้อย {{count}} ประเภทในตัวพิมพ์ใหญ่ ตัวพิมพ์เล็ก ตัวเลข และสัญลักษณ์',
76+
character_types_many:
77+
'ต้องมีอย่างน้อย {{count}} ประเภทในตัวพิมพ์ใหญ่ ตัวพิมพ์เล็ก ตัวเลข และสัญลักษณ์',
78+
character_types_other:
79+
'ต้องมีอย่างน้อย {{count}} ประเภทในตัวพิมพ์ใหญ่ ตัวพิมพ์เล็ก ตัวเลข และสัญลักษณ์',
80+
},
81+
use: 'ใช้',
82+
single_sign_on_email_form: 'กรอกอีเมลบริษัทของคุณ',
83+
single_sign_on_connectors_list:
84+
'องค์กรของคุณได้เปิดใช้งาน Single Sign-On สำหรับอีเมล {{email}} คุณสามารถเข้าสู่ระบบผ่าน SSO ด้านล่างนี้',
85+
single_sign_on_enabled: 'บัญชีนี้เปิดใช้งาน Single Sign-On แล้ว',
86+
authorize_title: 'อนุมัติ {{name}}',
87+
request_permission: '{{name}} กำลังขอสิทธิ์เข้าถึง:',
88+
grant_organization_access: 'ให้สิทธิ์เข้าถึงองค์กร:',
89+
authorize_personal_data_usage: 'อนุญาตให้ใช้ข้อมูลส่วนตัวของคุณ:',
90+
authorize_organization_access: 'อนุญาตให้เข้าถึงองค์กรที่ระบุ:',
91+
user_scopes: 'ข้อมูลผู้ใช้ส่วนตัว',
92+
organization_scopes: 'การเข้าถึงองค์กร',
93+
authorize_agreement: `เมื่ออนุมัติการเข้าถึง ถือว่าคุณยอมรับ <link></link> ของ {{name}}`,
94+
authorize_agreement_with_redirect: `เมื่ออนุมัติการเข้าถึง ถือว่าคุณยอมรับ <link></link> ของ {{name}} และจะถูกเปลี่ยนหน้าไปยัง {{uri}}`,
95+
not_you: 'ไม่ใช่คุณใช่ไหม?',
96+
user_id: 'รหัสผู้ใช้: {{id}}',
97+
redirect_to: 'คุณจะถูกเปลี่ยนหน้าไปที่ {{name}}',
98+
auto_agreement: 'เมื่อดำเนินการต่อ ถือว่าคุณยอมรับ <link></link>',
99+
identifier_sign_in_description: 'กรอก {{types, list(type: disjunction;)}} เพื่อเข้าสู่ระบบ',
100+
all_sign_in_options: 'ตัวเลือกการเข้าสู่ระบบทั้งหมด',
101+
identifier_register_description: 'กรอก {{types, list(type: disjunction;)}} เพื่อสร้างบัญชีใหม่',
102+
all_account_creation_options: 'ตัวเลือกการสร้างบัญชีทั้งหมด',
103+
back_to_sign_in: 'กลับไปหน้าเข้าสู่ระบบ',
104+
support_email: 'อีเมลติดต่อ: <link></link>',
105+
support_website: 'เว็บไซต์สนับสนุน: <link></link>',
106+
switch_account_title: 'คุณกำลังเข้าสู่ระบบในชื่อ {{account}}',
107+
switch_account_description:
108+
'ในการดำเนินการต่อ คุณจะออกจากบัญชีปัจจุบัน และสลับไปยังบัญชีใหม่โดยอัตโนมัติ',
109+
about_yourself: 'บอกเราเกี่ยวกับตัวคุณ',
110+
};
111+
112+
export default Object.freeze(description);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const development_tenant = {
2+
notification: 'คุณอยู่ในโหมดการพัฒนา',
3+
};
4+
5+
export default Object.freeze(development_tenant);
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import password_rejected from './password-rejected.js';
2+
3+
const error = {
4+
general_required: `{{types, list(type: disjunction;)}} จำเป็นต้องระบุ`,
5+
general_invalid: `{{types, list(type: disjunction;)}} ไม่ถูกต้อง`,
6+
invalid_min_max_input: 'ค่าที่กรอกควรอยู่ระหว่าง {{minValue}} และ {{maxValue}}',
7+
invalid_min_max_length: 'จำนวนตัวอักษรที่กรอกควรอยู่ระหว่าง {{minLength}} และ {{maxLength}}',
8+
username_required: 'ต้องระบุชื่อผู้ใช้',
9+
password_required: 'ต้องระบุรหัสผ่าน',
10+
username_exists: 'ชื่อผู้ใช้นี้มีอยู่แล้ว',
11+
username_should_not_start_with_number: 'ชื่อผู้ใช้ไม่ควรขึ้นต้นด้วยตัวเลข',
12+
username_invalid_charset: 'ชื่อผู้ใช้ควรมีแค่ตัวอักษร ตัวเลข หรือขีดล่างเท่านั้น',
13+
invalid_email: 'อีเมลไม่ถูกต้อง',
14+
invalid_phone: 'หมายเลขโทรศัพท์ไม่ถูกต้อง',
15+
passwords_do_not_match: 'รหัสผ่านไม่ตรงกัน กรุณาลองใหม่อีกครั้ง',
16+
invalid_passcode: 'รหัสยืนยันไม่ถูกต้อง',
17+
invalid_connector_auth: 'การอนุญาตไม่ถูกต้อง',
18+
invalid_connector_request: 'ข้อมูลตัวเชื่อมต่อไม่ถูกต้อง',
19+
unknown: 'เกิดข้อผิดพลาดที่ไม่ทราบสาเหตุ กรุณาลองใหม่ภายหลัง',
20+
invalid_session: 'ไม่พบเซสชัน กรุณากลับไปและเข้าสู่ระบบอีกครั้ง',
21+
timeout: 'หมดเวลา กรุณาลองใหม่ภายหลัง',
22+
password_rejected,
23+
sso_not_enabled: 'ยังไม่ได้เปิดใช้งาน Single Sign-On สำหรับบัญชีอีเมลนี้',
24+
invalid_link: 'ลิงก์ไม่ถูกต้อง',
25+
invalid_link_description: 'โทเค็นใช้ครั้งเดียวของคุณอาจหมดอายุหรือไม่ถูกต้องอีกต่อไป',
26+
captcha_verification_failed: 'การตรวจสอบ captcha ล้มเหลว',
27+
something_went_wrong: 'เกิดข้อผิดพลาดบางอย่าง',
28+
};
29+
30+
export default Object.freeze(error);
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { type PasswordRejectionCode } from '@logto/core-kit';
2+
3+
type BreakdownKeysToObject<Key extends string> = {
4+
[K in Key as K extends `${infer A}.${string}` ? A : K]: K extends `${string}.${infer B}`
5+
? BreakdownKeysToObject<B>
6+
: string;
7+
};
8+
9+
type RejectionPhrases = BreakdownKeysToObject<PasswordRejectionCode>;
10+
11+
const password_rejected = {
12+
too_short: 'ความยาวขั้นต่ำคือ {{min}} ตัวอักษร',
13+
too_long: 'ความยาวสูงสุดคือ {{max}} ตัวอักษร',
14+
character_types: 'ต้องมีอักขระอย่างน้อย {{min}} ประเภท',
15+
unsupported_characters: 'พบอักขระที่ไม่รองรับ',
16+
pwned: 'หลีกเลี่ยงการใช้รหัสผ่านที่ง่ายต่อการคาดเดา',
17+
restricted_found: 'หลีกเลี่ยงการใช้ {{list, list}} ซ้ำบ่อยเกินไป',
18+
restricted: {
19+
repetition: 'อักขระที่ซ้ำกัน',
20+
sequence: 'อักขระที่เรียงตามลำดับ',
21+
user_info: 'ข้อมูลส่วนตัวของคุณ',
22+
words: 'บริบทของผลิตภัณฑ์',
23+
},
24+
} satisfies RejectionPhrases & {
25+
// Use for displaying a list of restricted issues
26+
restricted_found: string;
27+
};
28+
29+
export default Object.freeze(password_rejected);
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import action from './action.js';
2+
import description from './description.js';
3+
import development_tenant from './development-tenant.js';
4+
import error from './error/index.js';
5+
import input from './input.js';
6+
import list from './list.js';
7+
import mfa from './mfa.js';
8+
import profile from './profile.js';
9+
import secondary from './secondary.js';
10+
import user_scopes from './user-scopes.js';
11+
12+
const en = {
13+
translation: {
14+
input,
15+
secondary,
16+
action,
17+
description,
18+
error,
19+
list,
20+
mfa,
21+
development_tenant,
22+
user_scopes,
23+
profile,
24+
},
25+
};
26+
27+
export default Object.freeze(en);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const input = {
2+
username: 'Username',
3+
password: 'Password',
4+
email: 'อีเมล',
5+
phone_number: 'หมายเลขโทรศัพท์',
6+
confirm_password: 'ยืนยันรหัสผ่าน',
7+
search_region_code: 'ค้นหารหัสภูมิภาค',
8+
backup_code: 'รหัสสำรอง',
9+
label_with_optional: '{{label}} (ไม่บังคับ)',
10+
};
11+
12+
export default Object.freeze(input);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const list = {
2+
or: 'หรือ',
3+
and: 'และ',
4+
separator: ',',
5+
};
6+
7+
export default Object.freeze(list);

0 commit comments

Comments
 (0)