feat(desktop): add Japanese, Korean, and Traditional Chinese UI locales#717
Conversation
Add jp / kr / zh-TW translations and wire them into the i18n runtime so the desktop app can switch among English, Simplified Chinese, Traditional Chinese, Japanese, and Korean. - new locale files jp.ts / kr.ts / zh-TW.ts with full TranslationKey coverage - register the locales in the i18n index and extend the Locale union - accept the new codes in settingsStore.getStoredLocale (default stays zh) - add language-switcher entries (简体中文 / 繁體中文 / 日本語 / 한국어) - localize chat message timestamps: Han 年月日 for zh/zh-TW/jp, Intl ko-KR for kr - extend the DATE_LOCALES map in ActivitySettings (ja-JP / ko-KR / zh-TW) - tests: formatMessageTimestamp locale branches + i18n locale resolution Korean terminology follows the Microsoft Korean localization style guide (새로 고침 / 사용·사용 안 함 / 이름 바꾸기, 합니다-style sentences). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR quality triageChanged areas: area:desktop CLI core policy: No CLI-core policy block detected. Missing-test policy: No missing-test policy block detected. Coverage baseline policy: No coverage-baseline policy block detected. CLI core files:
Coverage policy files:
Expected checks:
Test coverage signals:
Risk notes:
Hard merge gates still come from GitHub Actions, not AI review. Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask: @dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact. |
|
請您在確認下看看內容可不可以 |
|
感谢贡献,最近发了一个大版本 0.4.0,你可能需要把最新版本的主分支同步到里的分支里面去,然后再补一下其他文件的多语言一些改动。 |
|
不用客氣,我很佩服您可以寫這麼的工具,0.4.0 發布嗎 |
Main added two TranslationKeys after this branch's base — 'thinking.labelDone' (the "Thought" label shown after thinking completes) and 'slashCmd.agent.description' — which the jp/kr/zh-TW locale files did not yet cover, so the Record<TranslationKey, string> contract failed tsc after merging main. Add both keys to each new locale: - jp: '思考完了' / '選択した Agent でプロンプトを実行' - kr: '사고 완료' / '선택한 Agent로 프롬프트 실행' - zh-TW: '已思考' / '使用指定 Agent 執行提示' en/zh are unchanged. `tsc --noEmit` is now clean and the i18n + timestamp suites pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
我已经补了一些修复了,合并到main |
What
Add three UI locales to the desktop app — Japanese (
jp), Korean (kr), and Traditional Chinese (zh-TW) — and wire them into the i18n runtime. Users can now switch among English / 简体中文 / 繁體中文 / 日本語 / 한국어 in Settings → General → Language.Changes
desktop/src/i18n/locales/{jp,kr,zh-TW}.tswith fullTranslationKeycoverage (1585 keys each, identical key set toen.ts).i18n/index.tsand extend theLocaleunion.settingsStore.getStoredLocalevalidates and accepts the new codes (default stayszh).Settings.tsx(简体中文 / 繁體中文 / 日本語 / 한국어).formatMessageTimestamp.ts: Han年月日for zh / zh-TW / jp, andIntlko-KR(년/월/일, never Han) for Korean.DATE_LOCALESmap inActivitySettings.tsx(ja-JP/ko-KR/zh-TW).새로 고침,사용 / 사용 안 함,이름 바꾸기, 합니다-style sentences).Tests
desktop/src/lib/formatMessageTimestamp.test.ts— jp / kr / zh-TW date-format branches.desktop/src/i18n/index.test.tsx— every registered locale resolves, plus param interpolation.Local verification
cd desktop && bun run lint→ 0 errorscd desktop && bunx vitest run→ 128 files / 1066 tests pass (incl. 9 new)bun run verify(root PR gate) — desktop lane passed.Risk
Frontend-only locale addition. No behavior change for the existing
en/zhdefaults; the message-timestamp refactor keepsenandzhoutput byte-identical (covered by existing tests).