fix(l10n): 以简体中文统一英文与繁体翻译并校验完整性
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user