Add pt-BR localization support + language picker structure#76
Open
edufalcao wants to merge 5 commits intomomenbasel:mainfrom
Open
Add pt-BR localization support + language picker structure#76edufalcao wants to merge 5 commits intomomenbasel:mainfrom
edufalcao wants to merge 5 commits intomomenbasel:mainfrom
Conversation
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
This PR supersedes and references the closed localization PR #42.
PR #42 introduced Brazilian Portuguese (
pt-BR) localization support, the language picker infrastructure, and supporting localization/test changes. After #42 was closed,mainmoved forward with overlapping work in Docker Cache localization, Spanish localization, and CLI launch handling. This PR rebases that work onto the currentmainand addresses the reviewer feedback from #42 so the Portuguese localization can be reviewed against the latest codebase.Reference: #42
Work Carried Over From #42
PureMac/pt-BR.lproj/Localizable.strings.pt-BRin the Xcode project so the localization is bundled with the app.AppLanguagePreferences.AppleLanguagesoverride used by macOS bundle localization.xcodebuild.Changes Specific To This New PR
main.-psn_<pid>launch argument filtering from Add pt-BR localization support #42.Localizable.stringswith the Docker Cache keys that landed after Add pt-BR localization support #42.es) localization key coverage for the expanded localization surface introduced by this PR.es,en, andpt-BRremain compatible.ja) localization key coverage for the expanded localization surface.zh-Hant) Node Cache and Docker Cache keys.*.lproj/Localizable.stringsfile and fails if any locale has missing or extra keys compared with English.pt-BRtranslations for the Node Cache and Docker Cache strings:Node Cachenpm, yarn, and pnpm download cachesnpm cacheyarn classic cachepnpm content-addressable storeDocker CacheDocker images, containers, and build cacheReclaimable (run \docker system prune -af`)`es) localization precedent now present onmainwhile bringing it to the same key coverage aspt-BR.project.ymlafter the rebase so the project file includes current upstream localizations, the new Portuguese localization, and the unit test target without stale conflict artifacts.Reviewer Notes
-psn_filtering.AppleLanguages;AppleLanguagesis only used as the macOS bundle-localization mechanism.xcodebuild test.Localization Consistency Guard
This PR now includes
LocalizationFilesTests, an XCTest case that loads everyPureMac/*.lproj/Localizable.stringsfile from the source tree and compares its keys againsten.lproj/Localizable.strings.This is important because the app uses the English strings as localization keys. If one locale is missing a key, users in that language can see fallback English text or untranslated key text in parts of the UI. If a locale has extra keys, it usually means a stale or mistyped localization entry exists and the files are starting to drift. Both cases make future localization updates harder to review because each language no longer represents the same UI surface.
The new test enforces that all supported languages stay structurally consistent:
esjapt-BRzh-Hanszh-HantWhile adding this test, it caught real gaps in the existing localization files. This PR therefore also completes the missing Japanese keys and the missing Traditional Chinese Node/Docker cache keys so the test can enforce parity for every bundled language, not only the newly added Portuguese localization.
Verification
Ran the following checks after the rebase:
plutil -lint PureMac/en.lproj/Localizable.strings PureMac/es.lproj/Localizable.strings PureMac/pt-BR.lproj/Localizable.strings PureMac/ja.lproj/Localizable.strings PureMac/zh-Hans.lproj/Localizable.strings PureMac/zh-Hant.lproj/Localizable.stringsenxcodebuild test -project PureMac.xcodeproj -scheme PureMac -destination 'platform=macOS' -only-testing:PureMacTests/LocalizationFilesTests CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY=''xcodebuild test -project PureMac.xcodeproj -scheme PureMac -destination 'platform=macOS' -only-testing:PureMacTests CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY=''xcodebuild -project PureMac.xcodeproj -scheme PureMac -configuration Debug -destination 'platform=macOS' build CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY=''Results:
plutil -lint.en.AI Assistance Disclosure
This contribution was implemented with assistance from OpenAI Codex under human direction. The human maintainer provided the task, reviewed the previous PR feedback, requested the rebase and PR follow-up, and directed publication of this updated branch for review.