Skip to content

feat(i18n): add Simplified Chinese (zh-CN) localization#30

Open
renfei wants to merge 1 commit into
bitaxeorg:mainfrom
renfei:main
Open

feat(i18n): add Simplified Chinese (zh-CN) localization#30
renfei wants to merge 1 commit into
bitaxeorg:mainfrom
renfei:main

Conversation

@renfei

@renfei renfei commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Add src/i18n/locales/zh-CN.json with full Simplified Chinese translations covering all existing keys (common, header, hero, features, instructions, status, errors)
  • Register zh-CN as a supported language in src/i18n/config.ts
  • Add 简体中文 option to the language selector dropdown in LanguageSelector.tsx

Changes

File Change
src/i18n/locales/zh-CN.json New file — complete zh-CN translation
src/i18n/config.ts Import and register zh-CN resource
src/components/LanguageSelector.tsx Add { value: 'zh-CN', label: '简体中文' } to language list

Testing

  1. Open the app in a Chromium-based browser
  2. Open the language selector
  3. Choose 简体中文
  4. Verify all UI strings are displayed in Simplified Chinese

Summary by CodeRabbit

  • New Features
    • Added Simplified Chinese language support. Users can now select Simplified Chinese as their preferred language for the app interface, with complete translation coverage for all UI elements, including navigation, features, and system messages.

Add complete zh-CN translation file and register it in i18n config and language selector.
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09900b8a-11b5-4991-a4e9-323ab604ec8c

📥 Commits

Reviewing files that changed from the base of the PR and between 3b94164 and 4f10947.

📒 Files selected for processing (3)
  • src/components/LanguageSelector.tsx
  • src/i18n/config.ts
  • src/i18n/locales/zh-CN.json

📝 Walkthrough

Walkthrough

Adds Simplified Chinese (zh-CN) language support by introducing a new locale JSON file with 78 translation keys, registering it in the i18next configuration, and adding it as a selectable option in the LanguageSelector component.

Changes

Simplified Chinese Localization

Layer / File(s) Summary
zh-CN locale file and i18next registration
src/i18n/locales/zh-CN.json, src/i18n/config.ts
Adds zh-CN.json with translations for all UI areas (labels, navigation, hero, features, instructions, flash/log status strings, and browser error), imports it in config.ts, and registers it under 'zh-CN' in the i18next resources map.
LanguageSelector UI entry
src/components/LanguageSelector.tsx
Adds zh-CN (Simplified Chinese) to the languages array so it appears as a selectable option alongside the existing entries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A bunny hops east, past the Great Wall so grand,
New words bloom like flowers across the land.
zh-CN now lives where only one tongue had been,
Each key unlocks a phrase for eyes yet unseen.
Hào! The flasher speaks Chinese — how grand a sight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Simplified Chinese (zh-CN) localization support across multiple files (translation file, i18n config, and language selector).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant