Skip to content

Improve Simplified Chinese localization: complete fallbacks, add runtime-resolved strings, align terminology - #181

Open
BruceQin520 wants to merge 1 commit into
momenbasel:mainfrom
BruceQin520:improve-zh-hans-localization
Open

BruceQin520 wants to merge 1 commit into
momenbasel:mainfrom
BruceQin520:improve-zh-hans-localization

Conversation

@BruceQin520

Copy link
Copy Markdown

Improve Simplified Chinese localization (zh-Hans)

Summary

This PR completes and improves the Simplified Chinese (zh-Hans) localization. No code changes are involved — only zh-Hans.lproj/Localizable.strings.

  • Fill the 52 English-fallback entries in the zh-Hans catalog (the ones marked "English fallback, pending translation") — 50 translated; PureMac and CPU intentionally kept.
  • Add 255 entries for UI strings that already resolve through the strings catalog at runtime (SwiftUI Text("…") lookup), e.g. the Smart Care dashboard, Protection audit, Performance launch items table, Duplicate Finder empty state, Homebrew update flow. These were extracted as exact runtime literals, so they take effect without code changes.
  • Terminology alignment with Apple's Simplified Chinese conventions (13 entries): 「储存空间」 instead of 「存储空间」 (matches macOS System Settings), unified 「扫描这台 Mac」, 「用户级代理」 (avoids ambiguity with HTTP User-Agent, pairs with 「系统级代理」), etc.
  • Punctuation normalization (≈66 entries): full-width ,:?() in Chinese context, per Apple UI style.
  • No keys removed; additions are inert for any string the app looks up differently.

Examples

Fallback entries translated:

  • %lld checks: %lld checks → %lld 项检查
  • Ready to reclaim: Ready to reclaim → 待释放
  • Installed apps: Installed apps → 已安装应用
  • Scan My Mac: Scan My Mac → 扫描这台 Mac

Terminology polish on existing translations:

  • Storage: 存储 → 储存空间
  • macOS blocks PureMac from cleaning caches and uninstalling apps until you grant access.: 在你授予访问权限之前,macOS 会阻止 PureMac 清理缓存和卸载应用。 → 在你授予访问权限之前,macOS 会阻止 PureMac 清理缓存和卸载应用。
  • Currently in: %@: 当前: %@ → 当前: %@
  • Trouble?: 遇到问题? → 遇到问题?
  • In System Settings, do this:: 在“系统设置”中执行以下操作: → 在“系统设置”中执行以下操作:
  • Sorted: Smallest First: 排序:最小优先 → 排序:最小优先

New entries for code-side literals (sample):

  • Smart Care = "智能呵护";
  • Scan this Mac = "扫描这台 Mac";
  • Mac storage = "Mac 储存空间";
  • Protection = "防护";
  • Uninstaller = "卸载器";
  • Choose Folder = "选择文件夹";
  • %lld found = "找到 %lld 项";
  • User agent = "用户级代理";

Notes / follow-ups

A few strings appear to be rendered via Text(verbatim:) and cannot be localized through the catalog (confirmed at runtime — the catalog already contains Chinese values for them, but the UI keeps English):

  • Storage legend: Used / Purgeable / Available (Smart Care dashboard)
  • Focused utilities for storage, apps, and system maintenance (Tools section caption)
  • Sidebar footer: Full access / Ready for protected locations

Consider routing these through Text("…")/LocalizedStringKey so they can be localized; happy to supply the missing translations once they are catalog-driven.

Testing

  • macOS 26 (Apple Silicon), PureMac 3.0.0.
  • Verified at runtime via the accessibility tree across Smart Care, Protection, Performance, App Updates, Duplicate Finder pages: previously-English UI now renders in Simplified Chinese; plutil validation passes.

…ime-resolved strings, align terminology

- Translate the 50 zh-Hans entries marked as English fallback (PureMac/CPU kept as-is)
- Add 255 entries for UI literals that resolve through the catalog at runtime
  (Smart Care dashboard, Protection audit, Performance launch items, Duplicate
  Finder, Homebrew updates, etc.), extracted as exact runtime strings
- Align terminology with Apple Simplified Chinese conventions (储存空间, 扫描这台 Mac,
  用户级代理), unify duplicated button labels
- Normalize punctuation to full-width in Chinese context (~66 entries)
- No keys removed; 397 -> 652 entries

This branch has not been deployed

No deployments
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.

1 participant