Repository navigation
Conversation
Add Korean as a UI locale alongside zh/en/it/ru. The dictionary mirrors dict/en's per-domain split and covers every English entry plus all template, sound and music data names. Untranslated keys fall back to English (then Chinese), matching Italian. - locale: ko type, system-language detection, <html lang>, agent response language, top bar label 한 - dictRegistry: lazy ko chunk with EN/EN_DATA fallbacks - server: ui-locale accepts ko (English fallback); the phone upload page gets Korean copy - verify: ko/coverage.verify.ts (EN key coverage, placeholder parity, data names) in verify:i18n; ko cases in locale, dictRegistry, systemPromptOrder and mobile-upload verifies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds Korean (
ko) as a UI locale. It follows the Italian locale from #117 and uses the same per-locale lazy dictionary registry.Localization
kotoLocale/ALL_LOCALES. A browser language ofko*now defaults to Korean,<html lang>is set toko, and the agent's response-language prompt saysKorean.中 → EN → IT → RU → 한and shows한when Korean is active.src/i18n/dict/ko/. It uses the same per-domain split asdict/en(audio,captions,chat,components,editor,exportPanel,fx,library,media,review,settings,timeline,topbar,transcript), andindex.tsassembles the files. Eachko/<field>.tsholds the keys of the matchingen/<field>.tsin the same order. The EN filesgenerate/progress/scriptare intentionally empty, so they have no Korean counterpart.context.t()but have no EN entry yet (切换 WebCodecs…,素材「{name}」已存在。…). Their Korean entries sit inexportPanel.ts/media.ts.ko/templates-data.tscovers all 304 data display names: the 24 Chinese-key names for self-made templates (en/templates-data) and the 280 English-key names for built-in templates, sounds and music (zh/templates|sounds|music).koUI copy falls back to English, then to the Chinese key (uiFallback: EN). Data names fall back toEN_DATA, the same wiring asit. A string added to EN before Korean catches up shows in English, not Chinese.localized()inserver/ui-locale.tsaccepts an optionalkovariant and falls back to English. No server message has akovariant yet, so they all show in English for Korean users, the same as Italian today.server/mobile-upload-service.ts) gets a full Korean copy, and?locale=kois accepted.韩语(ko)), sosettingsMediaProviders.tsis unchanged.Out of scope
propSchemafield labels are English in the original source for every locale, so they stay as they are.src/agent/toolFailure.ts/serverRunToolEnvironment.ts(handled for zh/ru only) show English forko, the same asit.Verification
New executable check:
src/i18n/dict/ko/coverage.verify.ts, wired intonpm run verify:i18n. It asserts that every EN key has a non-empty Korean entry, that every Korean entry has the same{placeholder}set as its EN entry (or as the Chinese key when EN has none), and that every data name inEN_DATA+ZH_DATAhas a Korean display name.Extended checks:
src/i18n/locale.verify.ts: switching tokopersistscc.locale=koand sets<html lang="ko">.src/i18n/dictRegistry.verify.ts:koreadsKO, translates both Chinese-key and English-key data names, and is wired toEN/EN_DATAas fallbacks.src/agent/systemPromptOrder.verify.ts: thekoresponse-language prompt names Korean.server/mobile-upload-service.verify.ts: akosession serves<html lang="ko">with Korean copy.server/plugins/mobile-upload.verify.ts:?locale=koreachescreateSession('ko').Commands:
npm run lint: passes (exit 0; warnings only, all pre-existing)npm test: passes, 197/197 segments (631 registered verify files, including pretestverify:i18nand posttest)npm run build:tsc -bandvite buildpass, and so do the otherprebuildsteps (sync-shader-sources --check,sync:mediapipe,verify:server-tool-catalog). On the macOS machine used here,prebuild'ssync:whisper-clistops before compiling becausecmakeis not installed (cmake is required to build whisper.cpp). That step is environment-dependent and does not touch this change; CI runs the fullnpm run build.ko-*.js, ~202 kB / 72 kB gzip), so it does not grow the entry chunk.scripts/verify-gate-coverage.verify.mjsexemptssrc/i18n/dict/ko/settings.ts(531 lines) from the 500-line source limit, the same asen/settings.ts. It mirrorsen/settings.tskey for key and holds only dictionary data.Screenshots
Web mode with
localStorage['cc.locale'] = 'ko'.Home (project list)
Editor (example project)
Top bar language button (
한)Settings
Export dialog
Captions panel
🤖 Generated with Claude Code