Repository navigation
feat(i18n): translate behavior settings and shared controls - #885
Conversation
Translate behavior setting names and descriptions, shared settings controls and option labels into both Chinese scripts. Persisted option tokens and keybinding values remain unchanged.
|
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 third Chinese translation PR (refs #726), finishing the settings screen after #885: the Keybindings and Theme tabs in Simplified Chinese (`zh-Hans`) and Traditional Chinese with Taiwan wording (`zh-Hant`). - `src/core/i18n/settings/zh_hans.rs` and `zh_hant.rs`: keybinding descriptions, theme labels and color names, the key-conflict message and the unknown-color message. With this, every settings entry has a Chinese translation except the three language names (English / 简体中文 / 繁體中文), which stay as they are. - Only the labels change. Saved values in `config.yml` (key names such as `ctrl-f`, color names such as `LightBlue`, the language token) are the same in every language. - Tests: a few settings tests that compared against the table now assert the actual Chinese text, so they catch a wrong or missing translation (`src/core/app/settings_schema.rs`, `src/core/i18n/settings.rs`, `src/tui/handlers/settings.rs`). A new render test, `chinese_settings_render_localized_choices_without_changing_the_raw_value`, draws the settings screen in Chinese and checks the language row shows the Chinese label while its value stays `zh-Hans`. - `gui/src/bindings/strings.json` is regenerated. English is unchanged. # Testing macOS (aarch64), on top of `7e62b7dd`: - `cargo fmt --all --check`, and `cargo clippy --locked -- -D warnings` for default and slim (`telemetry,tui`): clean. - `cargo test --locked`: default 2198 passed, 8 ignored; slim 1696 passed; gui feature set 2095 passed, 30 ignored, and no bindings diff afterwards. # 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** * Simplified and Traditional Chinese settings now include localized labels and descriptions for keybindings and theme colors, plus translations for automatic color selection, color-validation messages, and named color choices. * Chinese translations also cover the automatic language option, playlist date sorting, key-conflict messages, and unknown-color messages. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: 2570165831 <[email protected]>
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.rsandzh_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 feat(gui): visualizer behind the player bar #879.config.yml(option tokens such asrelease_date:desc, key names) stays the same in every language.docs/configuration.mdnames the Chinese labels ofauto.gui/src/bindings/strings.jsonis 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 --checkandcargo 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.
Summary by CodeRabbit
auto.