Repository navigation
Improve Simplified Chinese localization: complete fallbacks, add runtime-resolved strings, align terminology - #181
BruceQin520 wants to merge 1 commit into
Conversation
…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
|
Closing as superseded by #180, with part of this PR lifted into 3.1.0 under your name: the full-width punctuation on the nine legacy values (遇到问题?, 排序:最小优先 and friends), the "Older than 30 days / 6 months / a year" wording (超过 30 天 is the right filter semantics; #180's 30 天前 was not), and the Apple term for purgeable space. Why not this PR as the base: it adds 255 keys only to zh-Hans, so the English key parity test fails, and 109 of the 255 keys cannot be reached with main's code because the strings were harvested from the running UI rather than from the source. 88 of them sit behind String-typed parameters (ApplicationUpdater, ProtectionAudit, PerformanceInspector, DuplicateFinder, StatusChip(label:), NSOpenPanel titles, the filter enums rendered with Text($0.rawValue)) that only resolve once the Swift side passes LocalizedStringKey, which #180 does, and 21 are accessibility-tree fragments ("24 found", "CARE", "Excluded from cleanup: " with a trailing space) or parser literals no view ever looks up. One translation to flag: "Clear" = 无需清理 reads "nothing to clean", but the key's only use on main is the clear-selection button in Duplicate Finder. Your translations of the 50 fallbacks and the terminology choices were good; please base a follow-up on main once 3.1.0 lands. |
…nbasel#180 and momenbasel#167 German gets English fallbacks for the 406 keys the other locales received in momenbasel#180, so the catalogs stay in parity, and its "Clear" now matches the clear-selection button that key is used for. The "1 files" and "3 file(s)" strings momenbasel#180 introduced go back to proper singular and plural forms through "1 file", "1 folder", "%lld files" and "%lld folders" keys in every locale. zh-Hans takes the full-width punctuation, the "Older than" wording and Apple's term for purgeable space from momenbasel#181 by @BruceQin520. The zh-Hans-only completeness test is removed: the repo convention is English fallbacks for new keys, and that test would fail on every future key until it is translated.
Improve Simplified Chinese localization (zh-Hans)
Summary
This PR completes and improves the Simplified Chinese (
zh-Hans) localization. No code changes are involved — onlyzh-Hans.lproj/Localizable.strings.PureMacandCPUintentionally kept.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.,:?()in Chinese context, per Apple UI style.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→ 扫描这台 MacTerminology 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):Used/Purgeable/Available(Smart Care dashboard)Focused utilities for storage, apps, and system maintenance(Tools section caption)Full access/Ready for protected locationsConsider routing these through
Text("…")/LocalizedStringKeyso they can be localized; happy to supply the missing translations once they are catalog-driven.Testing
plutilvalidation passes.