Conversation
The five unmanaged-file titles and headings used two phrasings in each language. One pattern now covers the family: files Homebrew did not install, and a single heading for the unexpected paths.
The console status uses 正在刷新 and 重新整理中. The reviewed sentences replace the formula upgrade summary, the Traditional unlinked-keg explanation, the Traditional warning note and the unbrewed-file titles the contributor specified.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Locale-specific regression coverage is ineffective and the architecture documentation contradicts the implemented title and caption localisation.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Localises recognised Doctor guidance and formula labels for Simplified and Traditional Chinese while preserving verbatim Homebrew output.
Changes:
- Adds presentation-layer localisation for recognised Doctor titles, prose and captions.
- Uses 配方 for Chinese formula labels and badges.
- Preserves remediation captions separated from lists by blank lines.
| File | Description |
|---|---|
Tests/BrewRepositoriesTests/DoctorBlankLineCaptionTests.swift |
Tests caption preservation. |
Tests/BrewFeatureDoctorTests/DoctorMessageCopyTests.swift |
Tests Doctor copy boundaries. |
Sources/BrewUIComponents/Resources/Localizable.xcstrings |
Adds translated formula badge. |
Sources/BrewUIComponents/Chrome/PackageKindChrome.swift |
Localises formula badges. |
Sources/BrewRepositories/DoctorOutputParser.swift |
Retains pending captions across blank lines. |
Sources/BrewFeatureInstalled/Resources/Localizable.xcstrings |
Translates installed formula labels. |
Sources/BrewFeatureDoctor/Views/DoctorView.swift |
Displays translated reassurance copy. |
Sources/BrewFeatureDoctor/Views/DoctorMessageCopy.swift |
Maps recognised Doctor wording to translations. |
Sources/BrewFeatureDoctor/Views/DoctorIssueRowView.swift |
Localises row titles. |
Sources/BrewFeatureDoctor/Views/DoctorIssueDetailView.swift |
Localises structured Doctor content. |
Sources/BrewFeatureDoctor/Views/DoctorCopy.swift |
Clarifies canonical wording usage. |
Sources/BrewFeatureDoctor/ViewModels/DoctorIssueItem.swift |
Localises accessibility titles. |
Sources/BrewFeatureDoctor/Resources/Localizable.xcstrings |
Adds Chinese Doctor translations. |
Sources/BrewFeatureDiscover/Resources/Localizable.xcstrings |
Translates Discover formula labels. |
Sources/BrewFeatureConsole/Resources/Localizable.xcstrings |
Translates refreshing status. |
README.md |
Documents Doctor localisation boundaries. |
ARCHITECTURE.md |
Documents verbatim and translated layers. |
AGENTS.md |
Records contributor localisation guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+63
to
+65
| format changes rather than assuming a fixed transcript. Doctor keeps its findings and raw transcript | ||
| in Homebrew's wording; only recognised explanations in the structured feature view are translated. | ||
| Unknown findings fall back to the original text, while the console and copied report remain unchanged. |
Comment on lines
+12
to
+15
| #expect(DoctorMessageCopy.title("Some installed formulae are deprecated or disabled.") == | ||
| "Some installed formulae are deprecated or disabled.") | ||
| #expect(DoctorMessageCopy.title("The following taps are not trusted:") == | ||
| "The following taps are not trusted:") |
Check recognised titles and captions against both Chinese catalogues so missing recognition cannot silently pass the tests. Keep normal bundle lookup unchanged and clarify the structured presentation and raw output boundary.
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.

What and why
After #187, a Chinese session still showed recognised Doctor explanations in English, and it still showed
Formula/FORMULAfor formulae. This localises known Doctor titles, prose and captions, and uses 配方 for formulae in both Chinese locales. That covers five existing Discover and Installed labels and the package-type badge on formula rows.Cask,CASK,Cellarandkegstay as Homebrew terms. Unknown Doctor wording falls back to the original text.Package names, tap names, paths, URLs, commands and arguments stay verbatim. The raw Doctor transcript and the copied report stay verbatim. The parser keeps a remediation caption when a blank line separates it from the following list. The Doctor catalogue gains 31 keys. The contributor docs record this boundary.
Homebrew's Simplified Chinese site copy has used 配方 since a merged 2017 change. The current Traditional Chinese page still says
formula, so 配方 there is a BrewUI terminology choice.The console status shown after a command, while the installed list reloads, is 正在刷新 in Simplified Chinese and 重新整理中 in Traditional Chinese. A review adjusted some Chinese sentences: the formula upgrade summary, the Traditional unlinked-keg explanation, the Traditional warning note and the specified unbrewed-file titles.
To reproduce the old behaviour, open BrewUI in Chinese. A recognised Doctor warning shows an English structured explanation, and formula rows are badged
FORMULA. With this branch that explanation and the badge are Chinese. The raw console stays English.Validation
Local environment: macOS 27.0 (26A428), Apple Silicon arm64, Xcode 27.0 (27A5237l), Apple Swift 6.4.
On
8dc01cd, localscripts/localize verifyandscripts/testpassed. zh-Hans and zh-Hant have no untranslated catalog strings.Local
scripts/test-e2epassed with no failures and no retries. The plan built and launched this branch's Debug app, 0.4.5 (1178).hellowas absent before the run and absent after it.Fork CI for
8dc01cd:The release
buildjob failed at Import signing certificates, before archive. This fork has no upstream signing secrets.A local Debug build of
cf7b9d9shows 配方 on formula rows in zh-Hans and zh-Hant.CASKstaysCASK.8dc01cdchanges Chinese catalog values only.DoctorMessageCopyTestscovers recognised wording and the verbatim fallback.DoctorBlankLineCaptionTestscovers the blank-line caption.Screenshots
Light appearance. Each table is one language and each cell is one capture. The lists use deterministic fixture data, not this machine's cellar. Commands, package names, paths,
Cask,CASK,Cellarandkegstay verbatim. The pane under the Doctor findings is the rawbrew doctortranscript.Before keeps the previous Chinese wording: formulae were still labelled
Formula/FORMULA, and recognised Doctor prose was still English. After uses 配方 and the translated Doctor prose.Those captures predate
8dc01cd. The Simplified upgrades summary in the screenshot still says 升级所有有新版本的配方. The catalog now says 升级所有可升级的配方. The Traditional Doctor screenshot still says 提交問題, 排查故障 and 無法正常執行. The catalog now says 回報問題, 除錯 and 無法正常運作. The console statusrefreshingis not in these captures.Simplified Chinese.
Traditional Chinese.
AI assistance
OpenAI Codex (GPT-6) implemented the change, wrote the translations and tests. Grok 4.7 captured the fixture screenshots linked above, applied the reviewed Chinese wording and the
refreshingtranslations in8dc01cd, ran localscripts/testandscripts/test-e2e, and rewrote this description from the branch diff and those checks.