-
-
Notifications
You must be signed in to change notification settings - Fork 969
feat: [feature/th_TH-locale] add Thai [th_TH] locale #4299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tnitsiri
commented
May 25, 2025
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
simonguo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please export th_TH.ts in index.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds Thai [th_TH] locale to the project, providing translated UI labels and date formatting patterns for Thai users.
- Introduces
th_TH.tswith Thai translations and integrates the date-fns Thai locale. - Registers the new
thTHexport inlocales/index.ts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/locales/th_TH.ts | Added Thai translations, date patterns, and locale |
| src/locales/index.ts | Exported thTH to include the new Thai locale |
Comments suppressed due to low confidence (1)
src/locales/th_TH.ts:1
- Add unit tests to verify that the
th-THlocale file exports all expected translation keys and that date formatting patterns work as intended.
import th from 'date-fns/locale/th';
src/locales/th_TH.ts
Outdated
| last: 'หน้าสุดท้าย', | ||
| limit: '{0} / หน้า', | ||
| total: 'รายการทั้งหมด: {0}', | ||
| skip: 'ไปที่{0}' |
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space between 'ไปที่' and '{0}' (e.g., 'ไปที่ {0}') to improve readability.
| skip: 'ไปที่{0}' | |
| skip: 'ไปที่ {0}' |
| shortDateFormat: 'dd/MM/yyyy', | ||
| shortTimeFormat: 'HH:mm', | ||
|
|
||
| dateLocale: th as any |
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using 'any' for dateLocale. Consider importing and using the proper Locale type from date-fns (e.g., dateLocale: th as Locale).