Skip to content

Add Simplified Chinese localization#46

Open
Starkxim wants to merge 1 commit into
CodeZeno:mainfrom
Starkxim:add-simplified-chinese
Open

Add Simplified Chinese localization#46
Starkxim wants to merge 1 commit into
CodeZeno:mainfrom
Starkxim:add-simplified-chinese

Conversation

@Starkxim

Copy link
Copy Markdown

Summary

Adds a Simplified Chinese (zh-CN) translation alongside the existing Traditional Chinese, so mainland China / Singapore / Hans-script users get a native UI instead of falling back to English.

Changes

  • New src/localization/simplified_chinese.rs with the full Strings table and the WinGet update label, using mainland conventions (刷新, 设置, 默认, 退出, 小组件, 应用程序, …).
  • Registered SimplifiedChinese in LanguageId — enum, ALL, code()zh-CN, native_name() → 简体中文, strings(), and the WinGet label — and wired up the menu item plus command handling in window.rs.
  • from_code() now maps zh-CN, zh-SG, zh-Hans, and bare zh to Simplified Chinese, and additionally routes zh-MO (Macau) to Traditional Chinese.

The Simplified entry sits right after Traditional in the language menu so the two Chinese variants stay grouped together.

Testing

  • cargo build / cargo build --release — clean
  • cargo fmt --check — clean
  • cargo clippy — no new warnings

Add a Simplified Chinese (zh-CN) translation alongside the existing
Traditional Chinese, wired into the language enum, menu, settings code,
and persistence.

Map zh-CN, zh-SG, zh-Hans, and bare "zh" to Simplified Chinese in
from_code, and route zh-MO to Traditional Chinese so Macau is no longer
treated as Simplified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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