fix(ui): 校正三语指标文案并核对构建包译文
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user