Skip to content

Add Simplified Chinese (zh-CN) localization - #61

Open
zeemohhh7788-maker wants to merge 3 commits into
hsr88:mainfrom
zeemohhh7788-maker:feat/zh-cn-localization
Open

Add Simplified Chinese (zh-CN) localization#61
zeemohhh7788-maker wants to merge 3 commits into
hsr88:mainfrom
zeemohhh7788-maker:feat/zh-cn-localization

Conversation

@zeemohhh7788-maker

@zeemohhh7788-maker zeemohhh7788-maker commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Adds Simplified Chinese (zh-CN) localization to Mouzi.

Changes

  • add a complete zh-CN frontend locale;
  • register zh-CN in i18next and the language selector;
  • map Chinese system locales to zh-CN;
  • add Simplified Chinese native tray and notification strings;
  • localize batch notification titles and counts through the existing Rust i18n helper;
  • list Simplified Chinese in the README.

Validation

  • zh-CN.json matches all 142 leaf keys in en.json;
  • no missing or extra keys;
  • all placeholders are preserved;
  • TypeScript type checking passes;
  • Vite production build passes;
  • git diff --check passes;
  • no generated binaries, CI artifacts, local paths, logs, or unrelated tooling are included.

Note

The repository currently restricts new Issue creation for this account, so I could not open the requested language-confirmation issue first. Please confirm that zh-CN is the preferred language code and that there is no duplicate translation effort.

This pull request is intentionally opened as a draft. Rust/Tauri compilation for the current v0.1.6 baseline should be confirmed by project CI before it is marked ready for review. The earlier v0.1.5 Windows build passed.


Summary by cubic

Adds Simplified Chinese (zh-CN) localization across the frontend, tray, and system notifications.

  • The full zh-CN locale is registered in i18next and the language selector; system locale detection maps Simplified Chinese variants (zh-CN, zh-SG, zh-Hans) to zh-CN and falls back to English for Traditional or ambiguous ones (zh-TW, zh-HK, zh-Hant, zh).
  • Native tray menus, tooltips, and notifications now use localized strings via the Rust i18n helper; batch notification titles fall back to English when a locale lacks a translation.

Written for commit dd1e925. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@zeemohhh7788-maker is attempting to deploy a commit to the Krystian's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zeemohhh7788-maker

Copy link
Copy Markdown
Author

Hi! I’d like to contribute Simplified Chinese (zh-CN) support to Mouzi.

I noticed the README asks contributors to open an issue before adding a new language, but issue creation is currently restricted, so I’m using this Draft PR to confirm the language code and contribution with you first.

The translation and integration have been completed and locally validated, including locale consistency checks and the frontend production build.

If zh-CN is the preferred language code and you’re happy for me to proceed, I can make this PR ready for review.

Thanks!

@hsr88

hsr88 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Hi, thanks for the contribution! zh-CN is the correct locale code for Simplified Chinese, and I’m not aware of anyone else currently working on this translation. Opening a draft PR was perfectly fine.

Before marking the PR as ready, please fix the system locale detection. The current implementation removes the region/script before checking the locale, so zh-TW, zh-HK, and zh-Hant would also be mapped to Simplified Chinese. Please map only Simplified Chinese variants such as zh-CN, zh-SG, and zh-Hans to zh-CN. Unsupported Traditional Chinese locales should fall back to English for now.

Please also confirm that both commands pass:

npm run build
cargo test --manifest-path src-tauri/Cargo.toml

After that, feel free to mark the PR as ready for review. Thanks again!

@zeemohhh7788-maker

Copy link
Copy Markdown
Author

Thanks for the review! I updated the system locale detection so only Simplified Chinese variants (zh-CN, zh-SG, zh-Hans, including underscore/case variants) map to zh-CN. Traditional or ambiguous Chinese locales (zh-TW, zh-HK, zh-MO, zh-Hant, and bare zh) now fall back to English.

I also added regression tests for both Simplified and Traditional Chinese locale variants.

Validation completed on Windows CI:

  • npm run build — passed
  • cargo check --manifest-path src-tauri/Cargo.toml --locked — passed
  • cargo test --manifest-path src-tauri/Cargo.toml --locked — passed (13 tests)
  • npm run tauri build -- --no-bundle — passed and produced the executable

CI evidence: https://github.com/zeemohhh7788-maker/mouzi-zh-cn-ci-20260827/actions/runs/33073845091

The full installer bundle was not signed in the Fork because the official updater private key is intentionally unavailable there; the unsigned Tauri application build passed. I’m marking the PR ready for review now. Thanks again!

@zeemohhh7788-maker
zeemohhh7788-maker marked this pull request as ready for review August 27, 2026 13:20

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src-tauri/src/i18n.rs Outdated
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.

2 participants