Skip to content

Add feature: Chinese localization and README updates#820

Open
AidenYang1 wants to merge 5 commits intosteipete:mainfrom
AidenYang1:main
Open

Add feature: Chinese localization and README updates#820
AidenYang1 wants to merge 5 commits intosteipete:mainfrom
AidenYang1:main

Conversation

@AidenYang1
Copy link
Copy Markdown

@AidenYang1 AidenYang1 commented Apr 30, 2026

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:

  1. I added an in-app language switcher in the General settings.
  2. I decoupled all the hardcoded strings from the original code and added localization.strings support.
  3. I did a manual review of the Chinese translations specifically. (There might be a few minor spots I missed, but overall it should be a solid, trustworthy Chinese localization.)
  4. I added a Chinese README and a toggle button to switch between them.

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 AppLanguage enum.

Feel free to reply if u have any questions — hope this helps CodexBar reach more users

Thanks,
Aiden

screenshots

image image image image image

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: 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: "")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@AidenYang1
Copy link
Copy Markdown
Author

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.

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