chore(i18n): drop the dead toggleLanguage helper

It had no callers and its body hardcoded the en/zh pair, so it could not
have worked once the language set grew past two.
This commit is contained in:
Benjiyaya
2026-09-16 04:02:33 +08:00
parent a3588a2024
commit f8855e8b07
-4
View File
@@ -37,10 +37,6 @@ export function setLanguage(lang: Language) {
}
}
export function toggleLanguage() {
setLanguage(language.current === 'zh' ? 'en' : 'zh');
}
/** Look up a UI string. Falls back to English, then to the key itself. */
export function t(key: string, vars?: Record<string, string | number>): string {
let s: string = dictionaries[language.current][key] ?? (en as Record<string, string>)[key] ?? key;