Skip to content

feat(i18n): translate sidebar and help into Chinese - #877

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:l10n-zh-sidebar-help
Oct 16, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:l10n-zh-sidebar-help

Conversation

@kapok-4o

@kapok-4o kapok-4o commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

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.json is 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 --check and cargo clippy --locked -- -D warnings: clean.
  • cargo test --locked: 2168 passed, 8 ignored. The gui-feature run leaves no bindings diff.
  • New tests in src/tui/ui/localization_tests.rs render the Chinese sidebar and help with TestBackend: 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

  • Localization
    • Added Simplified and Traditional Chinese translations for help content, sidebar labels, and empty-state messages. Items without Chinese translations continue to appear in English.
    • Help screens now display localized headers, shortcut information, and source availability hints when using Chinese.
    • Improved consistency of Chinese text and layout across filtered help results and different screen sizes.

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.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 23750673-5555-4865-b457-3b10a9a51f28
📥 Commits

Reviewing files that changed from the base of the PR and between 0211938 and 7a6d848.

⛔ Files ignored due to path filters: 1
  • gui/src/bindings/strings.json is excluded by !gui/src/bindings/**
📒 Files selected for processing: 3
  • src/core/i18n/help.rs
  • src/core/i18n/sidebar.rs
  • src/tui/ui/localization_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

Simplified and Traditional Chinese locale definitions now include translated help entries, sidebar labels, and empty-state messages. Regression tests cover localized help behavior, source-specific sidebar content, and rendering across multiple viewport sizes.

Changes: Chinese UI localization

Layer / File(s) Summary
Localized help content and behavior
src/core/i18n/help.rs, src/tui/ui/localization_tests.rs
Simplified and Traditional Chinese provide localized help labels, descriptions, and templates. Tests cover filtering, shortcut alignment, source-dependent hints, language switching, and no-match text.
Localized sidebar content and rendering
src/core/i18n/sidebar.rs, src/tui/ui/localization_tests.rs
The Chinese locales provide translated sidebar labels and empty-state messages. Tests check source-specific rows, rebound key display, and rendering dimensions.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 7a6d8

The Chinese help and sidebar translations are ready to merge after normal checks; no actionable issue remains identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title uses the valid conventional-commit prefix feat(i18n):, states the main change, and uses a concise imperative subject.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
✨ Simplify code
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 953d287 into LargeModGames:main Oct 16, 2026
32 checks passed
LargeModGames pushed a commit that referenced this pull request Oct 17, 2026
# 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]>
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