feat(purchases): i18n catalogs + gold purchase badge (Slint)

Slice 13/13 (final). Reconciles the download-progress interpolation in
PurchaseDetailView to proper Slint @tr placeholders (Downloading {}/{},
Download cancelled ({}/{}); tracksCount already placeholder). Fills the 4 non-en
.po catalogs (es/de/fr/pt) with 29 new purchases msgids each, in lock-step, no
duplicates, FR plural untouched, en catalog not modified. Adds the gold
qobuz_purchase source badge (24x24 chip on AlbumCard + inline gold-tint glyphs on
AlbumListRow/TrackRow/LocalAlbumView) gold #eab308. group.*/view.* not renamed.
Build: .po re-bundle + Slint macro expansion compile clean.

cc
This commit is contained in:
vicrodh committed 2026-06-24 18:22:23 -06:00
1 parent 45be8763d7
commit 9fbfcb5582
10 files changed
+434 -24

No files matched your search

@@ -3957,3 +3957,95 @@ msgstr "· Unbegrenzt"
msgid "· of {}"
msgstr "· von {}"
# --- Purchases (Slice 13) ---
msgid "My Purchases"
msgstr "Meine Einkäufe"
msgid "Purchases are downloaded as DRM-free files. Availability depends on your Qobuz region."
msgstr "Einkäufe werden als DRM-freie Dateien heruntergeladen. Die Verfügbarkeit hängt von deiner Qobuz-Region ab."
msgid "Search purchases…"
msgstr "Einkäufe durchsuchen…"
msgid "No purchases yet"
msgstr "Noch keine Einkäufe"
msgid "No purchased tracks yet"
msgstr "Noch keine gekauften Titel"
msgid "Filters"
msgstr "Filter"
msgid "Availability"
msgstr "Verfügbarkeit"
msgid "Hide unavailable"
msgstr "Nicht verfügbare ausblenden"
msgid "CD Quality"
msgstr "CD-Qualität"
msgid "MP3"
msgstr "MP3"
msgid "Downloads"
msgstr "Downloads"
msgid "Hide downloaded"
msgstr "Heruntergeladene auf diesem Computer ausblenden"
msgid "Group: A–Z"
msgstr "Gruppe: A-Z"
msgid "Sort: Date"
msgstr "Sortieren: Datum"
msgid "Sort: Artist"
msgstr "Sortieren: Künstler"
msgid "Sort: Album"
msgstr "Sortieren: Album"
msgid "Sort: Quality"
msgstr "Sortieren: Qualität"
msgid "Date"
msgstr "Datum"
msgid "Download all"
msgstr "Alles herunterladen"
msgid "Download complete"
msgstr "Download abgeschlossen"
msgid "Download cancelled ({}/{})"
msgstr "Download abgebrochen ({}/{})"
msgid "Downloading {}/{}..."
msgstr "Herunterladen {}/{}..."
msgid "Select format"
msgstr "Format auswählen"
msgid "Purchased on"
msgstr "Gekauft am"
msgid "Add these downloaded tracks to your local library."
msgstr "Diese heruntergeladenen Titel zur lokalen Bibliothek hinzufügen."
msgid "{} tracks"
msgstr "{} Titel"
msgid "Choose folder"
msgstr "Ordner wählen"
msgid "Couldn't add to library"
msgstr "Konnte nicht zur Bibliothek hinzugefügt werden"
msgid "Added to library"
msgstr "Zur Bibliothek hinzugefügt"
msgid "Purchased from Qobuz"
msgstr "Qobuz-Kauf"
@@ -3940,3 +3940,95 @@ msgstr "· Ilimitado"
msgid "· of {}"
msgstr "· de {}"
# --- Purchases (Slice 13) ---
msgid "My Purchases"
msgstr "Mis Compras"
msgid "Purchases are downloaded as DRM-free files. Availability depends on your Qobuz region."
msgstr "Las compras se descargan como archivos sin DRM. La disponibilidad depende de tu región de Qobuz."
msgid "Search purchases…"
msgstr "Buscar compras…"
msgid "No purchases yet"
msgstr "Aún no hay compras"
msgid "No purchased tracks yet"
msgstr "Aún no hay pistas compradas"
msgid "Filters"
msgstr "Filtros"
msgid "Availability"
msgstr "Disponibilidad"
msgid "Hide unavailable"
msgstr "Ocultar no disponibles"
msgid "CD Quality"
msgstr "Calidad CD"
msgid "MP3"
msgstr "MP3"
msgid "Downloads"
msgstr "Descargas"
msgid "Hide downloaded"
msgstr "Ocultar descargados en este equipo"
msgid "Group: A–Z"
msgstr "Grupo: A-Z"
msgid "Sort: Date"
msgstr "Ordenar: Fecha"
msgid "Sort: Artist"
msgstr "Ordenar: Artista"
msgid "Sort: Album"
msgstr "Ordenar: Álbum"
msgid "Sort: Quality"
msgstr "Ordenar: Calidad"
msgid "Date"
msgstr "Fecha"
msgid "Download all"
msgstr "Descargar todo"
msgid "Download complete"
msgstr "Descarga completa"
msgid "Download cancelled ({}/{})"
msgstr "Descarga cancelada ({}/{})"
msgid "Downloading {}/{}..."
msgstr "Descargando {}/{}..."
msgid "Select format"
msgstr "Seleccionar formato"
msgid "Purchased on"
msgstr "Comprado el"
msgid "Add these downloaded tracks to your local library."
msgstr "Agregar estas pistas descargadas a tu biblioteca local."
msgid "{} tracks"
msgstr "{} pistas"
msgid "Choose folder"
msgstr "Elegir carpeta"
msgid "Couldn't add to library"
msgstr "No se pudo agregar a la biblioteca"
msgid "Added to library"
msgstr "Agregado a la biblioteca"
msgid "Purchased from Qobuz"
msgstr "Compra de Qobuz"
@@ -3956,3 +3956,95 @@ msgstr "· Illimité"
msgid "· of {}"
msgstr "· sur {}"
# --- Purchases (Slice 13) ---
msgid "My Purchases"
msgstr "Mes achats"
msgid "Purchases are downloaded as DRM-free files. Availability depends on your Qobuz region."
msgstr "Les achats sont téléchargés sous forme de fichiers sans DRM. La disponibilité dépend de votre région Qobuz."
msgid "Search purchases…"
msgstr "Rechercher dans les achats…"
msgid "No purchases yet"
msgstr "Aucun achat pour le moment"
msgid "No purchased tracks yet"
msgstr "Aucun titre acheté pour le moment"
msgid "Filters"
msgstr "Filtres"
msgid "Availability"
msgstr "Disponibilité"
msgid "Hide unavailable"
msgstr "Masquer les indisponibles"
msgid "CD Quality"
msgstr "Qualité CD"
msgid "MP3"
msgstr "MP3"
msgid "Downloads"
msgstr "Téléchargements"
msgid "Hide downloaded"
msgstr "Masquer les téléchargés sur cet ordinateur"
msgid "Group: A–Z"
msgstr "Grouper : A-Z"
msgid "Sort: Date"
msgstr "Trier : Date"
msgid "Sort: Artist"
msgstr "Trier : Artiste"
msgid "Sort: Album"
msgstr "Trier : Album"
msgid "Sort: Quality"
msgstr "Trier : Qualité"
msgid "Date"
msgstr "Date"
msgid "Download all"
msgstr "Tout télécharger"
msgid "Download complete"
msgstr "Téléchargement terminé"
msgid "Download cancelled ({}/{})"
msgstr "Téléchargement annulé ({}/{})"
msgid "Downloading {}/{}..."
msgstr "Téléchargement {}/{}..."
msgid "Select format"
msgstr "Sélectionner le format"
msgid "Purchased on"
msgstr "Acheté le"
msgid "Add these downloaded tracks to your local library."
msgstr "Ajouter ces titres téléchargés à votre bibliothèque locale."
msgid "{} tracks"
msgstr "{} titres"
msgid "Choose folder"
msgstr "Choisir le dossier"
msgid "Couldn't add to library"
msgstr "Impossible d'ajouter à la bibliothèque"
msgid "Added to library"
msgstr "Ajouté à la bibliothèque"
msgid "Purchased from Qobuz"
msgstr "Achat Qobuz"
@@ -3929,3 +3929,95 @@ msgstr "· Ilimitado"
msgid "· of {}"
msgstr "· de {}"
# --- Purchases (Slice 13) ---
msgid "My Purchases"
msgstr "Minhas Compras"
msgid "Purchases are downloaded as DRM-free files. Availability depends on your Qobuz region."
msgstr "As compras são baixadas como arquivos sem DRM. A disponibilidade depende da sua região do Qobuz."
msgid "Search purchases…"
msgstr "Pesquisar compras…"
msgid "No purchases yet"
msgstr "Nenhuma compra ainda"
msgid "No purchased tracks yet"
msgstr "Nenhuma faixa comprada ainda"
msgid "Filters"
msgstr "Filtros"
msgid "Availability"
msgstr "Disponibilidade"
msgid "Hide unavailable"
msgstr "Ocultar indisponíveis"
msgid "CD Quality"
msgstr "Qualidade CD"
msgid "MP3"
msgstr "MP3"
msgid "Downloads"
msgstr "Downloads"
msgid "Hide downloaded"
msgstr "Ocultar baixados neste computador"
msgid "Group: A–Z"
msgstr "Agrupar: A-Z"
msgid "Sort: Date"
msgstr "Ordenar: Data"
msgid "Sort: Artist"
msgstr "Ordenar: Artista"
msgid "Sort: Album"
msgstr "Ordenar: Álbum"
msgid "Sort: Quality"
msgstr "Ordenar: Qualidade"
msgid "Date"
msgstr "Data"
msgid "Download all"
msgstr "Baixar tudo"
msgid "Download complete"
msgstr "Download concluído"
msgid "Download cancelled ({}/{})"
msgstr "Download cancelado ({}/{})"
msgid "Downloading {}/{}..."
msgstr "Baixando {}/{}..."
msgid "Select format"
msgstr "Selecionar formato"
msgid "Purchased on"
msgstr "Comprado em"
msgid "Add these downloaded tracks to your local library."
msgstr "Adicionar estas faixas baixadas à sua biblioteca local."
msgid "{} tracks"
msgstr "{} faixas"
msgid "Choose folder"
msgstr "Escolher pasta"
msgid "Couldn't add to library"
msgstr "Não foi possível adicionar à biblioteca"
msgid "Added to library"
msgstr "Adicionado à biblioteca"
msgid "Purchased from Qobuz"
msgstr "Compra do Qobuz"
@@ -25,14 +25,16 @@ component SourceIcon inherits Image {
width: 14px;
height: 14px;
image-fit: contain;
source: root.kind == "qobuz_download"
source: (root.kind == "qobuz_download" || root.kind == "qobuz_purchase")
? @image-url("../assets/icons/qobuz-logo-filled.svg")
: (root.kind == "plex"
? @image-url("../assets/icons/plex-logo.svg")
: @image-url("../assets/icons/hard-drive.svg"));
colorize: (root.kind == "qobuz_download" || root.kind == "plex")
? transparent
: Theme.text-secondary;
// `qobuz_purchase` → GOLD-tinted Qobuz mark (§8.7 purchase badge).
colorize: root.kind == "qobuz_purchase" ? #eab308
: ((root.kind == "qobuz_download" || root.kind == "plex")
? transparent
: Theme.text-secondary);
}
// Version picker — selected display + dropdown, both with the source icon.
+31 -5
View File
@@ -13,7 +13,7 @@ import { Theme } from "../foundation/semantic-colors.slint";
import { Typography } from "../foundation/typography.slint";
import { Radius } from "../foundation/radius.slint";
import { Spacing } from "../foundation/spacing.slint";
import { AlbumCardItem, NavState } from "../state.slint";
import { AlbumCardItem, NavState, TooltipState } from "../state.slint";
import { QbzIcon } from "../primitives/QbzIcon.slint";
import { QualityBadge } from "../primitives/QualityBadge.slint";
import { ContextMenu } from "../primitives/ContextMenu.slint";
@@ -255,21 +255,47 @@ export component AlbumCard inherits Rectangle {
width: 24px;
height: 24px;
border-radius: 4px;
background: root.album.source == "qobuz_download" ? transparent : #000000b3;
// `qobuz_purchase` → §8.7 gold chip: dark-amber translucent fill +
// gold 1px border (the visual that distinguishes a purchased album
// in the local library; the glyph is GOLD-tinted below).
background: root.album.source == "qobuz_purchase" ? #1e1400d9
: (root.album.source == "qobuz_download" ? transparent : #000000b3);
border-width: root.album.source == "qobuz_purchase" ? 1px : 0px;
border-color: #eab30880;
Image {
source: root.album.source == "plex"
? @image-url("../assets/icons/plex-logo.svg")
: (root.album.source == "qobuz_download"
: (root.album.source == "qobuz_download" || root.album.source == "qobuz_purchase"
? @image-url("../assets/icons/qobuz-logo-filled.svg")
: @image-url("../assets/icons/hard-drive.svg"));
colorize: root.album.source == "local" ? #ffffff : transparent;
colorize: root.album.source == "qobuz_purchase" ? #eab308
: (root.album.source == "local" ? #ffffff : transparent);
width: root.album.source == "plex" ? 16px
: (root.album.source == "qobuz_download" ? 22px : 14px);
: (root.album.source == "qobuz_download" ? 22px
: (root.album.source == "qobuz_purchase" ? 18px : 14px));
height: self.width;
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
image-fit: contain;
}
// §8.7: the gold purchase badge carries a hover tooltip
// `library.qobuzPurchaseIndicator` ("Purchased from Qobuz"),
// mirroring Tauri's SourceBadge `title=` on the qobuz_purchase
// chip. Bare hover TouchArea drives the shared TooltipState;
// wired ONLY for qobuz_purchase (the download/plex/local badges
// have no source tooltip — matching the Tauri baseline).
if root.album.source == "qobuz_purchase": TouchArea {
changed has-hover => {
if (self.has-hover) {
TooltipState.text = @tr("Purchased from Qobuz");
TooltipState.anchor-x = self.absolute-position.x + self.width / 2;
TooltipState.anchor-y = self.absolute-position.y;
TooltipState.show = true;
} else {
TooltipState.show = false;
}
}
}
}
// Context menu for the "more" button.
@@ -275,10 +275,12 @@ export component AlbumListRow inherits Rectangle {
if root.album.source != "": Image {
source: root.album.source == "plex"
? @image-url("../assets/icons/plex-logo.svg")
: (root.album.source == "qobuz" || root.album.source == "qobuz_download"
: (root.album.source == "qobuz" || root.album.source == "qobuz_download" || root.album.source == "qobuz_purchase"
? @image-url("../assets/icons/qobuz-logo-filled.svg")
: @image-url("../assets/icons/hard-drive.svg"));
colorize: root.album.source == "local" ? Theme.text-muted : transparent;
// `qobuz_purchase` → GOLD-tinted Qobuz mark (§8.7 purchase badge).
colorize: root.album.source == "qobuz_purchase" ? #eab308
: (root.album.source == "local" ? Theme.text-muted : transparent);
width: root.album.source == "local" ? 15px : 16px;
height: self.width;
x: 0;
@@ -13,16 +13,20 @@
import { Theme } from "../foundation/semantic-colors.slint";
export component SourceGlyph inherits Image {
// "qobuz" | "qobuz_download" | "plex" | "local" (anything else = local).
// "qobuz" | "qobuz_download" | "qobuz_purchase" | "plex" | "local"
// (anything else = local). `qobuz_purchase` reuses the Qobuz mark GOLD-tinted
// (the §8.7 purchase indicator — same glyph as download, gold distinguishes
// "purchased from Qobuz").
in property <string> kind;
source: root.kind == "plex"
? @image-url("../assets/icons/plex-logo.svg")
: (root.kind == "qobuz" || root.kind == "qobuz_download"
: (root.kind == "qobuz" || root.kind == "qobuz_download" || root.kind == "qobuz_purchase"
? @image-url("../assets/icons/qobuz-logo-filled.svg")
: @image-url("../assets/icons/hard-drive.svg"));
colorize: (root.kind == "qobuz" || root.kind == "qobuz_download" || root.kind == "plex")
? transparent : Theme.text-muted;
width: (root.kind == "qobuz" || root.kind == "qobuz_download") ? 16px : 15px;
colorize: root.kind == "qobuz_purchase" ? #eab308
: ((root.kind == "qobuz" || root.kind == "qobuz_download" || root.kind == "plex")
? transparent : Theme.text-muted);
width: (root.kind == "qobuz" || root.kind == "qobuz_download" || root.kind == "qobuz_purchase") ? 16px : 15px;
height: self.width;
image-fit: contain;
}
@@ -656,10 +656,12 @@ export component TrackRow inherits Rectangle {
Image {
source: root.track.source == "plex"
? @image-url("../assets/icons/plex-logo.svg")
: (root.track.source == "qobuz"
: (root.track.source == "qobuz" || root.track.source == "qobuz_purchase"
? @image-url("../assets/icons/qobuz-logo-filled.svg")
: @image-url("../assets/icons/hard-drive.svg"));
colorize: root.track.source == "local" ? Theme.text-muted : transparent;
// `qobuz_purchase` → GOLD-tinted Qobuz mark (§8.7 purchase badge).
colorize: root.track.source == "qobuz_purchase" ? #eab308
: (root.track.source == "local" ? Theme.text-muted : transparent);
width: root.track.source == "local" ? 15px : 16px;
height: self.width;
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
@@ -507,9 +507,12 @@ export component PurchaseDetailView inherits Rectangle {
}
if !PurchaseDetailState.all-complete
&& PurchaseDetailState.was-cancelled: Text {
text: @tr("Download cancelled") + " ("
+ PurchaseDetailState.completed-count + "/"
+ PurchaseDetailState.total-tracks + ")";
// `purchases.downloadCancelled` {completed}{total} —
// single @tr placeholder form so the Slice-13 catalog
// backs it (NOT concatenated @tr fragments; §8.5).
text: @tr("Download cancelled ({}/{})",
PurchaseDetailState.completed-count,
PurchaseDetailState.total-tracks);
color: Theme.text-secondary;
font-size: Typography.legal;
vertical-alignment: center;
@@ -520,9 +523,12 @@ export component PurchaseDetailView inherits Rectangle {
&& !PurchaseDetailState.was-cancelled: LoadingSpinner { size: 14px; }
if !PurchaseDetailState.all-complete
&& !PurchaseDetailState.was-cancelled: Text {
text: @tr("Downloading") + " "
+ PurchaseDetailState.completed-count + "/"
+ PurchaseDetailState.total-tracks;
// `purchases.downloadProgress` {current}{total} —
// single @tr placeholder form (NOT concatenated @tr
// fragments; §8.5). Trailing "..." matches Tauri source.
text: @tr("Downloading {}/{}...",
PurchaseDetailState.completed-count,
PurchaseDetailState.total-tracks);
color: Theme.text-secondary;
font-size: Typography.legal;
vertical-alignment: center;