fix(ui): 校正三语指标文案并核对构建包译文

This commit is contained in:
2026-11-16 00:17:42 +08:00
parent 3ee6b45eb4
commit 36518d29db
10 changed files with 172 additions and 38 deletions
+6 -1
View File
@@ -36,7 +36,12 @@ import Foundation
let expected = ["en": "Fan", "zh-Hans": "风扇", "zh-Hant": "風扇"][language]!
precondition(title == "\(expected) \(number)", "Numbered fan must use the selected app locale")
}
let minutes = AppLocalization.string("duration.minutes %lld", locale: locale, bundle: bundle)
let hours = AppLocalization.string("duration.hours %@", locale: locale, bundle: bundle)
let durations = [String(format: minutes, Int64(45)), String(format: hours, "1.5")]
let expectedDurations = ["en": ["45 min", "1.5 h"], "zh-Hans": ["45 分钟", "1.5 小时"],
"zh-Hant": ["45 分鐘", "1.5 小時"]]
precondition(durations == expectedDurations[language])
}
print("PASS: system matching, explicit override, fallback, preference roundtrip, built three-language resources")
}