Conversation
新增应用级英文源与简体中文词条,覆盖导航、数量、时间、错误、辅助功能和控制台诊断标签,并让已知 brew doctor 文案在展示层翻译。保留包名、配置字段、命令及原始输出,补充目录完整性、诊断行为和中文界面测试,同时调整最小窗口尺寸以满足实际内容布局。
将中文界面数量、诊断状态和配置标题的查询改为匹配直接元素。 避免 containing 查询后代元素导致 CI UI 测试误判失败,恢复测试对目标文本的正确定位。
按 macOS AX 快照同时匹配静态文本的 label 与 value,并复用页面对象和诊断信息,提升本地化 UI 测试在实际可访问性树上的稳定性。E2E 启动固定英语环境,避免共享英文断言受机器语言设置影响。
MikeMcQuaid
requested changes
Sep 14, 2026
MikeMcQuaid
left a comment
Member
There was a problem hiding this comment.
We now have 4 initial localisation PRs. No more than one of them (perhaps zero) will be merged.
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
Add Simplified Chinese (
zh-Hans) support to the Homebrew GUI, following the macOS application language preference with English fallback. For example, Installed package counts, upgrade actions, errors and the Doctor task label now render in Chinese when the app launches in Chinese.Refs #164. This implements the localization contribution requested in the issue discussion; it does not add an in-app language selector.
Changes
Testing
GitHub Actions on
66a9453: all 48 UI tests pass, including both Chinese localization scenarios. Build/unit/integration tests, Swift Quality and live E2E canaries also pass. CI run.scripts/test— both Swift packages pass, including the new catalog and diagnostic translation tests.mint run swiftformat --lint .,mint run swiftlint lint --strict, and BrewUILint over the fullHomebrew+Sourcesproduction tree.Xcode application build and UI-test build succeed using local development signing.
Direct fixture-backed native UI smoke: Chinese navigation, package counts/details, upgrades, Discover, configuration chrome, missing-Homebrew errors, console controls and translated Doctor paragraphs. Checked rendered screenshots and accessibility text; commands and raw logs remain intact.
XCTest UI execution: the local runner is terminated by Gatekeeper before connecting, including after its development signature validates. No system security policy was changed. The new UI tests are compiled but have not executed successfully locally.
Live
scripts/test-e2ewas not run; manual smoke used the repository's fake Homebrew fixtures, not real package mutations.PR checklist
Follow-ups
An in-app language selector is outside this change. Homebrew may introduce or reword diagnostics; unmatched prose remains in its original language until a corresponding translation is added.