feat(i18n): multi-language support (en/ja/de/es) foundation#1147
Open
JamieRuderman wants to merge 7 commits into
Open
feat(i18n): multi-language support (en/ja/de/es) foundation#1147JamieRuderman wants to merge 7 commits into
JamieRuderman wants to merge 7 commits into
Conversation
…ito to shared namespace
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a working multi-language (i18n) foundation across all three platforms (web portal, Electron desktop, Capacitor mobile) plus the Electron main process. Supports English (source/fallback) + Japanese, German, Spanish, with a language picker and OS-based auto-detection.
Because untranslated strings fall back to English, the app is shippable at every step — this PR lands the full infrastructure and a proven extraction template; the remaining bulk string extraction can follow incrementally.
What's included
frontend/src/i18n/) withapp/notices/cognitonamespaces. English bundled eagerly; ja/de/es lazy-loaded and code-split per locale. The existing Cognito auth module is folded into the shared instance.languagestate inmodels/ui.tsmirroring the existingthemeModepattern (localStorage, persists across logout). Defaultsystemfollows the OS/browser/device language vianavigator.language, re-resolved each launch.system(the default) matches the OS language on all three platforms; region tags degrade gracefully (ja-JP→ja, unknown→en). Standard "follow OS + in-app override" convention.OptionsPage.tsxwith native endonyms (日本語, Deutsch, Español).electron/src/i18n.ts+electron/src/locales/*.json); language synced from the renderer through the existing preferences channel (no new IPC).humanizeDuration()+getLocale()indateHelper.ts; luxon locale follows the app language.npm run i18n:extract(i18next-parser) andnpm run i18n:check(CI key-parity / empty-English gate).Cognito auth and OptionsPage are fully translated in all four languages (machine-seeded, pending professional review before production promotion).
Verified
{{device}},{{version}}) renders correctly in Japanese with adapted word order; unseeded keys fall back to English (returnEmptyString: false).i18n:checkpasses across all 4 locales / 3 namespaces.Remaining (follow-up work)
.tsxfiles (order: shell/nav → core surfaces → ~41 redux-model notice messages with plural fixes → long tail). Each batch: extract → parser → Sonnet-seed → parity gate.Decisions worth noting
t()return types into a union that breaks existing string usages and dynamic keys; the CI parity check covers correctness instead.🤖 Generated with Claude Code