Add comprehensive zh-Hans localization coverage across menu, settings, and notifications#382
Add comprehensive zh-Hans localization coverage across menu, settings, and notifications#382ShawnRn wants to merge 1 commit intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7214ede5eb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if etaText == "now" { return "Runs out now" } | ||
| return "Runs out in \(etaText)" | ||
| if etaText == L10n.tr("now") { return L10n.tr("Runs out now") } | ||
| return L10n.format("Runs out in %@", etaText) |
There was a problem hiding this comment.
Remove duplicated suffix from zh-Hans pace ETA
In detailRightLabel, etaText comes from durationText, which only strips the English in prefix; after this commit localizes countdown strings (e.g. zh-Hans in %dh -> %d 小时后), etaText already contains the trailing 后. Formatting that value with Runs out in %@ (zh-Hans: %@ 后耗尽) yields duplicated wording like 3 小时后 后耗尽, so zh-Hans users see broken pace text whenever an ETA is shown.
Useful? React with 👍 / 👎.
What this PR does
This PR adds and wires comprehensive Simplified Chinese (
zh-Hans) localization coverage across CodexBar UI surfaces, with a focus on menu bar content and provider-related views.Summary of changes
Added localization infrastructure:
Introduced a shared localization helper (
L10n) for consistent string lookup/formatting.Added
en.lproj/Localizable.stringsandzh-Hans.lproj/Localizable.strings.Set package default localization to English.
Localized previously hardcoded UI text in:
Menu card sections (usage, reset, credits, cost, history, status details).
Preferences panes and provider detail/settings rows.
Provider actions/submenus and status-related text.
Session quota notifications and related wording.
Relative/updated/reset time labels and format strings.
Fixed several missed/edge strings reported during manual QA:
Notification body/title phrasing and punctuation.
“Updated just now” and related freshness strings.
Percentage word order for zh-Hans (e.g.
剩余 32%).“Session depleted” phrasing changed to quota-oriented Chinese wording.
Cost history empty-state and hover/detail labels.
Behavior notes
Validation
./Scripts/compile_and_run.shafter each edit cycle.Scope / non-goals