feat: add i18n infrastructure with Chinese (简体中文) language support#441
Open
WanderLandWalker wants to merge 14 commits into
Open
feat: add i18n infrastructure with Chinese (简体中文) language support#441WanderLandWalker wants to merge 14 commits into
WanderLandWalker wants to merge 14 commits into
Conversation
- Initialize i18next + react-i18next with key=fallback pattern - Add en.json (English source) and zh.json (Chinese translations) - Wrap all 5 renderer entry points with I18nextProvider - Translate all core UI components (Settings, Sidebar, Dashboard, AgentPane, Onboarding, Connections, Pill, Logs, etc.) - Translate chat modules (ChatPane, ChatTurn, ToolBlock, AskForm, etc.) - Translate tool labels and spinner verb presets - Add language switcher in Settings → Language - Update README with i18n badge and documentation - Update CONTRIBUTING with i18n contribution guide - Language preference persisted in localStorage
- Add README.zh.md with full Chinese translation - Add CONTRIBUTING.zh.md with full Chinese contribution guide - Add language switcher at top of all 4 doc files - Clean up inline bilingual sections from English docs
There was a problem hiding this comment.
8 issues found across 47 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
- Configure i18next custom interpolation (prefix: '$') so /
placeholders resolve correctly with { '1': val, '2': val } syntax
- Fix HubApp.tsx: use original English string for resume prompt
(backend does string comparison)
- Fix DomainList.tsx: put count inside single t() call
- Fix OnboardingApp.tsx: use <Trans> for sentence with <strong>
- Fix SettingsPane.tsx: translate spinner labels at render time
(not module-load time)
- Fix spinnerVerbs.ts: revert module-level i18n.t() calls
- Add shortcutDesc locale key for Trans component
# Conflicts: # app/src/renderer/hub/chat-v2/AskForm.tsx # app/src/renderer/hub/chat-v2/OptionList.tsx
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
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
Add full i18n (internationalization) infrastructure with built-in Chinese (简体中文) and English language support.
Changes
i18n Infrastructure
hub/,onboarding/,pill/,popup/,logs/) wrapped with<I18nextProvider>localStorageLocale Files
app/src/renderer/locales/en.json— 433 English source stringsapp/src/renderer/locales/zh.json— 433 Chinese (simplified) translationsComponents Translated
All core UI components covered: SettingsPane, Sidebar, Dashboard, AgentPane, HubApp, OnboardingApp, ConnectionsPane, KeybindingsOverlay, CommandBar, TaskInput, Navbar, MemoryIndicator, Pill, LogsApp, Toast, EnginePicker, etc.
Chat modules: ChatPane, ChatTurn, ToolBlock, ChatTranscript, BrowserPreview, TerminalSpinner, CodeBlock, AskForm, OptionList
Tool labels & spinner presets: toolLabels.ts (~130 tool verb phrases), spinnerVerbs.ts (7 presets)
Settings UI
Documentation
README.md— added bilingual sections (English + Chinese)CONTRIBUTING.md— added bilingual i18n guide for translatorsHow to Test
Notes
{locale}.json, add all keys fromen.json, add option inSettingsPane.tsxSummary by cubic
Adds full i18n across the app with English and Simplified Chinese (简体中文), plus a language switcher in Settings. All UI text and aria labels load from locale files with an English-as-key fallback.
New Features
i18next+react-i18next; addeden.jsonandzh.json(726 strings) and wrapped renderer roots (hub/,onboarding/,pill/,popup/,logs/) inI18nextProvider.localStorage.README.zh.mdandCONTRIBUTING.zh.mdwith doc language switchers.Bug Fixes
$) and moved runtime-only translations to render-time; preserved required English literals for backend string comparisons.OptionListafter upstream merge.CookieBrowser.tsxheader strings and toast messages in i18n; added cookie sync descriptions to locale files.CookieBrowser.tsx(e.g., “just now”, “5m ago”).Written for commit 4ba5d97. Summary will update on new commits. Review in cubic