Add feature: Chinese localization and README updates#820
Add feature: Chinese localization and README updates#820AidenYang1 wants to merge 5 commits intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: feed2bd085
ℹ️ 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".
| switch self { | ||
| case .claudeNotInstalled: | ||
| "Claude CLI is not installed. Install it from https://code.claude.com/docs/en/overview." | ||
| NSLocalizedString("error.claude.not_installed", comment: "") |
There was a problem hiding this comment.
Keep human-readable fallback for Core localized errors
ClaudeUsageError in CodexBarCore now returns localization keys via NSLocalizedString (for example "error.claude.not_installed"), but Package.swift only attaches Localizable.strings resources to the CodexBar app target, not CodexBarCore/CodexBarCLI. In non-app contexts (notably CodexBarCLI and tests that execute Core outside the app bundle), these lookups resolve to the raw key text, so users get opaque messages instead of actionable errors. Please keep an English fallback (or move/localize resources into bundles used by Core consumers) so CLI/error output remains readable.
Useful? React with 👍 / 👎.
|
Fixed in the latest commit — added value: fallback to all 32 NSLocalizedString calls in CodexBarCore so CLI and non-app contexts always show readable English strings. |
Hi,Steipete
Ur app has a large users in China, but I noticed CodexBar doesn't have localization (Chinese) support yet — so I went ahead and made some improvements. I spent an afternoon refactoring and decoupling the localization code, and also worked on the translations to make them feel more natural and native — staying true to the original meaning without being machine.
Here's what I've done:
localization.stringssupport.PR
I did code audit on your latest main branch — as long as there are no major structural changes on your latest, you should be able to apply this PR directly. You're also can review it by Claude to check. But for the Chinese translations themselves, trust me on those.
Other language support
I refactored the hardcoded strings section, so if other contributors want to add other languages, all they need to do is create a new language folder with a strings file、localize it and add a case to the
AppLanguageenum.Feel free to reply if u have any questions — hope this helps CodexBar reach more users
Thanks,
Aiden
screenshots