feat(i18n): add full Traditional Chinese (zh-TW) UI support#259
Merged
Conversation
Add zh-TW locale resources and wire it through language selection, persistence, and system-locale detection. Also add static shape typing for zh-TW to prevent future key drift from zh-CN. Constraint: Keep changes minimal and localized to i18n + language pickers Rejected: Partial zh-TW translation only for language section | fails full locale support goal Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep zh-TW key shape locked to zh-CN when adding new translation keys Tested: npm run -s build (openless-all/app) Not-tested: Manual runtime walkthrough on all platform shells
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Summary
zh-TWlocale resource file for Traditional Chinese UIzh-TWinto i18n supported locales, resource registration, persisted preference, and system locale detectionzh-TW(typeof zhCN) to avoid future key driftVerification
npm run -s build(inopenless-all/app)Scope
PR Type
Enhancement
Description
Add full Traditional Chinese (zh-TW) locale resource file
Register zh-TW in i18n system, storage, and system detection
Extend system locale detection to map zh-Hant/TW/HK/MO to zh-TW
Add Traditional Chinese option in both language selectors
Diagram Walkthrough
File Walkthrough
zh-TW.ts
Add Traditional Chinese locale resource fileopenless-all/app/src/i18n/zh-TW.ts
typeof zhCNto lock key shape and prevent future driftindex.ts
Integrate zh-TW into i18n systemopenless-all/app/src/i18n/index.ts
zhTWmodule'zh-TW'toSUPPORTED_LOCALESdetectSystemLocale()to return'zh-TW'for zh-Hant/TW/HK/MOgetStoredLocale()to accept'zh-TW''zh-TW'translation resource in i18nexten.ts
Add Traditional Chinese label in English localeopenless-all/app/src/i18n/en.ts
zhTW: '繁體中文'undersettings.languagezh-CN.ts
Add Traditional Chinese label in Simplified Chinese localeopenless-all/app/src/i18n/zh-CN.ts
zhTW: '繁體中文'undersettings.languageSettingsModal.tsx
Add Traditional Chinese option in Settings modal pickeropenless-all/app/src/components/SettingsModal.tsx
witht('settings.language.zhTW')in thelanguage selector
Settings.tsx
Add Traditional Chinese option in Settings page pickeropenless-all/app/src/pages/Settings.tsx
witht('settings.language.zhTW')in theLanguageSectionselect