-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(cli): add Traditional Chinese (zh-TW) as a UI language option #3569
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
Changes from all commits
28e1600
d849354
3d542a0
bcc92ea
cb51281
89c4955
ccbde3d
e3db54c
3374d47
3555bd5
1382c3a
0bd40bc
fc23c1e
7eedd5f
522aad4
c8d4fae
a5c3ed9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |||||
| export type SupportedLanguage = | ||||||
| | 'en' | ||||||
| | 'zh' | ||||||
| | 'zh-TW' | ||||||
| | 'ru' | ||||||
| | 'de' | ||||||
| | 'ja' | ||||||
|
|
@@ -32,6 +33,12 @@ export const SUPPORTED_LANGUAGES: readonly LanguageDefinition[] = [ | |||||
| fullName: 'English', | ||||||
| nativeName: 'English', | ||||||
| }, | ||||||
| { | ||||||
| code: 'zh-TW', | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Adding
Suggested change
Alternatively, keep the canonical code and make — gpt-5.5 via Qwen Code /review |
||||||
| id: 'zh-TW', | ||||||
| fullName: 'Traditional Chinese', | ||||||
| nativeName: '繁體中文', | ||||||
| }, | ||||||
| { | ||||||
| code: 'zh', | ||||||
| id: 'zh-CN', | ||||||
|
|
@@ -75,7 +82,8 @@ export const SUPPORTED_LANGUAGES: readonly LanguageDefinition[] = [ | |||||
| * Used for LLM output language instructions. | ||||||
| */ | ||||||
| export function getLanguageNameFromLocale(locale: SupportedLanguage): string { | ||||||
| const lang = SUPPORTED_LANGUAGES.find((l) => l.code === locale); | ||||||
| const lower = locale.toLowerCase(); | ||||||
| const lang = SUPPORTED_LANGUAGES.find((l) => l.code.toLowerCase() === lower); | ||||||
| return lang?.fullName || 'English'; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
Large diffs are not rendered by default.
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.
[Critical] Adding
zh-TWafter the genericzhentry breaks the new locale for users who keepgeneral.languageonauto.detectSystemLanguage()walksSUPPORTED_LANGUAGESin order and usesstartsWith(), sozh-TW/zh-TW.UTF-8matcheszhfirst and still resolves to Simplified Chinese.— gpt-5.4 via Qwen Code /review