feat(i18n): add Traditional Chinese (zh-TW) locale support#120
feat(i18n): add Traditional Chinese (zh-TW) locale support#120sk5s wants to merge 6 commits intoamicalhq:mainfrom
Conversation
Include a new `SelectItem` with value `zh‑TW` and the translation key `settings.preferences.language.options.zh‑TW`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Traditional Chinese (zh-TW) localization: new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/desktop/src/i18n/locales/zh-TW.json`:
- Around line 561-569: The "actions" object in the zh-TW locale is missing the
settings.history.actions.reportDisabledTelemetry key, causing fallback to
English; add a "reportDisabledTelemetry" entry to the existing "actions" block
with an appropriate Traditional Chinese string (e.g., "回報遙測已停用") so the key
settings.history.actions.reportDisabledTelemetry is present in the zh-TW locale
and mirrors the other locales.
In `@apps/desktop/src/i18n/shared.ts`:
- Around line 42-44: The current branch in resolveLocale that checks if base ===
"zh" incorrectly maps every zh-* to "zh-TW"; change the condition to only match
explicit Traditional-Chinese variants (e.g., check for full locale values or
script like "zh-TW", "zh-HK", "zh-MO", or "zh-Hant") instead of using the base
variable alone, so that Simplified variants such as "zh-CN", "zh-SG", or
"zh-Hans" are not coerced and will fall through to the normal supported-locale
matching or default fallback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 87292c7a-c1fa-402c-96cf-7c8be9d00334
📒 Files selected for processing (6)
apps/desktop/src/i18n/locales/en.jsonapps/desktop/src/i18n/locales/es.jsonapps/desktop/src/i18n/locales/ja.jsonapps/desktop/src/i18n/locales/zh-TW.jsonapps/desktop/src/i18n/shared.tsapps/desktop/src/renderer/main/pages/settings/preferences/index.tsx
Extend locale resolution to map zh, zh-HK, zh-MO and zh-Hant* to zh‑TW.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/desktop/src/i18n/locales/zh-TW.json`:
- Around line 347-350: The nav label "shortcuts.title" is inconsistent with the
page title; update the value of the "shortcuts.title" key in zh-TW locale to
"快捷鍵" so it matches the page title (leave "shortcuts.description" unchanged).
- Around line 372-377: The logoAlt value in the zh-TW locale is still English;
update the "logoAlt" key inside the "sidebar" object to a Traditional Chinese
label (e.g., "Amical 標誌" or "Amical 徽標") so screen readers announce a localized
alt text; ensure you only change the "logoAlt" string and keep other keys like
"brand" unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a7027b69-9c4f-4aa3-863f-b9fc3eb2ceb9
📒 Files selected for processing (2)
apps/desktop/src/i18n/locales/zh-TW.jsonapps/desktop/src/i18n/shared.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/desktop/src/i18n/shared.ts
|
@sk5s Thanks for this. |
Change shortcuts title to “快捷鍵” and logo alt text to “Amical 標誌”.
Summary
This pull request introduces Traditional Chinese (
zh-TW) localization to Amical, expanding the application's accessibility for Traditional Chinese-speaking users.Changes Included
zh-TWlocale.zh-TWas an active and selectable language option within the application.Summary by CodeRabbit