Files
lms-fe/docs/localization.md
chyoo d44180db67 feat: add Korean-English localization and light theme
Localize studio, curriculum, visualization and loading interfaces. Add persistent language and theme settings, refine module loading states, and normalize remote shell locales.
2026-09-29 13:27:11 +09:00

2.2 KiB

Korean and English UI

Use the language selector at the top of the studio settings screen (local or remote workspace). Select a language and press Save to apply it. Unsaved choices do not change the UI or stored preference. Korean is the default. The choice is stored under autonomy-studio.lms.language in local storage and applies on the next launch. Switching language updates React subscribers without remounting the workspace, terminal, editor, or visualization iframe.

Scope

  • App navigation, curriculum UI, studio controls, settings, dialogs and help.
  • Known application status/error messages and NAV2/SLAM viewer controls.
  • Course titles, learning content, materials, module names, source code, terminal output and server-authored notifications remain in their original language.
  • Unrecognized backend/SSH/Docker errors are preserved verbatim for diagnosis.
  • Embedded text in guide images and external pages is not translated.
  • This does not change ROS, Docker, SSH, the OS locale, or module parameters.

Adding Text

Use t('Korean source text') from src/renderer/src/i18n at the display boundary and add the English value to en.json. Call useLocaleRender() in components which render translations so an open screen reacts to language changes.

Keep identifiers and state values unchanged. Do not translate stored form values, parameter strings, module identifiers, or values used in conditions. Use whole sentences with named interpolation placeholders instead of joining translated fragments. Korean falls back to the source key; unknown messages retain the source.

The standalone SLAM viewer uses public/slam-viewer/locale.js and explicitly marked text/attributes. It follows the same saved preference through storage events, without reconnecting the bridge or resetting the scene.

Verification

npm run test:i18n
npx tsc --noEmit -p tsconfig.web.json
npm run build

The tests cover language persistence, storage failure, cross-window updates, interpolation, source fallback and literal translation-key coverage. Browser checks should additionally cover both languages, narrow studio panels, preserving unsaved edits, and language changes with the viewer open. npm run build does not package an AppImage.