feat: Russian interface language

Adds an i18n module: strings stay in English in the code and are looked
up as tr("…") or trf("… {} …", args), with Russian in i18n/ru.rs.
Includes Russian plurals, genitive month names, "4,1 млн"-style
compact numbers and localised durations. A test scans the sources and
fails on any string without a Russian entry.

A Language setting (match system, English, Русский) defaults to the
system's first preferred language. Yandex's own titles (genres, Home
blocks, station names) switch with it, through a client rebuilt in that
language. Long genre names now wrap instead of spilling over the next
tile. The app bundle declares en and ru localisations.
This commit is contained in:
Yuriy Panov committed 2026-10-15 21:49:01 +06:00
1 parent 52ad4a2e90
commit ff41887f30
35 files changed
+1073 -308

No files matched your search

+8 -1
View File
@@ -44,7 +44,7 @@ This builds a release `Musyx.app` into `target/release/bundle/`, signed with the
## Settings
Settings (streaming quality, appearance, volume) are kept in
Settings (streaming quality, appearance, language, volume) are kept in
`~/Library/Application Support/Musyx/settings.json`. Covers are cached under
`~/Library/Caches/Musyx/covers` and can be cleared from Settings.
@@ -54,6 +54,13 @@ subscription, region and track. When there's no FLAC, it answers with the best l
it allows, and Musyx plays that. The badge in the player bar shows what was actually served,
and turns accent-coloured for FLAC.
The interface is in English and Russian. **Language** in Settings follows the system's first
preferred language by default, and can be set to either. Yandex's own titles (genres, Home
blocks, station names) switch with it. Strings are written in English in the code as
`tr("…")` or `trf("… {} …", &[…])`. The Russian text lives in
`crates/musyx/src/i18n/ru.rs`, and `cargo test` fails for any string that has no entry
there. `MUSYX_SNAPSHOT_LANG=ru` renders a snapshot in Russian.
## Check
```sh