Skip to content

feat(i18n): add Korean as a selectable UI language - #355

Open
siakun wants to merge 1 commit into
xingkongliang:mainfrom
siakun-forks:feat/korean-locale
Open

feat(i18n): add Korean as a selectable UI language#355
siakun wants to merge 1 commit into
xingkongliang:mainfrom
siakun-forks:feat/korean-locale

Conversation

@siakun

@siakun siakun commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Adds Korean (ko) as a fourth UI language, alongside 简体中文, 繁體中文 and English.

src/i18n/ko.json is a complete translation of en.json: all 916 keys, none
added or dropped, and every {{interpolation}} placeholder identical in name and
count to the English source. Key order matches en.json, so the two files stay
easy to diff against each other as strings are added.

The wiring is small:

  • src/i18n/index.tsko added to resources and SUPPORTED_LANGUAGES
  • src/views/Settings.tsx한국어 added to the language picker
  • scripts/prepare-release.mjsko.json added to the files whose
    settings.version is bumped, so the version shown in About cannot drift away
    from package.json

One decision worth a maintainer's eye: fallbackLng

fallbackLng changes from the string "zh" to a per-language map:

fallbackLng: { ko: ["en", "zh"], default: ["zh"] }

zh, zh-TW and en keep exactly the behaviour they have today — they still
fall back to zh. Only ko differs: it tries English first.

The reason is what happens in the window between a feature landing and its
translation catching up. zh-TW.json is currently missing some keys and falls
back to zh, which works out fine — a reader of Traditional Chinese can act on
Simplified Chinese. A Korean reader cannot, so an untranslated key is strictly
more useful in en than in zh.

Happy to drop this and use a plain "zh" fallback if you would rather keep the
config a single string.

Translation conventions used

Two things a reviewer may notice when reading ko.json beside en.json:

  • Sentences addressed to the user use the polite declarative form; buttons,
    labels and tab titles are noun phrases with no verb ending.
    That register
    split is the normal convention in Korean desktop UI.
  • Korean particles are never attached directly after an interpolation. The
    correct particle (/, /, 으로/) depends on whether the
    preceding word ends in a consonant, which is not knowable at runtime for a
    skill or agent name. Strings such as Delete skill "{{name}}" permanently? are
    phrased so that a Korean noun follows the placeholder, or restructured into
    label: {{value}} form. That is why a few Korean strings do not map word for
    word onto the English clause order.

Verification

Branched from v1.29.0.

  • npm run lint — clean
  • npm run build — clean
  • npm run release:prepare -- patch --dry-run — 1.29.0 -> 1.29.1, with ko.json
    picked up alongside the other locales
  • Key parity check against en.json — 916/916 keys, 0 missing, 0 extra, 0
    placeholder mismatches, identical key order
  • Ran the app with npm run tauri:dev and walked the Dashboard and the full
    Settings page in Korean, including the language picker and the About panel

Not included

No README or CHANGELOG changes, matching how feature commits are handled in
this repo — release notes are written when prepare-release runs. Glad to add a
Korean README or a changelog entry here instead if you would prefer that.

Adds src/i18n/ko.json, a full translation of en.json — all 916 keys, no
key added or dropped, every interpolation placeholder unchanged — and
registers ko in the i18next resources, the supported-language list, and
the Settings language picker.

Korean falls back to English before Chinese, unlike the other locales.
A key added to en.json but not yet translated would otherwise surface as
Chinese to a Korean reader, so fallbackLng becomes a per-language map
that leaves zh, zh-TW and en on their existing chain.

prepare-release.mjs bumps ko.json's settings.version alongside the other
locales, so the version shown in About cannot drift from package.json.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant