feat(i18n): add Korean as a selectable UI language - #355
Open
siakun wants to merge 1 commit into
Open
Conversation
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.
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
Adds Korean (
ko) as a fourth UI language, alongside 简体中文, 繁體中文 and English.src/i18n/ko.jsonis a complete translation ofen.json: all 916 keys, noneadded or dropped, and every
{{interpolation}}placeholder identical in name andcount to the English source. Key order matches
en.json, so the two files stayeasy to diff against each other as strings are added.
The wiring is small:
src/i18n/index.ts—koadded toresourcesandSUPPORTED_LANGUAGESsrc/views/Settings.tsx—한국어added to the language pickerscripts/prepare-release.mjs—ko.jsonadded to the files whosesettings.versionis bumped, so the version shown in About cannot drift awayfrom
package.jsonOne decision worth a maintainer's eye:
fallbackLngfallbackLngchanges from the string"zh"to a per-language map:zh,zh-TWandenkeep exactly the behaviour they have today — they stillfall back to
zh. Onlykodiffers: it tries English first.The reason is what happens in the window between a feature landing and its
translation catching up.
zh-TW.jsonis currently missing some keys and fallsback to
zh, which works out fine — a reader of Traditional Chinese can act onSimplified Chinese. A Korean reader cannot, so an untranslated key is strictly
more useful in
enthan inzh.Happy to drop this and use a plain
"zh"fallback if you would rather keep theconfig a single string.
Translation conventions used
Two things a reviewer may notice when reading
ko.jsonbesideen.json:labels and tab titles are noun phrases with no verb ending. That register
split is the normal convention in Korean desktop UI.
correct particle (
을/를,이/가,으로/로) depends on whether thepreceding word ends in a consonant, which is not knowable at runtime for a
skill or agent name. Strings such as
Delete skill "{{name}}" permanently?arephrased 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 forword onto the English clause order.
Verification
Branched from
v1.29.0.npm run lint— cleannpm run build— cleannpm run release:prepare -- patch --dry-run— 1.29.0 -> 1.29.1, withko.jsonpicked up alongside the other locales
en.json— 916/916 keys, 0 missing, 0 extra, 0placeholder mismatches, identical key order
npm run tauri:devand walked the Dashboard and the fullSettings page in Korean, including the language picker and the About panel
Not included
No
READMEorCHANGELOGchanges, matching how feature commits are handled inthis repo — release notes are written when
prepare-releaseruns. Glad to add aKorean README or a changelog entry here instead if you would prefer that.