feat: add Traditional Chinese (zh-Hant) language option (#23322)

The zh-Hant translations are synced from Weblate (98% complete) but the
locale was never registered in the language selector, so users could not
select it. Register zh-Hant in supportedLanguageKeys, add its display
label, and map it to the zh-TW date-fns locale.
This commit is contained in:
Ban 2026-05-27 21:04:41 +08:00 committed by GitHub
parent 39a3667f39
commit 88f944fe81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 0 deletions

View File

@ -177,6 +177,7 @@
"en": "English (English)", "en": "English (English)",
"es": "Español (Spanish)", "es": "Español (Spanish)",
"zhCN": "简体中文 (Simplified Chinese)", "zhCN": "简体中文 (Simplified Chinese)",
"zhHant": "繁體中文 (Traditional Chinese)",
"hi": "हिन्दी (Hindi)", "hi": "हिन्दी (Hindi)",
"fr": "Français (French)", "fr": "Français (French)",
"ar": "العربية (Arabic)", "ar": "العربية (Arabic)",

View File

@ -109,6 +109,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
"nb-NO": "nb", "nb-NO": "nb",
"yue-Hant": "yue", "yue-Hant": "yue",
"zh-CN": "zhCN", "zh-CN": "zhCN",
"zh-Hant": "zhHant",
"pt-BR": "ptBR", "pt-BR": "ptBR",
}; };

View File

@ -34,6 +34,8 @@ const localeMap: Record<string, () => Promise<Locale>> = {
sk: () => import("date-fns/locale/sk").then((module) => module.sk), sk: () => import("date-fns/locale/sk").then((module) => module.sk),
"yue-Hant": () => "yue-Hant": () =>
import("date-fns/locale/zh-HK").then((module) => module.zhHK), import("date-fns/locale/zh-HK").then((module) => module.zhHK),
"zh-Hant": () =>
import("date-fns/locale/zh-TW").then((module) => module.zhTW),
lt: () => import("date-fns/locale/lt").then((module) => module.lt), lt: () => import("date-fns/locale/lt").then((module) => module.lt),
th: () => import("date-fns/locale/th").then((module) => module.th), th: () => import("date-fns/locale/th").then((module) => module.th),
ca: () => import("date-fns/locale/ca").then((module) => module.ca), ca: () => import("date-fns/locale/ca").then((module) => module.ca),

View File

@ -29,6 +29,7 @@ export const supportedLanguageKeys = [
"nb-NO", "nb-NO",
"sv", "sv",
"zh-CN", "zh-CN",
"zh-Hant",
"yue-Hant", "yue-Hant",
"ja", "ja",
"vi", "vi",