feat: add Traditional Chinese (繁體中文) translation (#2770)

- Add res/values/strings_zh_TW.arb with Traditional Chinese translations
- Update lib/entities/language_service.dart to include zh_TW locale
- Update tool/utils/translation/translation_constants.dart to include zh-tw

This adds full Traditional Chinese (Taiwan) language support with proper
Taiwan-specific terminology (e.g., 啟用, 新增, 進階設定, 簽帳金融卡, etc.)

All simplified Chinese characters have been converted to traditional Chinese.
This commit is contained in:
ImL1s
2025-12-30 00:17:30 +01:00
committed by GitHub
parent 40abcef6f3
commit 478cb5320a
3 changed files with 1185 additions and 10 deletions
+11 -9
View File
@@ -17,7 +17,8 @@ class LanguageService {
'pt': 'Português (Portuguese)',
'ru': 'Русский (Russian)',
'uk': 'Українська (Ukrainian)',
'zh': '中文 (Chinese)',
'zh': '简体中文 (Chinese Simplified)',
'zh_TW': '繁體中文 (Chinese Traditional)',
'hr': 'Hrvatski (Croatian)',
'it': 'Italiano (Italian)',
'th': 'ภาษาไทย (Thai)',
@@ -50,6 +51,7 @@ class LanguageService {
'ru': 'rus',
'uk': 'ukr',
'zh': 'chn',
'zh_TW': 'twn',
'hr': 'hrv',
'it': 'ita',
'th': 'tha',
@@ -81,15 +83,15 @@ class LanguageService {
static Future<String> localeDetection() async {
try {
var locale = await Devicelocale.currentLocale ?? '';
locale = Intl.shortLocale(locale);
var locale = await Devicelocale.currentLocale ?? '';
locale = Intl.shortLocale(locale);
if (list.keys.contains(locale)) {
return locale;
}
return LanguageService.defaultLocale;
} catch(_) {
return LanguageService.defaultLocale;
if (list.keys.contains(locale)) {
return locale;
}
return LanguageService.defaultLocale;
} catch (_) {
return LanguageService.defaultLocale;
}
}
}
File diff suppressed because it is too large Load Diff
@@ -2,5 +2,5 @@ const defaultLang = "en";
const langs = [
"ar", "bg", "cs", "de", "en", "es", "fr", "gn", "ha", "hi", "hr", "hy", "id", "it",
"ja", "ko", "my", "nl", "pl", "pt", "ru", "th", "tl", "tr", "uk", "ur", "yo",
"vi", "zh-cn" // zh, but Google Translate uses zh-cn for Chinese (Simplified)
"vi", "zh-cn", "zh-tw" // zh-cn for Chinese (Simplified), zh-tw for Chinese (Traditional)
];