Skip to content

Add comprehensive zh-Hans localization coverage across menu, settings, and notifications#382

Open
ShawnRn wants to merge 1 commit intosteipete:mainfrom
ShawnRn:main
Open

Add comprehensive zh-Hans localization coverage across menu, settings, and notifications#382
ShawnRn wants to merge 1 commit intosteipete:mainfrom
ShawnRn:main

Conversation

@ShawnRn
Copy link

@ShawnRn ShawnRn commented Feb 16, 2026

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.strings and zh-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

  • English layout/wording is preserved.
  • zh-Hans wording is adjusted for natural Chinese reading order.
  • Dynamic strings now use format keys where needed so zh-Hans and English can differ safely.

Validation

  • Ran ./Scripts/compile_and_run.sh after each edit cycle.
  • Build/package/relaunch succeeded.
  • App launches and runs with updated localized resources.

Scope / non-goals

  • This PR is focused on UI localization coverage and string wiring.
  • No provider fetching logic changes were introduced.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments