Skip to content

feat(i18n): add Korean (ko) translation for the CLI/TUI#6356

Merged
houko merged 1 commit into
mainfrom
i18n/cli-ko
Jun 29, 2026
Merged

feat(i18n): add Korean (ko) translation for the CLI/TUI#6356
houko merged 1 commit into
mainfrom
i18n/cli-ko

Conversation

@houko

@houko houko commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the Korean (ko) locale for the CLI / TUI.

Before this PR, crates/librefang-cli/locales/ shipped only en, zh-CN, and uk.
Korean users saw the entire terminal surface — the launcher, the init wizard, every TUI screen (agents, workflows, triggers, memory, extensions, skills, dashboard), doctor, and status — in English, even though the dashboard SPA and the backend error catalog already had Korean.
This was the last runtime surface without ko.

Changes

  • Add crates/librefang-cli/locales/ko/main.ftl — all 1906 message keys, translated.
  • The file mirrors en/main.ftl exactly: identical key order, section comments, multiline value blocks, and the four { $count -> [one] … *[other] … } plural selectors. A new key added to en shows up as a one-line diff against ko.
  • Wire ko into crates/librefang-cli/src/i18n.rs: add KO_FTL, extend SUPPORTED_LANGUAGES, and add the bundle_for match arm — the same three-point pattern the other locales use. detect_system_language() now also resolves a ko* system locale.
  • Add renders_korean_translation next to the existing zh/uk tests. It fails closed: a Fluent parse error in ko/main.ftl makes init("ko") fall back to English, so the assertion catches a malformed bundle.

What is intentionally left in English

Brand / product names (OpenAI, Telegram, Claude Code, …), shell commands and anything copy-pasteable (librefang start, pip install librefang-sdk, librefang auth pool add …), CLI flags, config keys and file names (agent.toml, secrets.env, manifest.json), URLs, env vars, trigger-type enum names (AgentSpawned, Webhook, …), and single-token identifiers (API, ID, URL, PID).
Keyboard hints keep their key tokens (↑↓, j/k, Enter, Esc, PgUp) and translate only the action words.

Verification

  • Structural parity: ko/main.ftl re-parsed with the same message/comment/blank tokenizer yields a record skeleton identical to en/main.ftl (same 1906 keys, same comments, same multiline / selector blocks) — 0 structural drift.
  • Placeholder parity: the { $var } multiset matches the English source for every one of the 1906 keys — 0 mismatches.
  • Brace balance: ko and en each have 807 { / 807 } — no stray Fluent braces introduced.
  • Plural selectors and their [one] / *[other] variants are preserved verbatim in all four count messages.
  • renders_korean_translation (runs in the unit-fast CI lane) validates that the bundle parses and loads.

Notes

These are first-pass translations following the glossary established for the dashboard and error-catalog Korean work; a native Korean-speaker review before the next release is welcome.

The CLI/TUI had locales for en, zh-CN, and uk only; Korean users saw the entire terminal interface (launcher, init wizard, all TUI screens, doctor, status) in English even though the dashboard and backend error catalog already shipped ko.

Add locales/ko/main.ftl mirroring en/main.ftl exactly — same key order, comments, multiline blocks, and plural selectors — covering all 1906 message keys. Brand names, shell commands, identifiers, and config keys are intentionally left untranslated. Wire ko into i18n.rs (KO_FTL, SUPPORTED_LANGUAGES, bundle_for) and add renders_korean_translation, which fails closed if the bundle does not parse (a parse error makes init fall back to English).
@github-actions github-actions Bot added the size/XL 1000+ lines changed label Jun 29, 2026
@houko
houko enabled auto-merge (squash) June 29, 2026 05:13
@houko
houko merged commit 14fc960 into main Jun 29, 2026
32 checks passed
@houko
houko deleted the i18n/cli-ko branch June 29, 2026 05:22
@houko houko mentioned this pull request Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL 1000+ lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant