Skip to content

Improve Traditional Chinese localization wording#1158

Merged
steipete merged 6 commits into
steipete:mainfrom
jack24254029:fix/zh-hant-localization-wording-v2
May 26, 2026
Merged

Improve Traditional Chinese localization wording#1158
steipete merged 6 commits into
steipete:mainfrom
jack24254029:fix/zh-hant-localization-wording-v2

Conversation

@jack24254029
Copy link
Copy Markdown
Contributor

@jack24254029 jack24254029 commented May 26, 2026

Summary

  • Refine Traditional Chinese localization wording for more natural Taiwan usage.
  • Replace provider terminology from 供應商 to 提供者 across zh-Hant strings.
  • Localize CodexBar notification copy for quota warnings, session depleted/restored, and login success.

Root Cause

  • Settings notification labels were localized, but posted UNMutableNotificationContent title/body strings still used hardcoded English.

Visual Proof

  • Redacted zh-Hant app screenshots showing Traditional Chinese strings loaded in the running app.
  • The proof covers General, Providers, About, and Debug settings panes. Cost, plan, cookie source, build timestamp, and local path details are redacted.

General

General settings in Traditional Chinese

Providers

Providers settings in Traditional Chinese

About

About settings in Traditional Chinese

Debug

Debug settings in Traditional Chinese

Session quota notification

image

Validation

  • make check
  • swift test --filter 'QuotaWarningNotificationLogicTests|SessionQuotaNotificationLogicTests|LoginNotificationLogicTests|LocalizationBundleTests'
  • plutil -lint Sources/CodexBar/Resources/*/Localizable.strings
  • placeholder parity check between en and zh-Hant strings
  • git diff --check HEAD

- Refine zh-Hant strings for more natural Taiwan usage and terminology.

- Replace provider terminology with 提供者 across Traditional Chinese copy.

- Validate localized resources, placeholder parity, diff cleanliness, and high-risk term usage.
- Route quota warning, session depleted/restored, and login success notifications through localized strings.

- Add English and Traditional Chinese notification keys with focused notification copy tests.

- Validate with make check and focused notification/localization tests.
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 26, 2026

Codex review: needs maintainer review before merge. Reviewed May 26, 2026, 4:41 AM ET / 08:41 UTC.

Summary
The branch refines zh-Hant strings, localizes quota/session/login notification copy through L(...), adds focused localization tests, stabilizes language-sensitive tests, and updates the unreleased changelog.

Reproducibility: yes. Source inspection of current main shows quota/session/login notification copy built from English literals while selectable localization already exists.

Review metrics: 3 noteworthy metrics.

  • Changed surface: 13 files, 587 additions, 417 deletions. The code path is small, but the localization/test churn is large enough for maintainers to review scope before merge.
  • zh-Hant string churn: 264 added, 255 deleted. Traditional Chinese wording quality is the main review surface that automated checks cannot settle.
  • Proof artifacts: 5 screenshots in PR body; 3 inspected locally. The screenshots directly show zh-Hant settings and notification behavior after the change.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Have a Traditional Chinese reader confirm the broad zh-Hant wording changes before merge.

Risk before merge

  • The zh-Hant resource has broad wording churn, so tests cannot replace a human Traditional Chinese wording review.
  • This read-only review did not run make check or Swift tests; validation is based on source inspection, PR-reported commands, and inspected screenshots.

Maintainer options:

  1. Decide the mitigation before merge
    Land after maintainer and Traditional Chinese wording review, keeping the notification copy on the existing localization helper with focused regression tests.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
The remaining action is human zh-Hant wording review and normal maintainer/check review; there is no narrow automated repair to queue.

Security
Cleared: The diff touches localization resources, notification copy helpers, tests, and changelog text; no concrete security or supply-chain concern was found.

Review details

Best possible solution:

Land after maintainer and Traditional Chinese wording review, keeping the notification copy on the existing localization helper with focused regression tests.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection of current main shows quota/session/login notification copy built from English literals while selectable localization already exists.

Is this the best way to solve the issue?

Yes for the code path. Routing the notification strings through L(...) and adding focused notification-copy tests is the narrow maintainable fix; final zh-Hant wording review remains human judgment.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7c751570b7e9.

Label changes

Label justifications:

  • P3: This is low-risk localization polish and notification-copy cleanup with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body and inspected screenshot artifacts directly show zh-Hant settings panes and a zh-Hant macOS notification after the change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and inspected screenshot artifacts directly show zh-Hant settings panes and a zh-Hant macOS notification after the change.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body and inspected screenshot artifacts directly show zh-Hant settings panes and a zh-Hant macOS notification after the change.
Evidence reviewed

What I checked:

  • Repository policy read: Read the full AGENTS.md; its focused SwiftPM testing, small-change, UI proof, and release-owned artifact guidance informed the review. (AGENTS.md:1, 7c751570b7e9)
  • Current main has app-language localization support: Current main already selects localized bundles from the app language setting, so routing notification copy through L(...) follows the existing localization path. (Sources/CodexBar/Localization.swift:37, 7c751570b7e9)
  • Current main hardcodes notification copy: Source inspection shows quota warning, session depleted/restored, and login success notifications are built from English literals on current main. (Sources/CodexBar/SessionQuotaNotifications.swift:60, 7c751570b7e9)
  • PR localizes notification paths: The PR adds localized notification copy helpers, localized quota window labels, and switches session/quota/login notification posting to those helpers. (Sources/CodexBar/SessionQuotaNotifications.swift:47, f36f17a28840)
  • Proof artifacts inspected: Downloaded screenshot artifacts are valid PNGs, including a zh-Hant macOS notification screenshot and zh-Hant settings panes; this directly shows after-change visible behavior. (f36f17a28840)
  • Feature history checked: History ties the central areas to prior localization, app-language, session notification, and quota warning work. (Sources/CodexBar/SessionQuotaNotifications.swift, 4fc3132c525e)

Likely related people:

  • steipete: Current-main blame and history show recent app-language fallback work and the original session quota notification feature in the affected files. (role: recent localization and notification-path contributor; confidence: high; commits: 333d584a4950, a01bf8c9751c, 1e80b7331bef; files: Sources/CodexBar/Localization.swift, Sources/CodexBar/SessionQuotaNotifications.swift, Sources/CodexBar/StatusItemController+Actions.swift)
  • ilyaliao: The commit metadata for the zh-Hant localization introduction maps the commit to this GitHub account. (role: Traditional Chinese localization introducer; confidence: high; commits: 3c0dbe96772a; files: Sources/CodexBar/Resources/zh-Hant.lproj/Localizable.strings)
  • Alekstodo: History shows this account added the configurable quota warning notification area touched by the PR. (role: quota warning feature contributor; confidence: medium; commits: 18eb73dde236; files: Sources/CodexBar/SessionQuotaNotifications.swift, Tests/CodexBarTests/QuotaWarningNotificationLogicTests.swift)
  • raflyazf: History shows recent account-aware quota warning notification copy work in the helper this PR changes. (role: recent quota warning notification contributor; confidence: medium; commits: ee96d84fc0b8; files: Sources/CodexBar/SessionQuotaNotifications.swift, Tests/CodexBarTests/QuotaWarningNotificationLogicTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels May 26, 2026
@jack24254029
Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 26, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@jack24254029
Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 26, 2026

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels May 26, 2026
- Pin English-only assertions to the English localization override so local app language settings do not affect tests.

- Adjust the OpenAI web refresh test wait order to avoid a full-suite scheduling timeout.

- Verification: make check, swift test.
@jack24254029 jack24254029 force-pushed the fix/zh-hant-localization-wording-v2 branch from 94facea to b34e05e Compare May 26, 2026 08:06
@steipete steipete merged commit bba6453 into steipete:main May 26, 2026
1 check passed
Copy link
Copy Markdown

@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: 8ade819e3b

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +78 to +80
let windowLabel = window.localizedNotificationDisplayName
let remainingText = Self.percentText(currentRemaining)
let accountPrefix = accountDisplayName
.map { "Account \($0). " } ?? ""
return (
"\(providerName) \(windowLabel) quota low",
"\(accountPrefix)\(remainingText) left. Reached your \(threshold)% \(windowLabel) warning threshold.")
let title = L("quota_warning_notification_title", providerName, windowLabel)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid mixed-language fallback in quota warning copy

windowLabel is localized separately before formatting the notification strings, but quota_warning_notification_* keys were only added in en.lproj and zh-Hant.lproj. In locales like ca, es, pt-BR, and zh-Hans, L("quota_warning_notification_title", ...) falls back to the English template while still injecting a localized window label, producing mixed text (for example, "Codex sesión quota low"). Please derive the label from the same fallback language as the template (or add these keys to all shipped locales) so notifications stay linguistically consistent.

Useful? React with 👍 / 👎.

@jack24254029 jack24254029 deleted the fix/zh-hant-localization-wording-v2 branch May 26, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants