feat(i18n): UI Korean translation #6349
Conversation
This reverts commit b6bcaf4.
|
Thanks for your first pull request! 🎉 A maintainer will review it soon. While you wait, please make sure:
We aim to provide initial feedback within 7 days. See CONTRIBUTING.md for details. |
houko
left a comment
There was a problem hiding this comment.
i18n wiring and locale registration look correct. Two categories of issues need fixing before merge: broken variable interpolation syntax (runtime bug) and several mistranslations that produce wrong Korean meaning (likely from uncorrected machine translation).
Generated by Claude Code
There was a problem hiding this comment.
Broken i18next interpolation (runtime bug — blocks variables from rendering)
Four values use {{name}word } instead of the correct {{name}}word syntax.
The closing }} is replaced by a single } followed by a space, so the variable is never substituted at runtime — users see the raw placeholder literal.
Known occurrences (search for {{name} without a closing }}):
"{{name}제거 }"— agent/skill remove action"{{name}업데이트 }"— update action"{{name}에 파일 추가 }"— file-add action"{{name}설치 중 }…"— install progress
Each should be "{{name}}제거", "{{name}} 업데이트", etc. (match the spacing convention of the en.json source key).
Mistranslations that produce wrong meaning (should be corrected before merge)
| Key (approximate) | Current ko value |
Meaning of current value | Correct Korean |
|---|---|---|---|
"save" |
"구하다" |
to rescue / save a life | "저장" |
"hide" |
"숨다" |
to hide oneself (reflexive) | "숨기기" |
"browse" (skills) |
"먹다" |
to eat | "탐색" |
"latency" (providers) |
"숨어 있음" |
lurking / lying in wait | "지연 시간" |
"nominal" (status) |
"명사 같은" |
noun-like (grammatical term) | "정상" |
Weekday short forms ("중", "티", …) |
Romanized-letter approximations | — | Standard Korean abbreviations: 월 화 수 목 금 토 일 |
static/locales/ko.json structure mismatch
The file added at crates/librefang-api/static/locales/ko.json uses a completely different top-level key structure (btn, label, stat, card) compared to the dashboard src/locales/ko.json.
Please confirm these two files are consumed by different consumers that expect different shapes, or align them if they're both meant to serve the same i18n namespace.
Generated by Claude Code
houko
left a comment
There was a problem hiding this comment.
Three findings:
1. Malformed i18next interpolation in src/locales/ko.json
"skill_remove": "{{name}제거 }"The variable substitution is broken — the closing }} is split by the Korean text, so {{name}} is never closed before the Korean characters. The key will render as the raw template string at runtime. Should be:
"skill_remove": "{{name}} 제거"2. Multi-line header comment block in i18n/ko.toml (CLAUDE.md: "never write multi-paragraph docstrings or multi-line comment blocks — one short line max"):
# LibreFang i18n — Korean (ko)
#
# 이 파일은 번역 가능한...
# 런타임은 실제 번역...
# 이 TOML 파일은 사람이...Please condense to one line (or remove the prose lines entirely — the filename already identifies the language).
3. Missing trailing newline in both src/locales/ko.json and static/locales/ko.json (both end with \ No newline at end of file). The other locale files (en, uk, zh) end with a newline; please add one to each.
Generated by Claude Code
houko
left a comment
There was a problem hiding this comment.
Three issues found — the placeholder bug is a hard blocker.
1. Broken i18next placeholder syntax (blocker — 9 keys)
Korean text was inserted inside the closing }} instead of after it. i18next will fail to interpolate these at runtime and render the raw template string to users.
| Key | Current (broken) | Should be |
|---|---|---|
skill_remove |
"{{name}제거 }" |
"{{name}} 제거" |
evo_update_title |
"{{name}업데이트 }" |
"{{name}} 업데이트" |
evo_upload_title |
"{{name}에 파일 추가 }" |
"{{name}}에 파일 추가" |
input_placeholder_with_agent |
"{{name}에 명령 전송 }..." |
"{{name}}에 명령 전송..." |
installing |
"{{name}설치 중 }…" |
"{{name}} 설치 중…" |
filter_by_action |
"{{action}기준으로 필터링 }" |
"{{action}} 기준으로 필터링" |
wizard_step_back_aria |
"{{n}단계로 돌아가기 }" |
"{{n}}단계로 돌아가기" |
of_cap |
"{{cap}중 }" |
"{{cap}} 중" |
The pattern is consistent: every {{var}Korean text } should be {{var}} Korean text.
2. Wrong translation (1 key)
"browse": "먹다",먹다 means "to eat." The correct UI translation for "browse" is 탐색하다 or 찾아보기 depending on context.
3. Missing trailing newline (minor)
ko.json ends without a newline character (\ No newline at end of file). The other locale files end with a newline; ko.json should match for POSIX compliance and git diff cleanliness.
Key coverage looks complete — no keys appear to be missing in either direction against the English locale. The JSON structure is valid. Once the placeholder syntax and mistranslation are fixed this should be ready.
Generated by Claude Code
* feat(i18n): complete Korean error translations (43 → 233 keys) After #6349, ko/errors.ftl shipped 43 of the 233 api-error-* keys; the remaining 190 resolved to the raw message-key literal for Korean clients because a non-English Fluent bundle is built from that language alone with no English fallback resource. Translate the remaining 190 messages, preserving every Fluent placeholder, and restructure the file to mirror en/errors.ftl exactly (same section comments, same key order). The 43 prior human-reviewed translations are reused verbatim. * fix(i18n): correct Korean proactive-memory term and unify imperative register api-error-memory-not-enabled: 사전 메모리 → 능동적 메모리. '사전' reads as dictionary / prior, distorting 'proactive'; 능동적 메모리 matches the dominant rendering already shipped in the dashboard ko.json (memory.proactive_memory). api-error-tool-invoke-disabled / api-error-tool-requires-agent: normalize the trailing imperative from -하세요 to the catalog-dominant formal -하십시오. --------- Co-authored-by: Evan <[email protected]>
Type
Summary
Dashboard interface's Korean translation(i18n)
Changes
Added the Korean (.ko) translation file and updated the dashboard source file to apply the changes. Most of the translation was initially performed by AI/Google Translate and subsequently reviewed by a human.
See diffs.
Attribution
Co-authored-by, commit preservation, or explicit credit in the PR body)Testing
cargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepassesSecurity