feat(dashboard): add Korean language support

Adds Korean (ko) as a supported dashboard locale alongside en, zh-CN, vi, ja.
Browser locales starting with `ko` (e.g. `ko-KR`) normalize to `ko` and the
Language switcher exposes "Korean" / "한국어" as a selectable option.

The full ~2670-key translation block was translated from the English source
with the formal-polite register (하십시오체) appropriate for an enterprise
dashboard. Technical names (CCS, Claude, CLIProxy, OAuth, provider names,
env vars, paths) are kept untranslated. All placeholders (e.g. {{name}},
{{count}}, {{provider}}) are preserved verbatim, matching the parity test.

Also backfills 23 keys missing from zh-CN, vi, and ja that were added to en
with the recent "Shared Resource Controls" feature (#1206 -> 2a422b3b):
accountsPage.resources*, accountsTable.{sharedResources,resourcesTitle,
resourcesShared,resourcesProfileLocal,badges.profileLocal},
commonToast.resourcesUpdated, and the full editAccountSharedResources
section. Without this backfill the existing i18n parity test was red for
all non-en locales on dev.

Closes #1241
This commit is contained in:
Tam Nhu Tran
2026-05-14 19:14:13 -04:00
parent 0213aac178
commit 8ad7653a2e
3 changed files with 2763 additions and 1 deletions
+2760
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,6 +1,6 @@
export const LOCALE_STORAGE_KEY = 'ccs-ui-locale';
export const SUPPORTED_LOCALES = ['en', 'zh-CN', 'vi', 'ja'] as const;
export const SUPPORTED_LOCALES = ['en', 'zh-CN', 'vi', 'ja', 'ko'] as const;
export type AppLocale = (typeof SUPPORTED_LOCALES)[number];
@@ -10,6 +10,7 @@ export function isSupportedLocale(locale: string): locale is AppLocale {
export function normalizeLocale(locale: string | null | undefined): AppLocale {
if (!locale) return 'en';
if (locale.toLowerCase().startsWith('ko')) return 'ko';
if (locale.toLowerCase().startsWith('ja')) return 'ja';
if (locale.toLowerCase().startsWith('zh')) return 'zh-CN';
if (locale.toLowerCase().startsWith('vi')) return 'vi';
@@ -96,6 +96,7 @@ describe('Dashboard i18n', () => {
it.each([
{ locale: 'vi', label: 'Vietnamese', browserLocale: 'vi-VN' },
{ locale: 'ja', label: 'Japanese', browserLocale: 'ja-JP' },
{ locale: 'ko', label: 'Korean', browserLocale: 'ko-KR' },
])(
'supports $locale locale in switcher and persistence',
async ({ locale, label, browserLocale }) => {