Repository navigation
feat(i18n): translate sidebar and help into Chinese - #877
Conversation
Add Simplified and Taiwan-Traditional sidebar and help text. Exercise the actual Chinese labels, filtering, availability hints and narrow terminal layouts, while preserving shortcuts, product names and user playlist titles.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
# Summary The second Chinese translation PR after #877 (refs #726): the Behavior settings and the controls every settings tab shares, in Simplified Chinese (`zh-Hans`) and Traditional Chinese with Taiwan wording (`zh-Hant`). - `src/core/i18n/settings/zh_hans.rs` and `zh_hant.rs`: setting names and descriptions for the Behavior tab, the controls every tab shares (tab names, on/off, the editing and navigation hints) and the option labels, including the new Player Bar Visualizer row from #879. - Only the labels change. What gets saved to `config.yml` (option tokens such as `release_date:desc`, key names) stays the same in every language. - `docs/configuration.md` names the Chinese labels of `auto`. - `gui/src/bindings/strings.json` is regenerated, which is most of the diff. English is unchanged, and anything not translated yet still falls back to English. Keybinding and theme settings come in the next PR. # Testing macOS (aarch64), on top of `00753912`: - `cargo fmt --all --check` and `cargo clippy --locked -- -D warnings`: clean. - `cargo test --locked`: 2196 passed, 8 ignored. The gui-feature run leaves no bindings diff. # Additional notes A native-speaker review of the wording is welcome; any fix is a one-line change in the table. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Simplified and Traditional Chinese translations throughout the settings interface, including labels, descriptions, options, prompts, and validation messages. * The language-picker documentation now shows the localized “Auto (system)” label in Chinese. The saved configuration value remains `auto`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: 2570165831 <[email protected]>
Summary
The first of the Chinese translation PRs that follow #865 (refs #726): the sidebar and the help menu in Simplified Chinese (
zh-Hans) and Traditional Chinese with Taiwan wording (zh-Hant).src/core/i18n/sidebar.rs: 26 of 32 sidebar entries. The other six are product names (Spotify, YouTube, Qobuz, Subsonic, Apple Music, AI DJ) and stay as they are.src/core/i18n/help.rs: 147 of 148 help entries; the remaining one is the AI DJ context name. Key names in descriptions (<Ctrl+,>,Esc, …) are left untouched.gui/src/bindings/strings.jsonis regenerated, which is most of the diff.English is unchanged: only the two Chinese tables gain entries, and anything not translated yet still falls back to English. The other areas come next, one PR each.
Testing
macOS (aarch64), on top of
02119389:cargo fmt --all --checkandcargo clippy --locked -- -D warnings: clean.cargo test --locked: 2168 passed, 8 ignored. The gui-feature run leaves no bindings diff.src/tui/ui/localization_tests.rsrender the Chinese sidebar and help withTestBackend: labels fit narrow widths and keep the source gates, the help filter keeps shortcuts aligned, availability hints follow the active source, a no-match filter keeps the typed text literally, and both render in tiny viewports without panicking.Additional notes
The translations were checked by a second pass for wording and Simplified/Traditional consistency. A native-speaker review is welcome; any wording fix is a one-line change in the table.
Summary by CodeRabbit