Skip to content

feat(i18n): add Simplified Chinese localization for web, desktop, and mobile - #8073

Open
ZhiweiXiao98 wants to merge 17 commits into
pingdotgg:mainfrom
ZhiweiXiao98:feature/i18n-zh-cn
Open

feat(i18n): add Simplified Chinese localization for web, desktop, and mobile#8073
ZhiweiXiao98 wants to merge 17 commits into
pingdotgg:mainfrom
ZhiweiXiao98:feature/i18n-zh-cn

Conversation

@ZhiweiXiao98

@ZhiweiXiao98 ZhiweiXiao98 commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Adds application-level localization with System / English / Simplified Chinese and applies it across the Web UI, Electron shell, and mobile client.

The branch is synchronized with upstream main through b4be33f0 and includes translations for the newer Skills menu, background thread creation, workspace images, Codex feedback, contrast controls, provider update flows, and integration settings.

What is localized

  • Home, sidebar, search, thread actions, composer, approvals, plans, empty states, and status banners
  • Settings navigation and content, including appearance, keybindings, providers, integrations, source control, connections, diagnostics, and archive views
  • Command palette, project/action dialogs, Pull Requests, usage reporting, diff controls, and provider update notifications
  • Electron application menus and update dialogs while retaining native roles and shortcuts
  • Mobile navigation, projects, environments, threads, Git controls, settings, alerts, image states, and feedback results

Implementation

  • Shared locale contract and resolver for system, en, and zh-CN
  • Typed Web message catalog with complete English fallback and reactive locale updates
  • Dedicated desktop menu messages so native menus update with the selected language
  • Mobile string catalog and localized alert adapter for native dialogs
  • Locale-aware usage/date formatting without translating technical identifiers

Model/provider names, Git refs, file paths, URLs, terminal output, commands, agent responses, and raw third-party errors intentionally remain unchanged.

Validation

  • Full workspace typecheck passed across all 15 projects
  • Focused localization suites passed: 29 tests, plus project-icon and mobile-string coverage
  • Client runtime: 51 files / 665 tests passed
  • Mobile: 114 files / 756 tests passed
  • Web production build, server build, and desktop build passed
  • Windows x64 installer built and passed the repository's packaged-payload validation (62 files and 26 unpacked native sidecar files)
  • Android release APK built successfully for minSdk 24 / targetSdk 36
  • The remaining full-suite failures reproduced only in pre-existing Windows-specific path, executable-bit, and locale assumptions; no localization assertion failed

Community builds

The Android community build uses an isolated package ID and disables official OTA updates so it can coexist with the official client. Those distribution-specific changes are isolated and can be dropped or split if upstream prefers to merge only the localization infrastructure and UI coverage.

Implemented with GPT-5.6 Sol in Codex.


Note

Medium Risk
Large UI-wide string and settings-schema change with a new appLocale preference and mobile AppText default-on localization. Community mobile builds also change package IDs and disable official OTA, which can affect update and coexistence behavior.

Overview
Adds an appLocale client setting (system / en / zh-CN) and applies Simplified Chinese across the web UI, Electron native menus, and mobile chrome. Technical identifiers (models, Git refs, paths, URLs, agent output) stay untranslated.

Web wraps the app in WebI18nProvider and replaces hardcoded copy with keyed catalogs. Desktop rebuilds the application menu and update dialogs when locale changes. Mobile localizes AppText, alerts, headers, and placeholders via a string catalog; user/server-owned text must opt out with localize={false}.

Also adds a community Expo variant that pins Chinese, uses a distinct package ID, and disables official OTA so a community APK can sit beside the official app.

Reviewed by Cursor Bugbot for commit ce63585. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Simplified Chinese localization across web, desktop, and mobile

  • Adds a full i18n infrastructure: WebI18nProvider with locale resolution, an English/Chinese message catalog in messages.ts, shared resolveAppLocale/resolveRuntimeLocale in appLocale.ts, and an AppLocalePreference setting (system/en/zh-CN) with a new language selector in General settings
  • Replaces hardcoded English strings with t() calls across settings panels, sidebar, chat composer, command palette, dialogs, usage page, pull request views, connections, provider cards, theme editor, diagnostics, and many other web components
  • Mobile adds localizeTextChildren/localizeMobileString with an AppText localize prop (defaults on), a LocalizedAlert wrapper, localized screen titles and placeholders, and a new community build variant that sets the locale to zh-CN and disables OTA updates
  • Desktop localizes the full application menu via DesktopApplicationMenuMessages and rebuilds the menu when appLocale changes through setClientSettings
  • Behavioral Change: attachmentUploadBlockReason in attachmentUploadState.ts now returns a structured { kind, count } object instead of a string; mobile AppText localizes text children by default, so dynamic content must opt out with localize={false}

Macroscope summarized ce63585.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant