feat: add i18n infrastructure with Chinese (简体中文) language support
Summary
Add full i18n (internationalization) infrastructure with built-in Chinese (简体中文) and English language support.
Changes
i18n Infrastructure
- Initialize i18next + react-i18next with key = fallback pattern (English text = translation key)
- All 5 renderer entry points (
hub/,onboarding/,pill/,popup/,logs/) wrapped with<I18nextProvider> - Language preference persisted in
localStorage
Locale Files
app/src/renderer/locales/en.json— 433 English source stringsapp/src/renderer/locales/zh.json— 433 Chinese (simplified) translations
Components 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
- Language dropdown added to Settings → Language (English / 简体中文)
Documentation
README.md— added bilingual sections (English + Chinese)CONTRIBUTING.md— added bilingual i18n guide for translators
How to Test
- Launch the app
- Go to Settings → Language
- Switch to 简体中文
- All UI strings should display in Chinese
Notes
- Missing keys fall back gracefully to English (key = fallback)
- To add a new locale: create
{locale}.json, add all keys fromen.json, add option inSettingsPane.tsx
Summary 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
- Integrated
i18next+react-i18next; addeden.jsonandzh.json(726 strings) and wrapped renderer roots (hub/,onboarding/,pill/,popup/,logs/) inI18nextProvider. - Added Settings → Language with preference saved in
localStorage. - Localized core UI and chat modules, tool labels, and spinner presets; added
README.zh.mdandCONTRIBUTING.zh.mdwith doc language switchers.
- Integrated
-
Bug Fixes
- Configured custom interpolation (prefix
$) and moved runtime-only translations to render-time; preserved required English literals for backend string comparisons. - Localized empty/error states, titles, and aria labels across components; re-applied i18n in
OptionListafter upstream merge. - Wrapped remaining
CookieBrowser.tsxheader strings and toast messages in i18n; added cookie sync descriptions to locale files. - Localized relative time strings in
CookieBrowser.tsx(e.g., “just now”, “5m ago”).
- Configured custom interpolation (prefix