Skip to content

feat(i18n): add Korean locale - #49

Merged
harry0703 merged 1 commit into
harry0703:mainfrom
omninodeindex0-ui:feat/i18n-ko-kr
Sep 10, 2026
Merged

harry0703 merged 1 commit into
harry0703:mainfrom
omninodeindex0-ui:feat/i18n-ko-kr

Conversation

@omninodeindex0-ui

@omninodeindex0-ui omninodeindex0-ui commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Add Korean (ko-KR) as a fifth UI language. macOS in Korean currently falls back to English because ko has no locale registered; Korean users now get a native UI automatically and can also pick 한국어 in Settings.

Changes

  • src/locales/ko-KR.json — full translation of every shared key (2,350 strings: the 2,349 existing keys plus settings.languageNames.koKR). Style follows Apple/Microsoft Korean UI conventions: noun-form labels for controls, polite formal sentences (합쇼체) for descriptions/dialogs, endonym language names, official OS terms (전체 디스크 접근 권한, 시스템 설정, 로그인 항목, 작업 표시줄, 파일 탐색기 …). Plural messages use a single segment (Korean has no grammatical plural), except the three-segment zero-case message which keeps all three.
  • Registration: LANGUAGE_IDS.koKR / LANGUAGE_OPTIONS (browser prefix ko, websitePath: '' because mangodisk.app/ko does not exist yet), src/i18n.ts, src/locales/modules/ko-kr.ts, vite.config.ts locale chunk pattern, scripts/check-build-output.mjs, scripts/check-i18n-usage.mjs.
  • settings.languageNames.koKR added to all five locale files.
  • Tests: src/i18n.test.ts (label map, resolveSupportedLanguage(['ko-KR'])/['ko'], plural interpolation) and src/lib/utils/project-website.test.ts.
  • README.ko.md + Korean link in the language menu of the other READMEs. It reuses the English screenshot assets; swap to screenshots/ko/* once they exist.

Expected Impact

Korean-language users get a fully localized app (all pages, dialogs, cleanup rule names/descriptions/impacts, AI panel). No behavior change for other locales; Rust code is untouched (valid_language_tag already accepts ko-KR).

Validation

  • pnpm check:frontend — source-architecture, i18n usage, style-system, lint (0 warnings), prettier, vitest 133 files / 706 tests, build (check-build-output verifies 5 locale chunks; locale-ko-kr chunk 237 KB, under the 280 KB limit)
  • cargo test --manifest-path src-tauri/Cargo.toml -p mangodisk-core — 636 passed
  • pnpm check — every frontend stage and rust:fmt:check pass; rust:clippy fails on my machine with two clippy-1.98-only lints (chunks_exact_to_as_chunks, map_or_identity) in mangodisk-platform that reproduce on unmodified main (Homebrew Rust 1.98 vs the pinned 1.88 toolchain), so they are out of scope here.
  • Independent translation review pass (34 findings: 32 applied, 2 intentionally kept) plus a script checking key parity, placeholder sets, plural segments, trailing-period rule, empty values and glossary consistency (0 violations).
  • Local pnpm tauri build --bundles app --no-sign on macOS 26 (Apple silicon): every page, the Settings language picker, About/update dialog and AI settings were checked in light and dark themes; a Korean macOS picks ko-KR automatically on first launch and switching languages applies immediately.
  • Windows was not validated (no Windows machine available). Windows-specific strings follow Microsoft's Korean UI terminology but were reviewed only in the JSON.

Risks

  • Korean strings are generally shorter than English but a few labels are longer than Japanese; no truncation was observed at the default window size on macOS. Windows layouts were not checked visually.
  • websitePath is empty, so the About dialog links to the English site for Korean users until a /ko page exists.

Next Steps

  • Korean screenshot assets for README.ko.md.
  • A /ko website route so websitePath can point to it.

Add ko-KR as a fifth UI language alongside en-US, zh-CN, zh-TW and ja-JP.

- src/locales/ko-KR.json: full translation of every shared key (2,349
  strings, aligned with the zh-CN key set) following Apple/Microsoft
  Korean UI conventions: noun-form labels for controls, polite formal
  sentences for descriptions and dialogs, endonym language names,
  single plural segment (no grammatical plural in Korean) except the
  three-segment zero-case message.
- Register the locale in LANGUAGE_IDS / LANGUAGE_OPTIONS (browser prefix
  `ko`, no localized website path yet), the vue-i18n message graph, the
  vite locale chunk pattern, check-build-output and check-i18n-usage.
- Add `settings.languageNames.koKR` to every locale resource.
- Extend i18n and project-website tests with ko-KR expectations.
- Add README.ko.md and link it from the other README language menus
  (screenshots reuse the English assets until Korean ones exist).

Validated on macOS 26: pnpm check:frontend (706 tests, build verifies
5 locale chunks; locale-ko-kr chunk 237 KB), cargo test -p mangodisk-core,
and a local `tauri build` run through every page in light and dark
themes. Windows was not validated. Rust code is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@harry0703

Copy link
Copy Markdown
Owner

Thank you for contributing Korean support and for the detailed translation and validation work! The integration looks good overall. I also ran the frontend checks locally: all 706 tests passed, and the build produced all five locale chunks successfully.

I noticed one small, non-blocking test coverage gap in src/i18n.test.ts: localeResources still contains only the original four languages. Could you import ko-KR.json and add it to that array? This will include Korean in the existing shared-key, non-empty string, trailing-period, and cleanup-rule completeness checks.

To verify the gap, I temporarily set the Korean common.cancel string to an empty value in an isolated checkout, and all nine i18n tests still passed. The current translation is not empty; this is about keeping future translation changes covered by the same checks as the other languages.

Thanks again for making MangoDisk more accessible to Korean-speaking users!

@omninodeindex0-ui

Copy link
Copy Markdown
Contributor Author

CI note: both "Run Rust tests" failures look unrelated to this PR, which does not touch src-tauri/ (git diff origin/main..HEAD -- src-tauri is empty). "Run static checks" (pnpm check, including clippy on the pinned toolchain) passed on both runners.

  • macos-latest — mangodisk_platform::macos::change_tracking::tests::pending_wait_observes_delayed_cancel panicked at change_tracking.rs:1015 ("cancellation polling must not wait for the full query timeout"). It asserts elapsed < 75 ms wall-clock, so it is timing-sensitive on shared runners; the same test failed at the same line in run 32480339708 on an unrelated PR (2026-08-21). It passes locally here (3/3).
  • windows-latest — four mangodisk-core Windows path-normalization tests (root_validation.rs:187, session.rs:179, windows_observations.rs:701, catalog.rs:750). All four were introduced in 30838ef ("fix(windows): unify filesystem identity handling"); I could not find a CI run in which they have passed since then, so they may need a look on main independently of this change.

Happy to rebase or re-run once those are addressed.

@harry0703
harry0703 merged commit 87c9f11 into harry0703:main Sep 10, 2026
0 of 2 checks passed
@harry0703

Copy link
Copy Markdown
Owner

Merged via rebase, keeping the history linear and preserving your original authorship and co-author credit.

I also added Korean to the shared locale-resource checks in a small follow-up commit: 8ca1919. The full frontend checks pass with all 706 tests, and I verified that an empty Korean translation now correctly fails the validation test.

Thank you for the thorough Korean translation, documentation, and the helpful investigation into the CI failures! The existing Rust test failures still need separate follow-up. I appreciate your contribution to making MangoDisk accessible to Korean-speaking users.

@omninodeindex0-ui

Copy link
Copy Markdown
Contributor Author

Thank you for the quick review and for adding the shared-resource coverage in 8ca1919. I went through the remaining tests that enumerate locales and found five component tests still listing only the original four; I've opened a small test-only follow-up in #50 that adds ko-KR to those fixtures.

@omninodeindex0-ui
omninodeindex0-ui deleted the feat/i18n-ko-kr branch September 10, 2026 07:15
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.

2 participants