Fix lang detection for zh-TW (#7326)

It is ``TW``, not ``tw``
This commit is contained in:
XLion 2024-03-06 17:35:40 +08:00 committed by GitHub
parent fc149666d9
commit fccdc8ca1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,7 @@ pub fn translate_locale(name: String, locale: &str) -> String {
if lang.is_empty() {
// zh_CN on Linux, zh-Hans-CN on mac, zh_CN_#Hans on Android
if locale.starts_with("zh") {
lang = (if locale.contains("tw") {
lang = (if locale.contains("TW") {
"zh-tw"
} else {
"zh-cn"