From f8855e8b07529c4bd086a95fade453ebaac79f5a Mon Sep 17 00:00:00 2001 From: Benjiyaya Date: Wed, 16 Sep 2026 04:02:33 +0800 Subject: [PATCH] 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. --- calliope-web/src/lib/i18n.svelte.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/calliope-web/src/lib/i18n.svelte.ts b/calliope-web/src/lib/i18n.svelte.ts index 992b946f..daad168f 100644 --- a/calliope-web/src/lib/i18n.svelte.ts +++ b/calliope-web/src/lib/i18n.svelte.ts @@ -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 { let s: string = dictionaries[language.current][key] ?? (en as Record)[key] ?? key;