Skip to content

feat: complete zh-Hans and zh-Hant localization with human-reviewed polish - #3

Merged
heyderekj merged 5 commits into
heyderekj:mainfrom
SonettoGu14:feat/chinese-localization
May 13, 2026
Merged

feat: complete zh-Hans and zh-Hant localization with human-reviewed polish#3
heyderekj merged 5 commits into
heyderekj:mainfrom
SonettoGu14:feat/chinese-localization

Conversation

@SonettoGu14

Copy link
Copy Markdown
Contributor

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).
  • Manual review — Each string checked by a native Chinese speaker for:
    • Semantic correctness (no "Runs" → 跑步 sports mistranslations)
    • Brand voice consistency (playful taglines adapted rather than literal: "Files acting up?" → 文件不听话?)
    • Terminology normalization ("sort" → 整理, "review" → 待審, "routine" → 例程/常式)
    • Correct treatment of brand name "Binky" (not transliterated)

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

English zh-Hans zh-Hant
Files acting up? Pop in a Binky. 文件不听话?塞个 Binky。 檔案不聽話?塞個 Binky。
Same pacifier, different crib. 同一套规则,另一处归宿。 同一套規則,另一處歸宿。
Quiets the mess right down. 搞定一切。 搞定一切。
All caught up. 已是最新。 已是最新。
Your rules. Your Mac. No guessing. 你的规则,你的 Mac,不用猜。 你的規則,你的 Mac,不用猜。
The pacifier for your folders. 文件夹的守护者。 檔案夾的守護者。

Commits

Commit Description
9b449f1 feat: complete zh-Hans and zh-Hant localization
bd5332b fix: polish zh-Hans/zh-Hant translations after human review
0ae3216 fix: sync zh-Hans Finder→访达 and phrasing edits to zh-Hant
a71131c fix: zh-Hans/zh-Hant corrections — brand voice, terms, grammar, and consistency

Files changed

File + / −
Binky/Localizable.xcstrings +17k / −9k
Binky/InfoPlist.xcstrings +6 / 0
Binky/Resources/zh-Hans.lproj/Help.md +53 / −53
Binky/Resources/zh-Hant.lproj/Help.md +53 / −53
tools/correct_zh_translations.py +906 / 0
agents.md +63 / 0

- 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
Copilot AI review requested due to automatic review settings May 13, 2026 03:17
@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for binkyfiles ready!

Name Link
🔨 Latest commit c6aa5ef
🔍 Latest deploy log https://app.netlify.com/projects/binkyfiles/deploys/6a0404fe72c67f0008a60842
😎 Deploy Preview https://deploy-preview-3--binkyfiles.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.xcstrings and InfoPlist.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 in tools/ which force UTF-8. Pass encoding='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.xcstrings keys 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")
Comment thread Binky/InfoPlist.xcstrings
"stringUnit" : {
"state" : "translated",
"value" : "Binky"
}
Comment thread agents.md
- **`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.
@heyderekj
heyderekj merged commit 17b0516 into heyderekj:main May 13, 2026
5 checks passed
@heyderekj

Copy link
Copy Markdown
Owner

@SonettoGu14 thank you so much for taking the time to do this! This is now live in release 1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants