feat: complete zh-Hans and zh-Hant localization with human-reviewed polish - #3
Conversation
- Fill 490 missing string keys via Google Translate for both locales - Fix brand-name MT leaks (丁基→Dinky) via fix_brand_in_xcstrings - Apply 463 hand-curated corrections via correct_zh_translations.py (macOS standard terms, software terminology, wrong-sense fixes, Binky brand voice) - Translate Help.md for zh-Hans and zh-Hant from English - Add tools/correct_zh_translations.py to the toolchain - Update agents.md with architecture, build, and localization docs
- Fix 13 CRITICAL wrong-meaning entries (种类→整理, 小心→监视已关, etc.) - Standardize 排序→整理 across ~40 sort-related strings - Fix watch/monitoring terminology (观看/监控→监视) - Fix session terminology (会话→排序记录) - Fix routine terminology (常规→例程) - Fix undo terminology (撤消→撤销) - Improve brand voice and phrasing for natural Chinese - Apply HK/TW conventions for zh-Hant (常式, 檔案夾, 還原, etc.)
- zh-Hans: Finder→访达, Focus→专注模式, Finder tag wording fixes - zh-Hant: synced with HK/TW conventions (Finder stays Finder, 捷徑, 檔案夾, 專注模式, etc.) - zh-Hant: fixed 起搏→效能, 資料夾→檔案夾, 打開→開啟 consistency
✅ Deploy Preview for binkyfiles ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR completes Simplified Chinese (zh-Hans) and Traditional Chinese (zh-Hant) localization across Binky (app strings, Info.plist strings, and Help), and adds documentation + tooling to support the localization workflow.
Changes:
- Adds zh-Hans/zh-Hant translations across
Localizable.xcstringsandInfoPlist.xcstrings. - Replaces Help content with localized zh-Hans/zh-Hant versions.
- Introduces a Python correction tool for curated zh-Hans/zh-Hant fixes and documents the localization workflow in
agents.md.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Binky/Localizable.xcstrings | Adds large zh-Hans/zh-Hant coverage for user-facing strings. |
| Binky/InfoPlist.xcstrings | Adds Chinese localizations for Info.plist string keys. |
| Binky/Resources/zh-Hans.lproj/Help.md | Localized Simplified Chinese Help content. |
| Binky/Resources/zh-Hant.lproj/Help.md | Localized Traditional Chinese Help content. |
| tools/correct_zh_translations.py | Adds a post-processing tool to apply curated zh-Hans/zh-Hant overrides to the xcstrings catalog. |
| agents.md | Documents build/test, architecture, and localization workflow notes. |
Comments suppressed due to low confidence (4)
tools/correct_zh_translations.py:902
read_text()/write_text()are called without an explicit encoding. With Chinese content this can break on non-UTF-8 locales and is inconsistent with the other localization tools intools/which force UTF-8. Passencoding='utf-8'to both reads and writes.
def main():
data = json.loads(CAT.read_text())
total = 0
print("=== zh-Hans corrections ===")
total += apply_overrides(data, "zh-Hans", ZH_HANS)
print("\n=== zh-Hant corrections ===")
# Apply shared overrides first, then zh-Hant-specific ones
total += apply_overrides(data, "zh-Hant", ZH_HANT_SHARED)
total += apply_overrides(data, "zh-Hant", ZH_HANT)
CAT.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n")
print(f"\nApplied {total} corrections.")
tools/correct_zh_translations.py:110
- Several override keys don’t match the actual
Localizable.xcstringskeys due to punctuation differences, so the corrections won’t apply. Example: the catalog uses “That’s” (curly apostrophe), but the override key uses "That's" (ASCII). Consider copying keys directly from the xcstrings file or normalizing apostrophes/ellipsis before lookup.
"Binky watches here and runs the rules below. Different folder than the default? That's the point.":
"Binky 在此监视并运行下方规则。和默认文件夹不同?这正是重点。",
"Binky won't touch any file carrying one of these Finder tags — handy for shortcuts or files you've parked on purpose.":
tools/correct_zh_translations.py:114
- This override would revert the zh-Hans terminology normalization from “访达” back to “Finder” (the current catalog translations use “访达”). If the project standard is to localize Finder as “访达”, update these override values accordingly or remove them so the script doesn’t undo the polished translations.
"Binky won't touch any file carrying one of these Finder tags — handy for shortcuts or files you've parked on purpose.":
"带有这些 Finder 标签的文件 Binky 不会碰——适合你刻意保留的文件或快捷方式。",
"Binky exposes a Sort Files action in the Shortcuts app. Hand files from Finder or other actions through Binky — same routing rules as the main window.":
"Binky 在快捷指令 App 中提供\"整理文件\"操作。从 Finder 或其他操作将文件交给 Binky——使用与主窗口相同的路由规则。",
"Binky remembers %lld files.": "Binky 记住了 %lld 个文件。",
tools/correct_zh_translations.py:69
- There are duplicate keys in
ZH_HANS(e.g."Back"is defined twice with different values: “后退” and later “返回”). In Python dict literals, later entries silently overwrite earlier ones, which can hide mistakes and make the intended correction unclear. Remove duplicates (or assert uniqueness) to avoid accidental overrides.
"OK": "好",
"Nice": "不错",
"Got it": "知道了",
"Back": "后退",
"Forward": "前进",
"Close": "关闭",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import json | ||
| from pathlib import Path | ||
|
|
||
| CAT = Path("/Users/gyk/GitHubProjects/binky/Binky/Localizable.xcstrings") |
| "stringUnit" : { | ||
| "state" : "translated", | ||
| "value" : "Binky" | ||
| } |
| - **`BinkyTests/`** — XCTest unit tests (classification, tag composition, routines, WhereFroms). No UI tests. | ||
| - **`site/`** — marketing site deployed via Netlify (`netlify.toml` publishes `site/`). Compare pages, screenshots, `llms.txt`, `openapi.yaml`. | ||
| - **`Casks/`** — Homebrew cask definition. Updated automatically by `release.sh`. | ||
| - **`tools/`** — Python helper scripts for localization. All four currently hardcode Dinky's path — adjust before running on Binky. |
|
@SonettoGu14 thank you so much for taking the time to do this! This is now live in release 1.5.1 |
Summary
This PR adds full Simplified Chinese (zh-Hans) and Traditional Chinese (zh-Hant) localization to Binky, covering ~1,000+ user-facing strings across the app, Info.plist, and Help. All translations have been manually reviewed by a native Chinese speaker and verified with
xcodebuild test(all tests pass).Verification
xcodebuild test— Full test suite passes (all classification, tag composition, routines, and WhereFroms tests green).跑步sports mistranslations)文件不听话?)整理, "review" →待審, "routine" →例程/常式)Changes
Binky/Localizable.xcstrings— ~1,000 new zh-Hans and ~1,000 new zh-Hant string units across all existing keys.Binky/InfoPlist.xcstrings— zh-Hans and zh-Hant entries for Info.plist strings.Binky/Resources/zh-Hans.lproj/Help.md+Binky/Resources/zh-Hant.lproj/Help.md— Translated Help content.tools/correct_zh_translations.py— New helper for curated zh-Hans/zh-Hant corrections.agents.md— Updated with localization workflow notes.Sample translations
Commits
9b449f1bd5332b0ae3216a71131cFiles changed
Binky/Localizable.xcstringsBinky/InfoPlist.xcstringsBinky/Resources/zh-Hans.lproj/Help.mdBinky/Resources/zh-Hant.lproj/Help.mdtools/correct_zh_translations.pyagents.md