Skip to content

Feat/locale ja - #466

Open
Zulfazli (fazelllyyy) wants to merge 1 commit into
microsoft:devfrom
fazelllyyy:feat/locale-ja
Open

Zulfazli (fazelllyyy) wants to merge 1 commit into
microsoft:devfrom
fazelllyyy:feat/locale-ja

Conversation

@fazelllyyy

Copy link
Copy Markdown

Summary

Adds full Japanese (ja) support for the frontend i18n system, following the same pattern as #436 (Hindi) and #463 (Indonesian). Related to #337 (International Language Support).

Changes

  • New locale bundle src/i18n/locales/ja/ — all 10 domains translated (common, upload, chart, model, encoding, messages, navigation, dataLoading, loader, errors) plus the index.ts aggregator
  • Registered ja in src/i18n/locales/index.ts and in the resources map in src/i18n/index.ts (it flows automatically into SUPPORTED_UI_LANGUAGES)
  • Extended tests/frontend/unit/app/i18nLocales.test.ts with a ja-vs-en key-parity test
  • No changes needed in src/app/App.tsx (ja: '日本語' label already existed) or in the backend ("ja" already exists in LANGUAGE_DISPLAY_NAMES along with its polite-form extra rule, so agent language instructions work out of the box)

Translation notes

  • Polite Japanese (です/ます体) throughout all user-facing strings, per the repo's rule for Japanese
  • Translation keys untouched; all {{interpolation}} placeholders, _plural forms, and inline HTML tags (<refreshAction>, <strong>) preserved verbatim
  • Untranslatable identifiers kept in English per TRANSLATION_GUIDE.md (chart types, channel keys, spec values); tooltips (encoding.channel*_tip, chart.templateNames.*) translated instead
  • Commands, code snippets, paths, and URLs in loader.json left literal
  • chart.vegaLocale localized (Japanese day/month names, 午前/午後 periods); no code change needed in vega-locale.ts

Verification

  • JSON validity: all 10 files parse cleanly
  • Key parity across bundles (same spread-merge semantics as index.ts): en/hi/zh/id/ja each resolve to exactly 1860 keys — 0 missing, 0 extra, 0 placeholder/tag mismatches
  • New unit test asserts ja key alignment with en
  • Note: a full vitest/tsc run was not possible in this environment (no node_modules available); please rely on CI

Translate all 10 frontend locale domains into Japanese in polite desu/masu form (1860 keys, full parity with en). Register the bundle in locales/index.ts and i18n/index.ts, and cover key parity with a unit test. The language switcher label and backend language support for Japanese already existed, so no changes were needed there.
@Chenglong-MS
Chenglong Wang (Chenglong-MS) changed the base branch from main to dev September 29, 2026 05:20

This branch has not been deployed

No deployments
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.

1 participant