i18n: wrap hardcoded Slint labels and plural concatenations

Wrap remaining user-facing literals in @tr across discover (RADIO,
TOP TRACKS), DiscographyBuilder (release-type/order-by labels), the
OfflineManager hero, ExpandableSearch placeholder default, and the
appearance option arrays in state.slint (displayed as-is, no Rust
re-seed). Replace string concatenation with positional @tr plus
ngettext plurals for the DiscographyBuilder footer and OfflineManager
track counts so word order is locale-stable. Language endonyms and the
macOS/Adwaita/quality-tier brand names stay literal.

cc
This commit is contained in:
vicrodh committed 2026-06-23 14:13:40 -06:00
1 parent 8243f2a856
commit 171b175b4f
7 files changed
+33 -34

No files matched your search

@@ -170,7 +170,7 @@ export component OfflineManagerView inherits Rectangle {
VerticalLayout {
alignment: center;
Text {
text: "Offline Cache";
text: @tr("Offline Cache");
color: Theme.text-primary;
// Hero homologated to the canonical 18px (section).
font-size: Typography.section;
@@ -191,7 +191,7 @@ export component OfflineManagerView inherits Rectangle {
VerticalLayout {
alignment: center;
Text {
text: OfflineManagerState.tracks-count + " tracks";
text: @tr("{} track" | "{} tracks" % OfflineManagerState.tracks-count, OfflineManagerState.tracks-count);
color: Theme.text-primary;
font-size: Typography.body;
font-weight: Typography.semibold;
@@ -381,7 +381,7 @@ export component OfflineManagerView inherits Rectangle {
spacing: 2px;
ArtistRailRow {
name: @tr("All artists");
meta: OfflineManagerState.tracks-count + " tracks";
meta: @tr("{} track" | "{} tracks" % OfflineManagerState.tracks-count, OfflineManagerState.tracks-count);
active: OfflineManagerState.selected-artist == "";
clicked => {
OfflineManagerActions.select-artist("");