Skip to content

feat(i18n): share typed English strings across terminal and GUI - #865

Merged
LargeModGames merged 6 commits into
LargeModGames:mainfrom
kapok-4o:l10n-core
Oct 16, 2026
Merged

LargeModGames merged 6 commits into
LargeModGames:mainfrom
kapok-4o:l10n-core

Conversation

@kapok-4o

Copy link
Copy Markdown
Collaborator

Summary

The first part of #726: user-visible interface text moves into one typed table that the terminal app and the GUI share, plus a language setting. This PR ships the mechanism and the English table only. The Chinese tables come in 12 small follow-up PRs, one area each, so the translations can be reviewed on their own.

  • Strings table (src/core/i18n/): plain data, grouped by area (sidebar, help, settings, popups, screens, onboarding, gui, recap, status.{app,infra,runtime,tools}). Messages with values are named templates ("Added to {name}"), and each one has a small typed method, so call sites stay compile-checked (app.strings().status.infra.playlist_added_named(name)). Because the table is plain data it derives Serialize and ts_rs::TS, and the GUI renders the same strings through the generated bindings instead of keeping its own copy.
  • behavior.language: auto (default), en, zh-Hans, zh-Hant, also in Settings (shown as "Auto (system)", saved as auto). auto picks Simplified or Traditional Chinese only when the system language is Chinese, and English for every other language. The system language is read once at startup: LC_ALL / LC_MESSAGES / LANG, then the macOS preferred languages or the Windows UI language (GetUserPreferredUILanguages). Common spellings like zh-CN or zh_TW are accepted; any other value logs a warning and falls back to auto instead of failing the config load.
  • Live switching: changing the language in Settings switches the running app and the GUI. Labels the app generates and caches (local-library roots, "Unnamed Folder", the unknown-track fallback for local files, the Spotify pairing prompt, playlist-sync reasons, DJ results, clipboard notices in the GUI) keep their identity and are rendered with the table that is current when they're shown, so a switch also reaches them (a message already on its way to the screen at the moment of the switch can still appear once in the old language); user-named items stay literal.
  • Call sites: the sidebar, help, settings, popups, screens, onboarding, the listening recap export from the UI, and the status messages from core/, infra/ and runtime/ read the table. core/ and infra/ still don't import tui. A localized error still logs the original English error and still sets api_error, so CLI exit codes don't change.
  • Deliberately English: CLI output, log lines, raw server/error details, and the DJ/MCP tool text the model reads (a comment in infra/dj/tools.rs says why). The DJ's own on-screen summary of a tool result is localized.
  • Width: truncation and padding work on whole grapheme clusters and measure terminal cells, so two-cell CJK text and emoji with variation selectors don't overflow a column; the settings-tab mouse hit-test uses the same widths. The playbar still strips control characters from device and host names as before.
  • Chinese in this PR: zh-Hans and zh-Hant can already be selected, but their tables are Strings { ..EN }, so they show English. The CHANGELOG and docs/configuration.md say so.

English output does not change: tests compare every row of the English help table and the default playbar with the previous output, and existing tests keep asserting the same English text (where a function now takes the table, the test passes &EN).

Testing

On macOS (aarch64), commit 7e19588b on top of e6d22a7d:

  • cargo fmt --all --check: clean.
  • cargo clippy --locked -- -D warnings for the default build, all-sources, slim (telemetry,tui), headless (telemetry), headless-streaming, mcp-only, ai-dj-only and the gui feature set: all clean.
  • cargo test --locked:
    • slim: 1670 passed
    • default: 2152 passed, 8 ignored (also 2152 with LANG=zh_TW.UTF-8, so the suite doesn't depend on the machine's locale)
    • --features all-sources: 2368 passed, 30 ignored
    • gui feature set: 1842 passed, 8 ignored. This run regenerates gui/src/bindings/; there is no diff afterwards.
  • In gui/: npm ci, npm run lint, npm run format:check, npm run typecheck, npm test (432 tests), npm run build: all pass.

Not covered:

  • Windows: ci.yml has no Windows leg, and desktop.yml builds on windows-latest only on pushes to main and manual runs, not on PRs. The Windows-only code is native_language() in src/core/i18n/locale.rs. I type-checked it with clippy (-D warnings) on its own against windows-sys 0.61.2 for x86_64-pc-windows-msvc; it hasn't run on a Windows machine.
  • Real browser: the GUI is covered by the Rust protocol tests and the frontend tests, but I haven't clicked through it in a real browser.

Additional notes

  • Size: 270 files, +26,716 / −3,905, of which about 6,000 lines are generated bindings (gui/src/bindings/, mostly strings.json). The rest is the table modules and the call-site changes. src/core/i18n/mod.rs, locale.rs and core/app/localization.rs are the places to start.
  • Dependencies: windows-sys (Win32_Globalization) under the Windows-only dependencies, and an optional unicode-segmentation enabled by the tui feature. Both were already in Cargo.lock at the same versions (0.61.2 and 1.12.0); the lockfiles only gain the dependency edges.
  • Contributors add a message in English only (CONTRIBUTING.md has a short "Adding interface text" section). A missing Chinese entry falls back to English, and the test reports_entries_still_in_english prints the untranslated entries without failing.
  • Follow-ups: 12 stacked PRs fill in Simplified and Traditional Chinese, one area at a time (sidebar and help, settings, dialogs and onboarding, screens, status messages, GUI). I'll open them one by one as this lands, so each diff stays small.

Refs #726

Move interface copy into one typed, serializable English catalog shared by the terminal and browser. Add tolerant language selection, boot-time locale resolution, live refresh, raw-preserving setting choices and cell-safe layouts. Chinese language choices use English fallback tables in this PR; translated areas follow in stacked PRs. Keep CLI output and diagnostics in English.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 248 files, which is 98 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: Repository: LargeModGames/spotatui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b467743c-7f92-4bcd-842d-d03d0be7421b
📥 Commits

Reviewing files that changed from the base of the PR and between 50e48e9 and f15504f.

⛔ Files ignored due to path filters: 25
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
  • desktop/Cargo.lock is excluded by !**/*.lock, !desktop/Cargo.lock
  • gui/src/bindings/AppStatusStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/GeneratedTrackName.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/GuiStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/HelloPayload.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/HelpStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/InfraStatusStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/Language.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/OnboardingStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/PopupStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/RecapStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/RuntimeStatusStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/ScreenStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/ServerMessage.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/SettingRow.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/SettingRowValue.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/SettingsPayload.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/SettingsStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/SidebarStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/StatusStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/Strings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/ToolStrings.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/TrackInfo.ts is excluded by !gui/src/bindings/**
  • gui/src/bindings/strings.json is excluded by !gui/src/bindings/**
📒 Files selected for processing: 248
  • CHANGELOG.md
  • CONTRIBUTING.md
  • Cargo.toml
  • docs/configuration.md
  • examples/config.example.yml
  • gui/e2e/fixtures.ts
  • gui/e2e/menu-language.shot.ts
  • gui/src/AlbumPage.tsx
  • gui/src/App.tsx
  • gui/src/ArtistPage.tsx
  • gui/src/CommandMode.tsx
  • gui/src/ConfirmDialog.tsx
  • gui/src/DevicesPopover.tsx
  • gui/src/Discover.tsx
  • gui/src/Home.tsx
  • gui/src/LibraryHealth.tsx
  • gui/src/LibraryPanel.tsx
  • gui/src/ListPage.tsx
  • gui/src/LyricsPage.tsx
  • gui/src/MiniPlayer.tsx
  • gui/src/NowPlayingPanel.tsx
  • gui/src/Onboarding.tsx
  • gui/src/Party.tsx
  • gui/src/PlayerBar.tsx
  • gui/src/PlaylistNameDialog.tsx
  • gui/src/PodcastPage.tsx
  • gui/src/QueueDrawer.tsx
  • gui/src/RadioPage.tsx
  • gui/src/RecentlyPlayed.tsx
  • gui/src/Room.tsx
  • gui/src/Search.tsx
  • gui/src/Session.tsx
  • gui/src/Settings.tsx
  • gui/src/Shell.tsx
  • gui/src/SourceBadge.tsx
  • gui/src/Stats.tsx
  • gui/src/Toast.tsx
  • gui/src/TopBar.tsx
  • gui/src/TrackMenu.tsx
  • gui/src/TrackMenuLanguage.test.tsx
  • gui/src/TrackTable.tsx
  • gui/src/Transport.tsx
  • gui/src/areas.ts
  • gui/src/commandModel.ts
  • gui/src/connection.test.ts
  • gui/src/connection.ts
  • gui/src/currentMainLocalization.test.tsx
  • gui/src/healthModel.ts
  • gui/src/i18n.ts
  • gui/src/library.test.tsx
  • gui/src/libraryModel.test.ts
  • gui/src/libraryModel.ts
  • gui/src/libraryPanel.test.tsx
  • gui/src/localization.test.tsx
  • gui/src/mainLocalization.test.tsx
  • gui/src/pagesModel.test.ts
  • gui/src/pagesModel.ts
  • gui/src/partyModel.ts
  • gui/src/queueModel.ts
  • gui/src/searchModel.ts
  • gui/src/sessionModel.ts
  • gui/src/settings.test.tsx
  • gui/src/settingsModel.test.ts
  • gui/src/settingsModel.ts
  • gui/src/showModel.ts
  • gui/src/sortModel.ts
  • gui/src/statsModel.ts
  • gui/src/trackMenuModel.test.ts
  • gui/src/trackMenuModel.ts
  • gui/src/ui.tsx
  • gui/src/useStringsReader.ts
  • gui/tsconfig.json
  • mobile/app/src/app/settings.tsx
  • src/core/action/apply.rs
  • src/core/action/mod.rs
  • src/core/action/tests.rs
  • src/core/app/apple_music.rs
  • src/core/app/audio_analysis.rs
  • src/core/app/construction.rs
  • src/core/app/display_revisions.rs
  • src/core/app/dj.rs
  • src/core/app/friends.rs
  • src/core/app/keybindings.rs
  • src/core/app/library.rs
  • src/core/app/localization.rs
  • src/core/app/mod.rs
  • src/core/app/native_backend.rs
  • src/core/app/party.rs
  • src/core/app/persistence.rs
  • src/core/app/playback_routing.rs
  • src/core/app/playlist_folders.rs
  • src/core/app/playlist_pages.rs
  • src/core/app/playlist_sync.rs
  • src/core/app/playlists.rs
  • src/core/app/queue.rs
  • src/core/app/recap.rs
  • src/core/app/route.rs
  • src/core/app/settings_apply.rs
  • src/core/app/settings_schema.rs
  • src/core/app/shuffle_repeat.rs
  • src/core/app/status.rs
  • src/core/app/test_support.rs
  • src/core/app/tick.rs
  • src/core/app/transport.rs
  • src/core/app/volume.rs
  • src/core/auth.rs
  • src/core/driver/mod.rs
  • src/core/driver/play_count.rs
  • src/core/driver/presence.rs
  • src/core/driver/viz_capture.rs
  • src/core/first_run.rs
  • src/core/format.rs
  • src/core/i18n/gui.rs
  • src/core/i18n/gui/en.rs
  • src/core/i18n/gui/zh_hans.rs
  • src/core/i18n/gui/zh_hant.rs
  • src/core/i18n/help.rs
  • src/core/i18n/locale.rs
  • src/core/i18n/message.rs
  • src/core/i18n/mod.rs
  • src/core/i18n/onboarding.rs
  • src/core/i18n/popups.rs
  • src/core/i18n/recap.rs
  • src/core/i18n/screens.rs
  • src/core/i18n/settings.rs
  • src/core/i18n/settings/en.rs
  • src/core/i18n/settings/zh_hans.rs
  • src/core/i18n/settings/zh_hant.rs
  • src/core/i18n/sidebar.rs
  • src/core/i18n/status_app.rs
  • src/core/i18n/status_infra.rs
  • src/core/i18n/status_runtime.rs
  • src/core/i18n/template_tests.rs
  • src/core/i18n/tests.rs
  • src/core/i18n/tools.rs
  • src/core/mod.rs
  • src/core/onboarding.rs
  • src/core/persisted_playback.rs
  • src/core/playlist_sync/mod.rs
  • src/core/plugin_api.rs
  • src/core/queue.rs
  • src/core/requirement.rs
  • src/core/sort.rs
  • src/core/source.rs
  • src/core/test_helpers.rs
  • src/core/user_config.rs
  • src/gui/bridge.rs
  • src/gui/onboarding.rs
  • src/gui/protocol.rs
  • src/gui/server.rs
  • src/infra/apple_music/dispatch.rs
  • src/infra/apple_music/mod.rs
  • src/infra/dj/agent.rs
  • src/infra/dj/brief.rs
  • src/infra/dj/exec.rs
  • src/infra/dj/library.rs
  • src/infra/dj/mod.rs
  • src/infra/dj/resolve.rs
  • src/infra/dj/setup.rs
  • src/infra/dj/tools.rs
  • src/infra/history.rs
  • src/infra/local/dispatch.rs
  • src/infra/local/mod.rs
  • src/infra/media_metadata.rs
  • src/infra/mod.rs
  • src/infra/network/dj.rs
  • src/infra/network/friends.rs
  • src/infra/network/library.rs
  • src/infra/network/mapping.rs
  • src/infra/network/mod.rs
  • src/infra/network/native_shuffle.rs
  • src/infra/network/playback.rs
  • src/infra/network/requests.rs
  • src/infra/network/user.rs
  • src/infra/player/events.rs
  • src/infra/player/streaming.rs
  • src/infra/playlist_sync/mod.rs
  • src/infra/playlist_sync/run.rs
  • src/infra/qobuz/dispatch.rs
  • src/infra/qobuz/mod.rs
  • src/infra/queue/dispatch.rs
  • src/infra/queue/mod.rs
  • src/infra/radio/dispatch.rs
  • src/infra/radio/mod.rs
  • src/infra/scripting/tests.rs
  • src/infra/spotify/browse.rs
  • src/infra/spotify/cast.rs
  • src/infra/spotify/player.rs
  • src/infra/spotify/playlists.rs
  • src/infra/spotify/router.rs
  • src/infra/spotify/search.rs
  • src/infra/spotify/zeroconf.rs
  • src/infra/subsonic/dispatch.rs
  • src/infra/subsonic/mod.rs
  • src/infra/youtube/dispatch.rs
  • src/infra/youtube/mod.rs
  • src/infra/youtube/playlists.rs
  • src/runtime/bootstrap.rs
  • src/runtime/cli.rs
  • src/runtime/gui.rs
  • src/runtime/mod.rs
  • src/runtime/pump.rs
  • src/runtime/startup.rs
  • src/runtime/streaming/launch.rs
  • src/runtime/streaming/mod.rs
  • src/tui/cover_art.rs
  • src/tui/first_run.rs
  • src/tui/handlers/album_list.rs
  • src/tui/handlers/album_tracks.rs
  • src/tui/handlers/announcement_prompt.rs
  • src/tui/handlers/artist.rs
  • src/tui/handlers/dialog.rs
  • src/tui/handlers/input.rs
  • src/tui/handlers/mod.rs
  • src/tui/handlers/mouse.rs
  • src/tui/handlers/playlist.rs
  • src/tui/handlers/queue_menu.rs
  • src/tui/handlers/recently_played.rs
  • src/tui/handlers/search_results.rs
  • src/tui/handlers/select_device.rs
  • src/tui/handlers/settings.rs
  • src/tui/handlers/stats.rs
  • src/tui/help_english_5d66123b.json
  • src/tui/keymap.rs
  • src/tui/onboarding.rs
  • src/tui/runner.rs
  • src/tui/ui/ai_dj.rs
  • src/tui/ui/artist.rs
  • src/tui/ui/audio_analysis.rs
  • src/tui/ui/columns.rs
  • src/tui/ui/create_playlist.rs
  • src/tui/ui/discover.rs
  • src/tui/ui/friends.rs
  • src/tui/ui/help.rs
  • src/tui/ui/home.rs
  • src/tui/ui/library.rs
  • src/tui/ui/localization_tests.rs
  • src/tui/ui/lyrics.rs
  • src/tui/ui/mod.rs
  • src/tui/ui/player.rs
  • src/tui/ui/playlist_sync.rs
  • src/tui/ui/plugin_screen.rs
  • src/tui/ui/popups.rs
  • src/tui/ui/search.rs
  • src/tui/ui/settings.rs
  • src/tui/ui/stats.rs
  • src/tui/ui/tables.rs
  • src/tui/ui/util.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 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.

@LargeModGames LargeModGames left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help fixture pins <Ctrl+,> for Open settings, the macOS default, so every Linux test leg fails. Build that row from UserConfig::new().keys.open_settings in the test instead.

  • The device_navigation slots are swapped: {up} gets the move_down key (player.rs:1743).
  • spotatui-gui now parses --config/-c, and a bare flag stops the launch. I'd drop it and load the language from the default path.
  • Onboarding errors (onboarding.rs:163) are localized and end up in the log. Keep the logged text in English.
  • CONTRIBUTING should say that any text edit needs cargo test --features gui to regenerate strings.json.

… device hint slots, GUI config and onboarding errors

Build the help fixture's Open settings row from the platform default. Put move_up in `{up}` and move_down in `{down}` (the English template lists down first, so the text is unchanged). Drop the GUI's `--config`/`-c` parsing and read the language from the default config path. Keep onboarding errors English, since they end up in the log. Note in CONTRIBUTING that any text edit needs `cargo test --features gui` to regenerate strings.json.
@kapok-4o

Copy link
Copy Markdown
Collaborator Author

Thanks! All five are in the new commit:

  • The help fixture now builds the Open settings row from UserConfig::new().keys.open_settings, so the Linux legs pass.
  • device_navigation now gets move_up in {up} and move_down in {down}; the English template lists {down} first, so the text is byte-identical to before. A test sets distinct up/down keys to catch a swap.
  • spotatui-gui no longer parses --config/-c; the first page reads the language from the default config path.
  • The onboarding errors are back to their English text (they only reach the log), and their table entries are gone.
  • CONTRIBUTING now says any text edit needs cargo test --features gui to regenerate strings.json.

2570165831 added 2 commits October 16, 2026 20:59
Route the two strings main added through the table: the Shuffle button's label (gui.shuffle_named, LargeModGames#864) and the missing ALSA default device hint (status.app.audio_backend_no_alsa_default, LargeModGames#861). Add generated_name to the PlaylistInfo built by the LargeModGames#859 test.
Route the settings search box's label and its no-match line (LargeModGames#868) through the table (gui.search_settings, gui.no_settings_match); sections() takes the table after the query.
@kapok-4o

Copy link
Copy Markdown
Collaborator Author

Merged main twice to clear the conflicts. The strings main added in the meantime now come from the table too, with the English text unchanged: the Shuffle button's label (#864), the missing ALSA device hint (#861), and the settings search box and its no-match line (#868).

Since this touches 270 files, almost anything that lands on main conflicts with it again. Let me know when you're about to merge and I'll sync it with main right then.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

@LargeModGames LargeModGames left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All five earlier points are fixed. One new break: the settings channel now sends SettingsPayload, but mobile/app/src/app/settings.tsx still passes it to sections() as a row list, so the Android Settings screen throws on rows.filter. CI doesn't typecheck mobile/. Two small ones: dj/mod.rs:96 and dj/tools.rs:1203 read current_playback_snapshot, so the model can get a translated "Unknown Track"; use tracking_playback_snapshot. Also, the doc comment at network/playback.rs:75 was mangled by the replace.

The Android settings screen reads the rows out of the settings payload. The DJ label, the now_playing tool and the DJ dedupe keys read the tracking snapshot, so the model never sees a translated generated title. Restore a doc comment the string replace mangled.
@kapok-4o

Copy link
Copy Markdown
Collaborator Author

Thanks, all three are fixed in the new commit:

  • mobile/app/src/app/settings.tsx now reads useChannel('settings')?.rows. I ran tsc --noEmit in mobile/app: it reports exactly this error without the fix and is clean with it, so nothing else in mobile/ broke.
  • The DJ label (dj/mod.rs) and the now_playing tool (dj/tools.rs) read tracking_playback_snapshot, and so does dj_skip_keys in core/app/dj.rs, which builds the dedupe keys the model's picks are checked against.
  • The doc comment in network/playback.rs reads "Queue finished" again; I checked the other comments the PR touched and found no other replace damage.

@LargeModGames LargeModGames left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more like the DJ one: lyrics_state_is_current (plugin_api.rs:876) reads current_playback_snapshot, but the detector keys desired_lyrics_identity on the tracking snapshot. Once local_unknown_track is translated, a plugin's lyrics request on an untagged local file times out. Use tracking_playback_snapshot there.

lyrics_state_is_current compares desired_lyrics_identity, which the detector keys on the tracking snapshot, against the same snapshot, so a translated generated title cannot make a plugin's lyrics request wait forever. The play-count test helper feeds the counter the tracking snapshot like the driver does.
@kapok-4o

Copy link
Copy Markdown
Collaborator Author

Good catch, fixed: lyrics_state_is_current now compares against tracking_playback_snapshot, the same snapshot the detector keys desired_lyrics_identity on. The play-count test helper read the display snapshot too while the driver feeds the counter the tracking one, so it now matches.

I went through every other current_playback_snapshot caller as well. The rest only show the title (the playbar, the macOS and Windows media controls, Discord and MPRIS presence, the display revisions) or key on the URI (the party sync, the plugin track_change, which uses the URI and falls back to the name only for items without one), so they stay on the display snapshot.

@LargeModGames
LargeModGames merged commit 6ae9860 into LargeModGames:main Oct 16, 2026
33 checks passed
LargeModGames pushed a commit that referenced this pull request Oct 16, 2026
# 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- 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