Skip to content

feat(i18n): vue-i18n framework + shell strings (English + Japanese baseline)#102

Open
Nic-dorman wants to merge 2 commits into
mainfrom
feat/i18n-phase-1
Open

feat(i18n): vue-i18n framework + shell strings (English + Japanese baseline)#102
Nic-dorman wants to merge 2 commits into
mainfrom
feat/i18n-phase-1

Conversation

@Nic-dorman
Copy link
Copy Markdown
Contributor

Summary

  • Wire vue-i18n@11 with tauri-plugin-os locale detection, a persisted i18n_locale config field, and a Settings → Language picker (with System default: <OS-native name> for the follow-system option).
  • Extract shell strings to locales/en.json and ship a machine-translated locales/ja.json baseline (flagged with _machine_translated: true).
  • Covered surface: sidebar nav, banners, network indicator, page titles, header connection pills, active-transfers counter, Connect Wallet.

Pages / components / toast messages / validators are untouched — that sweep follows in a separate PR.

Test plan

  • App launches in English when i18n_locale is unset and the OS is en-*.
  • Settings → Language picker shows "System default: English" as the first option.
  • Switching to 日本語 flips the sidebar, header, page titles, and connection pills to Japanese without a reload.
  • Selection persists across app restart.
  • Switching back to "System default" clears the persisted choice (verify ~/.config/autonomi/ant-gui/config.tomli18n_locale absent / null).
  • No [i18n] Not found warnings in the dev console after the shell renders in either locale.

🤖 Generated with Claude Code

…seline)

Plumbs vue-i18n@11 with tauri-plugin-os locale detection, a persisted
i18n_locale config field, and a Settings → Language picker showing
"System default: <OS-native name>" for the follow-system option.

Extracts shell strings — sidebar nav, page titles, header connection
pills, active transfers, Connect Wallet — to locales/en.json with a
machine-translated locales/ja.json baseline. ja.json is flagged with
_machine_translated: true; community polish to follow.

Pages, components, toast strings, and validators are untouched — that
sweep follows in a separate PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vue-i18n's LocaleMessage type requires every value to be a string or
nested message object, so the boolean _machine_translated: true flag
failed nuxi typecheck:

    Property '"_machine_translated"' is incompatible with index signature.
    Type 'boolean' is not assignable to type 'LocaleMessageValue<…>'.

Rename to _translator_notes and put the same signal in a sentence —
satisfies the type system and reads more naturally for a contributor
who lands in ja.json from a PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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