fix(l10n): 以简体中文统一英文与繁体翻译并校验完整性

This commit is contained in:
2026-11-03 20:39:06 +08:00
parent 1f02810b9a
commit 3b1e711556
11 changed files with 688 additions and 503 deletions
+6
View File
@@ -26,6 +26,12 @@ import Foundation
let locale = Locale(identifier: language)
precondition(AppLocalization.string("settings.title", locale: locale, bundle: bundle) == title)
precondition(AppLocalization.string("accent.custom", locale: locale, bundle: bundle) == custom)
for (table, key) in [("StatusItem", "status.open"), ("Process", "copyPID"), ("CPUDetails", "cpu.kind.efficiency")] {
let value = AppLocalization.string(key, locale: locale, bundle: bundle, table: table)
precondition(!value.isEmpty && value != key, "Missing built translation: \(language)/\(table)/\(key)")
}
let average = AppLocalization.string("gpu.recentAverage", locale: locale, bundle: bundle)
precondition(average == ["en": "Last-minute average", "zh-Hans": "近 1 分钟平均", "zh-Hant": "近 1 分鐘平均"][language])
}
print("PASS: system matching, explicit override, fallback, preference roundtrip, built three-language resources")
}