Add Simplified Chinese and 8 more language localizations - #877
Open
qq3229311585-jpg wants to merge 3 commits into
Open
qq3229311585-jpg wants to merge 3 commits into
qq3229311585-jpg wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BGMApp had no localization infrastructure before this PR — only
Base.lprojexisted, with noNSLocalizedStringusage and no second language registered. This adds:zh-Hans,fr,de,es,ja,ko,pt-PT,ru,it) inknownRegionsandCFBundleLocalizations.MainMenu.stringsper language, translating the menu bar / preferences panel text that lives inMainMenu.xib.NSLocalizedString, with aLocalizable.stringsper language.InfoPlist.stringsper 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
%@/%ldare 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 buildsucceeds.plutil -lintthat all new.stringsfiles across all 9 languages are well-formed, and viaplutil -pon the built app bundle'sInfo.plistthatCFBundleLocalizationslists all 9 languages correctly.🤖 Generated with Claude Code