Skip to content

Add Simplified Chinese and 8 more language localizations - #877

Open
qq3229311585-jpg wants to merge 3 commits into
kyleneideck:masterfrom
qq3229311585-jpg:zh-Hans-localization
Open

qq3229311585-jpg wants to merge 3 commits into
kyleneideck:masterfrom
qq3229311585-jpg:zh-Hans-localization

Conversation

@qq3229311585-jpg

Copy link
Copy Markdown

Summary

BGMApp had no localization infrastructure before this PR — only Base.lproj existed, with no NSLocalizedString usage and no second language registered. This adds:

  • Localization infrastructure: registers 9 new languages (zh-Hans, fr, de, es, ja, ko, pt-PT, ru, it) in knownRegions and CFBundleLocalizations.
  • MainMenu.strings per language, translating the menu bar / preferences panel text that lives in MainMenu.xib.
  • Wraps previously-hardcoded strings (alert/dialog text, the Mute/Unmute button, the dynamic "Auto-pause " menu item, the "Auto-pause Delays" preferences submenu, the About panel version/copyright text, etc.) in NSLocalizedString, with a Localizable.strings per language.
  • InfoPlist.strings per language for the microphone and Apple Events permission prompt text.

Important note on translation quality

The zh-Hans (Simplified Chinese) translations were reviewed against a real build and real-machine testing. The other 8 languages (fr, de, es, ja, ko, pt-PT, ru, it) were generated without a native speaker's review — I don't have fluent speakers of all of these on hand. They should be functionally correct (verified to build, and format placeholders like %@/%ld are preserved), but the phrasing may not be fully idiomatic in places. I'd very much welcome native speakers pointing out anything that reads awkwardly — happy to fix in follow-up commits on this PR.

Testing

  • xcodebuild -workspace BGM.xcworkspace -scheme "Background Music" -configuration Debug build succeeds.
  • Verified on a real machine that the menu bar, preferences panel, and about panel render correctly in Chinese when the system language is set accordingly.
  • Confirmed via plutil -lint that all new .strings files across all 9 languages are well-formed, and via plutil -p on the built app bundle's Info.plist that CFBundleLocalizations lists all 9 languages correctly.

🤖 Generated with Claude Code

second and others added 3 commits September 7, 2026 12:39
Introduces localization infrastructure that didn't exist before
(BGMApp only had Base.lproj, no NSLocalizedString usage, no second
language registered):

- Register zh-Hans in the Xcode project (knownRegions) and Info.plist
  (CFBundleLocalizations).
- Add zh-Hans.lproj/MainMenu.strings translating all menu bar and
  preferences panel text from the xib.
- Wrap the app's hardcoded alert/dialog strings, the Mute/Unmute
  button, and the dynamic "Auto-pause <player>" menu item title in
  NSLocalizedString, with translations in zh-Hans.lproj/Localizable.strings.
- Add zh-Hans.lproj/InfoPlist.strings for the microphone and Apple
  Events permission prompts.

Verified with a Debug build (xcodebuild) and a real install: the menu
bar, preferences panel, and about panel display correctly in Chinese.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Covers strings that weren't in the xib and so weren't caught by the
MainMenu.strings pass: the code-built "Auto-pause Delays" preferences
submenu (BGMPreferencesMenu.mm), the runtime-set About panel version
string and license-load fallback (BGMAboutPanel.m), the generic
"Output Device" fallback label (BGMOutputVolumeMenuItem.mm), the
system sounds tooltip that was overwriting the xib's translated one
at runtime (BGMSystemSoundsVolume.mm), and the "More Apps" submenu /
"More options" accessibility label (BGMAppVolumes.m).

Found via real-machine testing (thanks to user feedback) after the
first pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nd Italian localizations

Extends the localization infrastructure added for zh-Hans to 8 more
languages (fr, de, es, ja, ko, pt-PT, ru, it): registers each in
knownRegions and CFBundleLocalizations, and adds MainMenu.strings,
Localizable.strings, and InfoPlist.strings for each.

Verified with a Debug build (xcodebuild); all 9 non-English locales
are present and correctly formed in the built app bundle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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