feat: add Japanese localization with react-i18next#249
Open
atani wants to merge 3 commits intoavihaymenahem:mainfrom
Open
feat: add Japanese localization with react-i18next#249atani wants to merge 3 commits intoavihaymenahem:mainfrom
atani wants to merge 3 commits intoavihaymenahem:mainfrom
Conversation
- Add i18next and react-i18next for internationalization - Create English (en.json) and Japanese (ja.json) translation files with 700+ translation keys covering all UI strings - Refactor 65+ components to use useTranslation() hook - Add language switcher in Settings > General (English / Japanese) - Persist language preference in SQLite, restore on startup - Default language auto-detected from OS locale - Refactor constants/shortcuts.ts to getShortcuts(t) factory - Add nameKey to color themes for translatable theme names - Initialize i18n in test setup with English translations
Round 1-3 review-fix loop results: - Refactor 14 additional components: ContextMenuPortal, CalDavSettings, AddCalDavAccount, ContactSidebar, SubscriptionManager, SmartLabelEditor, SmartFolderEditor, QuickStepEditor, TemplateEditor, ContactEditor, CalendarReauthBanner, EventDetailModal, ConfirmDialog, InputDialog, etc. - Translate entire help content system (1300+ lines, 14 categories, ~50 cards) via getHelpCategories(t) factory function - Add App.tsx sync status translations (syncing/complete/failed) - Fix SettingsPage.tsx remaining strings (categories, sidebar, DAY_NAMES) - Fix AddImapAccount.tsx placeholder strings - Fix networkErrors.ts with i18n.t() for non-component context - Fix App.tsx stale closure: use i18n.t() instead of hook t in useEffect - Add en/ja key parity test (1619 keys, perfect match) - Add getShortcuts(t) translated output tests - Add initImmediate: false for synchronous test setup
Replace hardcoded title attributes, placeholders, and text content with t() calls in RawMessageModal, ThreadCard, InlineReply, EmailRenderer, DateTimePickerDialog, ErrorBoundary, and SmartFolderEditor. Add 24 new translation keys to both en.json and ja.json.
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
This PR adds full Japanese localization support to Velo using react-i18next.
Test plan
npm run testpasses (134 files, 1566 tests)npx tsc --noEmitpasses with no type errorsnpx vitest run src/i18n/i18n.test.tsconfirms en/ja key parity