Skip to content

feat(i18n): translate dialogs and first-run onboarding - #898

Merged
LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:r12/l10n-zh-dialogs-onboarding
Oct 19, 2026
Merged

LargeModGames merged 1 commit into
LargeModGames:mainfrom
kapok-4o:r12/l10n-zh-dialogs-onboarding

Conversation

@kapok-4o

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

Copy link
Copy Markdown
Collaborator

Summary

The fourth Chinese translation PR (refs #726), after the settings screen: popups, dialogs, playlist forms and the first-run source setup in Simplified Chinese (zh-Hans) and Traditional Chinese with Taiwan wording (zh-Hant).

  • src/core/i18n/popups.rs: the popup and dialog strings (confirmations, create/rename playlist forms, pickers and their hints), in both scripts.
  • src/core/i18n/onboarding.rs: the first-run questions for the music sources (Spotify, Local, Subsonic, Radio, YouTube, Qobuz, Apple Music) and their prompts.
  • src/core/first_run.rs and src/tui/ui/create_playlist.rs: the glue that routes these prompts through the language tables.
  • What you type or see back stays literal. Names, folder paths, URLs and usernames are shown exactly as entered, source identities and config keys do not change, and a password prompt stays masked.
  • The delete-playlist dialog shows a first line, the playlist name, then a closing line. In Chinese these read "即将删除以下播放列表:", the name, then "确定吗?", so the question is not cut in half by the name.
  • Tests, all in Chinese: the save-failure warning keeps the config path and the raw error text; a required password prompt stays masked and its input is kept literal; the Subsonic setup masks only the password prompt and saves the URL, username and password literally; the local-music setup keeps the user's path and the config keys literal, and its hint line is checked in full; the add-tracks title keeps the playlist name literal.
  • gui/src/bindings/strings.json is regenerated.

English is unchanged.

Testing

macOS (aarch64), on top of c44f106f:

  • cargo fmt --all --check: clean. cargo clippy --locked -- -D warnings on slim (telemetry,tui): clean.
  • cargo clippy --locked -- -D warnings on the gui feature set (telemetry,gui,streaming,discord-rpc,self-update,scripting,mcp-server,mpris plus the five sources): clean.
  • cargo test --locked: slim 1718 passed; default plus local-files,subsonic 2315 passed, 21 ignored; the gui feature set with the five sources 2126 passed, 30 ignored, and no diff in gui/src/bindings afterwards.

Not run: the Linux-only all-sources leg (PipeWire), which CI covers.

Additional notes

A native-speaker review of the wording is welcome; any fix is a one-line change in the table.

Summary by CodeRabbit

  • New Features
    • Added Simplified and Traditional Chinese translations for onboarding, source setup, login, errors, configuration messages, popups, and playlist creation.
  • Tests
    • Added checks for localized setup and playlist text, including that user-provided values and placeholders remain intact.

Translate popups, dialogs, playlist forms and source onboarding into both Chinese scripts. Verify Chinese rendering while keeping entered names, paths, source identities and masked credentials literal.
@coderabbitai

coderabbitai Bot commented Oct 19, 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: 576c8369-660c-4c6f-82f6-87f197f3f8d3
📥 Commits

Reviewing files that changed from the base of the PR and between c44f106 and 3a04808.

⛔ Files ignored due to path filters: 1
  • gui/src/bindings/strings.json is excluded by !gui/src/bindings/**
📒 Files selected for processing: 4
  • src/core/first_run.rs
  • src/core/i18n/onboarding.rs
  • src/core/i18n/popups.rs
  • src/tui/ui/create_playlist.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 translations are added for onboarding, source setup, popup, and playlist UI strings. Tests check localized text, masked-password prompts, and preservation of literal values and placeholders.

Changes: Chinese localization

Layer / File(s) Summary
Onboarding and source setup strings
src/core/i18n/onboarding.rs, src/core/first_run.rs
Simplified and Traditional Chinese onboarding strings are added. Source-setup tests check translated output, save-failure warnings, password prompts, and preservation of literal values.
Popup and playlist strings
src/core/i18n/popups.rs, src/tui/ui/create_playlist.rs
Chinese popup strings are added. Tests check localized popup templates and playlist UI text, including literal {name} placeholders.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 3a048

This change adds Simplified and Traditional Chinese text for dialogs and setup prompts, and English is unchanged. No merge-blocking risk was 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 allowed conventional-commit prefix feat(i18n): and accurately summarizes the Chinese translations for dialogs and first-run onboarding.
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 19, 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 26e6573 into LargeModGames:main Oct 19, 2026
32 checks passed
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