← Back to PRs

#10586: feat: Add Chinese (zh-CN) localization support

by Maxsong-0 open 2026-02-06 18:00 View on GitHub →
channel: telegram app: macos app: web-ui gateway stale
## Description This PR adds comprehensive Chinese (Simplified) localization support to the OpenClaw Control UI. ## Changes - ✨ Added `lit-localize` for internationalization framework - 🌐 Implemented Chinese translations for all UI components (agents, channels, sessions, config, etc.) - 🎚️ Added language switcher in app settings (Settings tab) - <0001f9ea> Added localization coverage tests to ensure translation completeness - 📦 Updated dependencies and configuration ## Testing - Tested language switching between English and Chinese - Verified all UI strings are properly localized - Added automated tests for translation coverage ## Screenshots Language switcher is available in the Settings tab of the Control UI. ## Checklist - [x] All UI strings use `msg()` for localization - [x] Chinese translations provided for all components - [x] Language preference persists in localStorage - [x] Tests added for localization coverage - [x] No breaking changes to existing English UI Co-Authored-By: Warp <agent@warp.dev> <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> - Adds UI i18n via `@lit/localize`, introduces `en`/`zh-CN` locale modules, and wires locale initialization + persistence through UI settings. - Replaces many hard-coded UI strings with `msg(..., {id})` calls across navigation/topbar and view modules. - Extends config schema generation/tests to support zh-CN labels/titles. - Adds a Vitest node-side “localization coverage” test intended to ensure all message IDs exist in `locales/zh-CN.ts`. <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable, but the localization coverage test is currently not validating a large class of message IDs (usage.*), so missing translations can slip through. - Core locale plumbing and msg() conversions look consistent, but the added coverage test’s extraction logic doesn’t match how usage messages are actually invoked, reducing confidence in translation completeness. - ui/src/ui/localization-coverage.node.test.ts, ui/src/ui/views/usage.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs