feat(qbz-qt): phase 20 — live i18n across the 8 bundled locales

tr() gained a revision parameter (trRev qproperty bumps on switch) so
all ~465 QML call sites re-evaluate — the Qt equivalent of Slint's
reseed after select_bundled_translation(). Rust-built documents
(home/library/settings option labels, plural tf() strings, active
album/artist docs via record-free republish paths) re-publish on
switch. Settings > Appearance language selector applies live (Auto +
8 locales, native names, shared ui_prefs.language key); boot honors
the persisted pref (was unconditional resolve_auto). Verified es/ru/ja/
de mid-run with zero tofu (fontconfig covers CJK/Cyrillic); restart
persistence verified; owner's en pref restored.

km
This commit is contained in:
vicrodh committed 2026-07-28 06:44:10 -06:00
1 parent ea644f5e05
commit 245eaa4d45
24 files changed
+535 -452

No files matched your search

+6 -6
View File
@@ -236,12 +236,12 @@ Rectangle {
menuWidth: 196 menuWidth: 196
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Open album"), "icon": "library-big", "action": "open" }, { "label": QbzBridge.tr("Open album", QbzBridge.trRev), "icon": "library-big", "action": "open" },
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-plus", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-plus", "action": "next" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": root.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), "icon": root.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, { "label": root.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev), "icon": root.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
{ "label": QbzBridge.tr("Block this album"), "icon": "blind-eye", "action": "block" }, { "label": QbzBridge.tr("Block this album", QbzBridge.trRev), "icon": "blind-eye", "action": "block" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
+21 -21
View File
@@ -306,10 +306,10 @@ Rectangle {
menuWidth: 196 menuWidth: 196
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-plus", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-plus", "action": "next" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": row.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), "icon": row.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, { "label": row.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev), "icon": row.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -594,7 +594,7 @@ Rectangle {
Item { visible: (header.description || "") !== (header.descriptionShort || ""); width: 1; height: 4 } Item { visible: (header.description || "") !== (header.descriptionShort || ""); width: 1; height: 4 }
Text { Text {
visible: (header.description || "") !== (header.descriptionShort || "") visible: (header.description || "") !== (header.descriptionShort || "")
text: QbzBridge.tr("Read more") text: QbzBridge.tr("Read more", QbzBridge.trRev)
color: readMoreArea.containsMouse ? theme.accentHover : theme.accent color: readMoreArea.containsMouse ? theme.accentHover : theme.accent
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
MouseArea { MouseArea {
@@ -605,7 +605,7 @@ Rectangle {
onClicked: { onClicked: {
var shell = root.parent var shell = root.parent
while (shell && shell.openTextModal === undefined) shell = shell.parent while (shell && shell.openTextModal === undefined) shell = shell.parent
if (shell) shell.openTextModal(QbzBridge.tr("About this album"), header.description || "") if (shell) shell.openTextModal(QbzBridge.tr("About this album", QbzBridge.trRev), header.description || "")
} }
} }
} }
@@ -689,7 +689,7 @@ Rectangle {
QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter } QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("Loading album…") text: QbzBridge.tr("Loading album…", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -755,7 +755,7 @@ Rectangle {
Text { Text {
visible: parent.text === "" visible: parent.text === ""
anchors.fill: parent anchors.fill: parent
text: QbzBridge.tr("Search tracks...") text: QbzBridge.tr("Search tracks...", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -797,9 +797,9 @@ Rectangle {
rightPadding: 12 rightPadding: 12
spacing: 16 spacing: 16
Text { text: "#"; width: 32; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; anchors.verticalCenter: parent.verticalCenter } Text { text: "#"; width: 32; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; anchors.verticalCenter: parent.verticalCenter }
Text { text: QbzBridge.tr("Title"); width: parent.width - 32 - 80 - 80 - 28 - 28 - 32 - 5 * 16 - 24; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; anchors.verticalCenter: parent.verticalCenter; elide: Text.ElideRight } Text { text: QbzBridge.tr("Title", QbzBridge.trRev); width: parent.width - 32 - 80 - 80 - 28 - 28 - 32 - 5 * 16 - 24; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; anchors.verticalCenter: parent.verticalCenter; elide: Text.ElideRight }
Text { text: QbzBridge.tr("Duration"); width: 80; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; horizontalAlignment: Text.AlignHCenter; anchors.verticalCenter: parent.verticalCenter } Text { text: QbzBridge.tr("Duration", QbzBridge.trRev); width: 80; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; horizontalAlignment: Text.AlignHCenter; anchors.verticalCenter: parent.verticalCenter }
Text { text: QbzBridge.tr("Quality"); width: 80; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; horizontalAlignment: Text.AlignHCenter; anchors.verticalCenter: parent.verticalCenter } Text { text: QbzBridge.tr("Quality", QbzBridge.trRev); width: 80; color: theme.textMuted; font.pixelSize: 13; font.letterSpacing: 0.5; horizontalAlignment: Text.AlignHCenter; anchors.verticalCenter: parent.verticalCenter }
Item { width: 28; height: 1; QbzIcon { name: "heart"; width: 14; height: 14; anchors.centerIn: parent; tintName: "muted" } } Item { width: 28; height: 1; QbzIcon { name: "heart"; width: 14; height: 14; anchors.centerIn: parent; tintName: "muted" } }
Item { width: 28; height: 1; QbzIcon { name: "cloud-download"; width: 14; height: 14; anchors.centerIn: parent; tintName: "muted" } } Item { width: 28; height: 1; QbzIcon { name: "cloud-download"; width: 14; height: 14; anchors.centerIn: parent; tintName: "muted" } }
Item { width: 32; height: 1 } Item { width: 32; height: 1 }
@@ -823,7 +823,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 12 anchors.leftMargin: 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Disc") + " " + hdr.disc text: QbzBridge.tr("Disc", QbzBridge.trRev) + " " + hdr.disc
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -889,7 +889,7 @@ Rectangle {
visible: (header.label || "") !== "" visible: (header.label || "") !== ""
width: parent.width width: parent.width
spacing: 8 spacing: 8
SidebarHeading { text: QbzBridge.tr("LABEL") } SidebarHeading { text: QbzBridge.tr("LABEL", QbzBridge.trRev) }
SidebarCard { SidebarCard {
name: header.label || "" name: header.label || ""
iconName: "disc" iconName: "disc"
@@ -902,7 +902,7 @@ Rectangle {
visible: awards.length > 0 visible: awards.length > 0
width: parent.width width: parent.width
spacing: 8 spacing: 8
SidebarHeading { text: QbzBridge.tr("AWARDS") } SidebarHeading { text: QbzBridge.tr("AWARDS", QbzBridge.trRev) }
Repeater { Repeater {
model: awards model: awards
delegate: SidebarCard { delegate: SidebarCard {
@@ -922,14 +922,14 @@ Rectangle {
Item { visible: (album.moreFromArtist || []).length > 0; width: 1; height: 40 } Item { visible: (album.moreFromArtist || []).length > 0; width: 1; height: 40 }
SectionRail { SectionRail {
visible: (album.moreFromArtist || []).length > 0 visible: (album.moreFromArtist || []).length > 0
title: QbzBridge.tr("From the same artist") title: QbzBridge.tr("From the same artist", QbzBridge.trRev)
items: album.moreFromArtist || [] items: album.moreFromArtist || []
coverMap: root.coverMap coverMap: root.coverMap
} }
Item { visible: (album.suggestions || []).length > 0; width: 1; height: 40 } Item { visible: (album.suggestions || []).length > 0; width: 1; height: 40 }
SectionRail { SectionRail {
visible: (album.suggestions || []).length > 0 visible: (album.suggestions || []).length > 0
title: QbzBridge.tr("Listening suggestions") title: QbzBridge.tr("Listening suggestions", QbzBridge.trRev)
items: album.suggestions || [] items: album.suggestions || []
coverMap: root.coverMap coverMap: root.coverMap
} }
@@ -951,11 +951,11 @@ Rectangle {
menuWidth: 196 menuWidth: 196
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-plus", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-plus", "action": "next" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": header.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), "icon": header.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, { "label": header.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev), "icon": header.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
{ "label": header.isPinned ? QbzBridge.tr("Unpin") : QbzBridge.tr("Pin"), "icon": header.isPinned ? "pin-filled" : "pin", "action": "pin" }, { "label": header.isPinned ? QbzBridge.tr("Unpin", QbzBridge.trRev) : QbzBridge.tr("Pin", QbzBridge.trRev), "icon": header.isPinned ? "pin-filled" : "pin", "action": "pin" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
+1 -1
View File
@@ -312,7 +312,7 @@ Rectangle {
spacing: 2 spacing: 2
Text { Text {
text: QbzBridge.dragCount > 1 text: QbzBridge.dragCount > 1
? QbzBridge.dragCount + " " + QbzBridge.tr("tracks") ? QbzBridge.dragCount + " " + QbzBridge.tr("tracks", QbzBridge.trRev)
: QbzBridge.dragTitle : QbzBridge.dragTitle
color: "#ffffff" color: "#ffffff"
font.pixelSize: 12 font.pixelSize: 12
+55 -55
View File
@@ -67,9 +67,9 @@ Column {
readonly property bool tbLocked: doc.hideTitleBar === true || doc.useSystemTitleBar === true readonly property bool tbLocked: doc.hideTitleBar === true || doc.useSystemTitleBar === true
// ============================ THEME ================================== // ============================ THEME ==================================
GroupHeader { text: QbzBridge.tr("THEME") } GroupHeader { text: QbzBridge.tr("THEME", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Theme") label: QbzBridge.tr("Theme", QbzBridge.trRev)
Row { Row {
spacing: 8 spacing: 8
// Filter cycle (All -> Dark -> Light): sun-moon / moon / sun. // Filter cycle (All -> Dark -> Light): sun-moon / moon / sun.
@@ -109,15 +109,15 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Album header gradient") label: QbzBridge.tr("Album header gradient", QbzBridge.trRev)
description: QbzBridge.tr("Use artwork-derived blur as a backdrop in album and artist detail views.") description: QbzBridge.tr("Use artwork-derived blur as a backdrop in album and artist detail views.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.albumHeaderGradient === true checked: root.doc.albumHeaderGradient === true
onToggled: function (v) { QbzBridge.settingsBool("album-header-gradient", v) } onToggled: function (v) { QbzBridge.settingsBool("album-header-gradient", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Dynamic background") label: QbzBridge.tr("Dynamic background", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: root.doc.appBackgroundModes || [] options: root.doc.appBackgroundModes || []
@@ -126,7 +126,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Intelligent Search") label: QbzBridge.tr("Intelligent Search", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.intelligentSearch === true checked: root.doc.intelligentSearch === true
onToggled: function (v) { QbzBridge.settingsBool("intelligent-search", v) } onToggled: function (v) { QbzBridge.settingsBool("intelligent-search", v) }
@@ -135,28 +135,28 @@ Column {
// Auto-theme rows (theme slug "auto" only). // Auto-theme rows (theme slug "auto" only).
SettingRow { SettingRow {
visible: QbzBridge.themeSlug === "auto" visible: QbzBridge.themeSlug === "auto"
label: QbzBridge.tr("Source") label: QbzBridge.tr("Source", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: [QbzBridge.tr("System Colors"), QbzBridge.tr("Wallpaper Sync"), QbzBridge.tr("Custom Image")] options: [QbzBridge.tr("System Colors", QbzBridge.trRev), QbzBridge.tr("Wallpaper Sync", QbzBridge.trRev), QbzBridge.tr("Custom Image", QbzBridge.trRev)]
currentIndex: root.doc.autoThemeSourceIndex || 0 currentIndex: root.doc.autoThemeSourceIndex || 0
onSelected: function (i) { QbzBridge.settingsSelect("auto-theme-source", i) } onSelected: function (i) { QbzBridge.settingsSelect("auto-theme-source", i) }
} }
} }
SettingRow { SettingRow {
visible: QbzBridge.themeSlug === "auto" visible: QbzBridge.themeSlug === "auto"
label: QbzBridge.tr("Regenerate") label: QbzBridge.tr("Regenerate", QbzBridge.trRev)
description: QbzBridge.tr("Rebuild the palette from the source (System colors in the POC).") description: QbzBridge.tr("Rebuild the palette from the source (System colors in the POC).", QbzBridge.trRev)
SettingsButton { SettingsButton {
text: QbzBridge.tr("Regenerate") text: QbzBridge.tr("Regenerate", QbzBridge.trRev)
onClicked: QbzBridge.themeSet(QbzBridge.themeSlug) onClicked: QbzBridge.themeSet(QbzBridge.themeSlug)
} }
} }
// Custom-theme rows (theme slug "custom" only) — no token editor. // Custom-theme rows (theme slug "custom" only) — no token editor.
SettingRow { SettingRow {
visible: QbzBridge.themeSlug === "custom" visible: QbzBridge.themeSlug === "custom"
label: QbzBridge.tr("Custom theme") label: QbzBridge.tr("Custom theme", QbzBridge.trRev)
description: QbzBridge.tr("Applied read-only from custom_theme.json — the token editor is not ported to the Qt frontend (POC).") description: QbzBridge.tr("Applied read-only from custom_theme.json — the token editor is not ported to the Qt frontend (POC).", QbzBridge.trRev)
} }
SettingsSpacer { } SettingsSpacer { }
@@ -164,9 +164,9 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ===================== TYPOGRAPHY & LANGUAGE ========================= // ===================== TYPOGRAPHY & LANGUAGE =========================
GroupHeader { text: QbzBridge.tr("TYPOGRAPHY & LANGUAGE") } GroupHeader { text: QbzBridge.tr("TYPOGRAPHY & LANGUAGE", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Language") label: QbzBridge.tr("Language", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: root.doc.languages || [] options: root.doc.languages || []
@@ -175,8 +175,8 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Interface size") label: QbzBridge.tr("Interface size", QbzBridge.trRev)
description: QbzBridge.tr("Restart to apply.") description: QbzBridge.tr("Restart to apply.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: root.doc.uiScales || [] options: root.doc.uiScales || []
@@ -185,7 +185,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Immersive search") label: QbzBridge.tr("Immersive search", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.immersiveSearchActions || [] options: root.doc.immersiveSearchActions || []
@@ -194,7 +194,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Immersive default view") label: QbzBridge.tr("Immersive default view", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.immersiveDefaultViews || [] options: root.doc.immersiveDefaultViews || []
@@ -208,9 +208,9 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ======================= LIBRARY & VISUALS =========================== // ======================= LIBRARY & VISUALS ===========================
GroupHeader { text: QbzBridge.tr("LIBRARY & VISUALS") } GroupHeader { text: QbzBridge.tr("LIBRARY & VISUALS", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Show navigation in sidebar") label: QbzBridge.tr("Show navigation in sidebar", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.navInSidebar === true checked: root.doc.navInSidebar === true
onToggled: function (v) { QbzBridge.settingsBool("nav-in-sidebar", v) } onToggled: function (v) { QbzBridge.settingsBool("nav-in-sidebar", v) }
@@ -219,14 +219,14 @@ Column {
SettingRow { SettingRow {
// ADR-010: only mounted when navigation is NOT in the sidebar. // ADR-010: only mounted when navigation is NOT in the sidebar.
visible: root.doc.navInSidebar !== true visible: root.doc.navInSidebar !== true
label: QbzBridge.tr("Compact header navigation") label: QbzBridge.tr("Compact header navigation", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.navHeaderCompact === true checked: root.doc.navHeaderCompact === true
onToggled: function (v) { QbzBridge.settingsBool("nav-header-compact", v) } onToggled: function (v) { QbzBridge.settingsBool("nav-header-compact", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("My QBZ") label: QbzBridge.tr("My QBZ", QbzBridge.trRev)
Row { Row {
spacing: 8 spacing: 8
RoundedImage { RoundedImage {
@@ -238,7 +238,7 @@ Column {
QbzLineEdit { QbzLineEdit {
width: 150 width: 150
text: root.doc.myQbzLabel || "" text: root.doc.myQbzLabel || ""
placeholder: QbzBridge.tr("My QBZ") placeholder: QbzBridge.tr("My QBZ", QbzBridge.trRev)
onCommitted: function (v) { QbzBridge.settingsString("myqbz-label", v) } onCommitted: function (v) { QbzBridge.settingsString("myqbz-label", v) }
} }
SettingsButton { SettingsButton {
@@ -248,28 +248,28 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Show playlist cover collages in sidebar") label: QbzBridge.tr("Show playlist cover collages in sidebar", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.sidebarPlaylistCollage === true checked: root.doc.sidebarPlaylistCollage === true
onToggled: function (v) { QbzBridge.settingsBool("sidebar-playlist-collage", v) } onToggled: function (v) { QbzBridge.settingsBool("sidebar-playlist-collage", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Show album artwork in Local Library track list") label: QbzBridge.tr("Show album artwork in Local Library track list", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.localLibraryTrackArtwork === true checked: root.doc.localLibraryTrackArtwork === true
onToggled: function (v) { QbzBridge.settingsBool("local-library-track-artwork", v) } onToggled: function (v) { QbzBridge.settingsBool("local-library-track-artwork", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Play indicator animation") label: QbzBridge.tr("Play indicator animation", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.playIndicatorAnimation === true checked: root.doc.playIndicatorAnimation === true
onToggled: function (v) { QbzBridge.settingsBool("play-indicator-animation", v) } onToggled: function (v) { QbzBridge.settingsBool("play-indicator-animation", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Invert swipe navigation direction") label: QbzBridge.tr("Invert swipe navigation direction", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.invertSwipeNavigation === true checked: root.doc.invertSwipeNavigation === true
onToggled: function (v) { QbzBridge.settingsBool("invert-swipe-navigation", v) } onToggled: function (v) { QbzBridge.settingsBool("invert-swipe-navigation", v) }
@@ -281,16 +281,16 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ========================= NOTIFICATIONS ============================= // ========================= NOTIFICATIONS =============================
GroupHeader { text: QbzBridge.tr("NOTIFICATIONS") } GroupHeader { text: QbzBridge.tr("NOTIFICATIONS", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("In-app toasts notifications") label: QbzBridge.tr("In-app toasts notifications", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.inAppToasts === true checked: root.doc.inAppToasts === true
onToggled: function (v) { QbzBridge.settingsBool("in-app-toasts", v) } onToggled: function (v) { QbzBridge.settingsBool("in-app-toasts", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("System Notifications") label: QbzBridge.tr("System Notifications", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.systemNotifications === true checked: root.doc.systemNotifications === true
onToggled: function (v) { QbzBridge.settingsBool("system-notifications", v) } onToggled: function (v) { QbzBridge.settingsBool("system-notifications", v) }
@@ -302,9 +302,9 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ========================= WINDOW TITLE ============================== // ========================= WINDOW TITLE ==============================
GroupHeader { text: QbzBridge.tr("WINDOW TITLE") } GroupHeader { text: QbzBridge.tr("WINDOW TITLE", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Show track in window title") label: QbzBridge.tr("Show track in window title", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.windowTitleShow === true checked: root.doc.windowTitleShow === true
onToggled: function (v) { QbzBridge.settingsBool("window-title-show", v) } onToggled: function (v) { QbzBridge.settingsBool("window-title-show", v) }
@@ -316,17 +316,17 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ========================== TITLE BAR ================================ // ========================== TITLE BAR ================================
GroupHeader { text: QbzBridge.tr("TITLE BAR") } GroupHeader { text: QbzBridge.tr("TITLE BAR", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Use system title bar") label: QbzBridge.tr("Use system title bar", QbzBridge.trRev)
description: QbzBridge.tr("Restart to apply.") description: QbzBridge.tr("Restart to apply.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.useSystemTitleBar === true checked: root.doc.useSystemTitleBar === true
onToggled: function (v) { QbzBridge.settingsBool("use-system-title-bar", v) } onToggled: function (v) { QbzBridge.settingsBool("use-system-title-bar", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Hide title bar") label: QbzBridge.tr("Hide title bar", QbzBridge.trRev)
rowEnabled: root.doc.useSystemTitleBar !== true rowEnabled: root.doc.useSystemTitleBar !== true
QbzToggle { QbzToggle {
enabled: root.doc.useSystemTitleBar !== true enabled: root.doc.useSystemTitleBar !== true
@@ -340,9 +340,9 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ======================= WINDOW CONTROLS ============================= // ======================= WINDOW CONTROLS =============================
GroupHeader { text: QbzBridge.tr("WINDOW CONTROLS") } GroupHeader { text: QbzBridge.tr("WINDOW CONTROLS", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Window controls position") label: QbzBridge.tr("Window controls position", QbzBridge.trRev)
rowEnabled: !root.tbLocked rowEnabled: !root.tbLocked
QbzSelect { QbzSelect {
enabled: !root.tbLocked enabled: !root.tbLocked
@@ -353,7 +353,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Show window controls") label: QbzBridge.tr("Show window controls", QbzBridge.trRev)
rowEnabled: !root.tbLocked rowEnabled: !root.tbLocked
QbzToggle { QbzToggle {
enabled: !root.tbLocked enabled: !root.tbLocked
@@ -367,16 +367,16 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ========================= PLAYER VIEWS ============================== // ========================= PLAYER VIEWS ==============================
GroupHeader { text: QbzBridge.tr("PLAYER VIEWS") } GroupHeader { text: QbzBridge.tr("PLAYER VIEWS", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Show volume +/- buttons") label: QbzBridge.tr("Show volume +/- buttons", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.showVolumeSteppers === true checked: root.doc.showVolumeSteppers === true
onToggled: function (v) { QbzBridge.settingsBool("show-volume-steppers", v) } onToggled: function (v) { QbzBridge.settingsBool("show-volume-steppers", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Mini player default view") label: QbzBridge.tr("Mini player default view", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.miniDefaultViews || [] options: root.doc.miniDefaultViews || []
@@ -385,7 +385,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Startup page") label: QbzBridge.tr("Startup page", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.startupPages || [] options: root.doc.startupPages || []
@@ -394,14 +394,14 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Show Purchases") label: QbzBridge.tr("Show Purchases", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.showPurchases === true checked: root.doc.showPurchases === true
onToggled: function (v) { QbzBridge.settingsBool("show-purchases", v) } onToggled: function (v) { QbzBridge.settingsBool("show-purchases", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Purchases in title bar") label: QbzBridge.tr("Purchases in title bar", QbzBridge.trRev)
rowEnabled: !root.tbLocked rowEnabled: !root.tbLocked
QbzToggle { QbzToggle {
enabled: !root.tbLocked enabled: !root.tbLocked
@@ -415,16 +415,16 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ========================== SYSTEM TRAY ============================== // ========================== SYSTEM TRAY ==============================
GroupHeader { text: QbzBridge.tr("SYSTEM TRAY") } GroupHeader { text: QbzBridge.tr("SYSTEM TRAY", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Enable tray icon") label: QbzBridge.tr("Enable tray icon", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.trayEnable === true checked: root.doc.trayEnable === true
onToggled: function (v) { QbzBridge.settingsBool("tray-enable", v) } onToggled: function (v) { QbzBridge.settingsBool("tray-enable", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Close to tray") label: QbzBridge.tr("Close to tray", QbzBridge.trRev)
rowEnabled: root.doc.trayEnable === true rowEnabled: root.doc.trayEnable === true
QbzToggle { QbzToggle {
enabled: root.doc.trayEnable === true enabled: root.doc.trayEnable === true
@@ -433,7 +433,7 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Tray icon variant") label: QbzBridge.tr("Tray icon variant", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: root.doc.trayIconThemes || [] options: root.doc.trayIconThemes || []
@@ -447,10 +447,10 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// =========================== RENDERER ================================ // =========================== RENDERER ================================
GroupHeader { text: QbzBridge.tr("RENDERER") } GroupHeader { text: QbzBridge.tr("RENDERER", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Rendering backend") label: QbzBridge.tr("Rendering backend", QbzBridge.trRev)
description: QbzBridge.tr("Restart to apply.") description: QbzBridge.tr("Restart to apply.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.renderers || [] options: root.doc.renderers || []
@@ -459,8 +459,8 @@ Column {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Preferred GPU") label: QbzBridge.tr("Preferred GPU", QbzBridge.trRev)
description: QbzBridge.tr("Restart to apply.") description: QbzBridge.tr("Restart to apply.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 260 menuWidth: 260
options: root.doc.gpuPowers || [] options: root.doc.gpuPowers || []
+35 -35
View File
@@ -53,13 +53,13 @@ Rectangle {
// JUMP TO tabs from the present sections (ArtistState.jump-tabs). // JUMP TO tabs from the present sections (ArtistState.jump-tabs).
readonly property var jumpTabs: { readonly property var jumpTabs: {
var tabs = [] var tabs = []
if ((artist.bio || "") !== "") tabs.push({ "id": "about", "label": QbzBridge.tr("About") }) if ((artist.bio || "") !== "") tabs.push({ "id": "about", "label": QbzBridge.tr("About", QbzBridge.trRev) })
if (topTracks.length > 0) tabs.push({ "id": "popular-tracks", "label": QbzBridge.tr("Popular Tracks") }) if (topTracks.length > 0) tabs.push({ "id": "popular-tracks", "label": QbzBridge.tr("Popular Tracks", QbzBridge.trRev) })
for (var i = 0; i < releaseSections.length; i++) { for (var i = 0; i < releaseSections.length; i++) {
if (releaseSections[i].releaseType !== "other") if (releaseSections[i].releaseType !== "other")
tabs.push({ "id": releaseSections[i].releaseType, "label": releaseSections[i].title }) tabs.push({ "id": releaseSections[i].releaseType, "label": releaseSections[i].title })
} }
if (appearsOn.length > 0) tabs.push({ "id": "appears-on", "label": QbzBridge.tr("Appears On") }) if (appearsOn.length > 0) tabs.push({ "id": "appears-on", "label": QbzBridge.tr("Appears On", QbzBridge.trRev) })
return tabs return tabs
} }
@@ -429,7 +429,7 @@ Rectangle {
id: seeAll id: seeAll
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 28 height: 28
text: QbzBridge.tr("See discography") text: QbzBridge.tr("See discography", QbzBridge.trRev)
color: seeAllArea.containsMouse ? theme.textPrimary : theme.textSecondary color: seeAllArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -456,7 +456,7 @@ Rectangle {
spacing: 6 spacing: 6
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Newest") text: QbzBridge.tr("Newest", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -505,7 +505,7 @@ Rectangle {
Text { Text {
id: loadMoreText id: loadMoreText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Load more") text: QbzBridge.tr("Load more", QbzBridge.trRev)
color: loadMoreArea.containsMouse ? theme.textPrimary : theme.textSecondary color: loadMoreArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -590,7 +590,7 @@ Rectangle {
Item { visible: artist.bioTruncated === true; width: 1; height: 4 } Item { visible: artist.bioTruncated === true; width: 1; height: 4 }
Text { Text {
visible: artist.bioTruncated === true visible: artist.bioTruncated === true
text: QbzBridge.tr("Read more") text: QbzBridge.tr("Read more", QbzBridge.trRev)
color: readMoreArea.containsMouse ? theme.accentHover : theme.accent color: readMoreArea.containsMouse ? theme.accentHover : theme.accent
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
MouseArea { MouseArea {
@@ -654,8 +654,8 @@ Rectangle {
spacing: 4 spacing: 4
Repeater { Repeater {
model: [ model: [
{ "id": "catalog", "label": QbzBridge.tr("From catalog"), "count": 0 }, { "id": "catalog", "label": QbzBridge.tr("From catalog", QbzBridge.trRev), "count": 0 },
{ "id": "library", "label": QbzBridge.tr("In library"), "count": artist.libraryCount || 0 }, { "id": "library", "label": QbzBridge.tr("In library", QbzBridge.trRev), "count": artist.libraryCount || 0 },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -762,7 +762,7 @@ Rectangle {
QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter } QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("Loading artist…") text: QbzBridge.tr("Loading artist…", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -785,7 +785,7 @@ Rectangle {
Text { Text {
width: parent.width - 44 - 32 - 32 - 3 * 12 width: parent.width - 44 - 32 - 32 - 3 * 12
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Popular Tracks") text: QbzBridge.tr("Popular Tracks", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -837,7 +837,7 @@ Rectangle {
color: "transparent" color: "transparent"
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: root.topTracksExpanded ? QbzBridge.tr("View less") : QbzBridge.tr("Load more") text: root.topTracksExpanded ? QbzBridge.tr("View less", QbzBridge.trRev) : QbzBridge.tr("Load more", QbzBridge.trRev)
color: loadMoreTopArea.containsMouse ? theme.textPrimary : theme.textSecondary color: loadMoreTopArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
MouseArea { MouseArea {
@@ -858,7 +858,7 @@ Rectangle {
spacing: 12 spacing: 12
Item { width: 1; height: 32 } Item { width: 1; height: 32 }
Text { Text {
text: QbzBridge.tr("Latest release") text: QbzBridge.tr("Latest release", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -897,7 +897,7 @@ Rectangle {
spacing: 0 spacing: 0
Item { width: 1; height: 32 } Item { width: 1; height: 32 }
Text { Text {
text: QbzBridge.tr("Appears On") text: QbzBridge.tr("Appears On", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -921,7 +921,7 @@ Rectangle {
color: "transparent" color: "transparent"
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: root.appearsOnExpanded ? QbzBridge.tr("View less") : QbzBridge.tr("Load more") text: root.appearsOnExpanded ? QbzBridge.tr("View less", QbzBridge.trRev) : QbzBridge.tr("Load more", QbzBridge.trRev)
color: loadMoreAppArea.containsMouse ? theme.textPrimary : theme.textSecondary color: loadMoreAppArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
MouseArea { MouseArea {
@@ -942,7 +942,7 @@ Rectangle {
spacing: 12 spacing: 12
Item { width: 1; height: 32 } Item { width: 1; height: 32 }
Text { Text {
text: QbzBridge.tr("Playlists") text: QbzBridge.tr("Playlists", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1022,7 +1022,7 @@ Rectangle {
Text { Text {
id: otherToggle id: otherToggle
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.otherExpanded ? QbzBridge.tr("Hide") : QbzBridge.tr("Show") text: root.otherExpanded ? QbzBridge.tr("Hide", QbzBridge.trRev) : QbzBridge.tr("Show", QbzBridge.trRev)
color: otherToggleArea.containsMouse ? theme.textPrimary : theme.textSecondary color: otherToggleArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
MouseArea { MouseArea {
@@ -1080,7 +1080,7 @@ Rectangle {
Text { Text {
visible: libTracks.length > 0 visible: libTracks.length > 0
text: QbzBridge.tr("Tracks") text: QbzBridge.tr("Tracks", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1104,7 +1104,7 @@ Rectangle {
Item { visible: libraryTab.libAlbums.length > 0; width: 1; height: 24 } Item { visible: libraryTab.libAlbums.length > 0; width: 1; height: 24 }
Text { Text {
visible: libraryTab.libAlbums.length > 0 visible: libraryTab.libAlbums.length > 0
text: QbzBridge.tr("Albums") text: QbzBridge.tr("Albums", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1175,8 +1175,8 @@ Rectangle {
spacing: 14 spacing: 14
Repeater { Repeater {
model: [ model: [
{ "id": "network", "label": QbzBridge.tr("Network") }, { "id": "network", "label": QbzBridge.tr("Network", QbzBridge.trRev) },
{ "id": "magazine", "label": QbzBridge.tr("Magazine") }, { "id": "magazine", "label": QbzBridge.tr("Magazine", QbzBridge.trRev) },
] ]
delegate: Column { delegate: Column {
required property var modelData required property var modelData
@@ -1255,7 +1255,7 @@ Rectangle {
bottomPadding: 6 bottomPadding: 6
spacing: 4 spacing: 4
Text { Text {
text: QbzBridge.tr("LABELS") text: QbzBridge.tr("LABELS", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1263,7 +1263,7 @@ Rectangle {
} }
Text { Text {
visible: labels.length === 0 visible: labels.length === 0
text: QbzBridge.tr("No label info") text: QbzBridge.tr("No label info", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -1286,7 +1286,7 @@ Rectangle {
bottomPadding: 6 bottomPadding: 6
spacing: 4 spacing: 4
Text { Text {
text: QbzBridge.tr("SIMILAR ARTISTS") text: QbzBridge.tr("SIMILAR ARTISTS", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1294,7 +1294,7 @@ Rectangle {
} }
Text { Text {
visible: similarArtists.length === 0 && QbzBridge.artistLoading visible: similarArtists.length === 0 && QbzBridge.artistLoading
text: QbzBridge.tr("Loading…") text: QbzBridge.tr("Loading…", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -1334,7 +1334,7 @@ Rectangle {
id: radioPopup id: radioPopup
menuWidth: 180 menuWidth: 180
Repeater { Repeater {
model: [QbzBridge.tr("QBZ Radio"), QbzBridge.tr("Qobuz Radio")] model: [QbzBridge.tr("QBZ Radio", QbzBridge.trRev), QbzBridge.tr("Qobuz Radio", QbzBridge.trRev)]
delegate: Rectangle { delegate: Rectangle {
required property string modelData required property string modelData
width: parent ? parent.width : 0 width: parent ? parent.width : 0
@@ -1371,10 +1371,10 @@ Rectangle {
menuWidth: 224 menuWidth: 224
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Create Artist Collection"), "icon": "library-big", "action": "stub" }, { "label": QbzBridge.tr("Create Artist Collection", QbzBridge.trRev), "icon": "library-big", "action": "stub" },
{ "label": QbzBridge.tr("Artist Scene"), "icon": "map-pin", "action": "stub" }, { "label": QbzBridge.tr("Artist Scene", QbzBridge.trRev), "icon": "map-pin", "action": "stub" },
{ "label": QbzBridge.tr("Share"), "icon": "link", "action": "stub" }, { "label": QbzBridge.tr("Share", QbzBridge.trRev), "icon": "link", "action": "stub" },
{ "label": artist.isPinned ? QbzBridge.tr("Unpin") : QbzBridge.tr("Pin"), "icon": artist.isPinned ? "pin-filled" : "pin", "action": "pin" }, { "label": artist.isPinned ? QbzBridge.tr("Unpin", QbzBridge.trRev) : QbzBridge.tr("Pin", QbzBridge.trRev), "icon": artist.isPinned ? "pin-filled" : "pin", "action": "pin" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -1425,7 +1425,7 @@ Rectangle {
QbzIcon { name: "blind-eye"; width: 15; height: 15; anchors.verticalCenter: parent.verticalCenter; tintName: "secondary" } QbzIcon { name: "blind-eye"; width: 15; height: 15; anchors.verticalCenter: parent.verticalCenter; tintName: "secondary" }
Text { Text {
height: parent.height height: parent.height
text: QbzBridge.tr("Blacklist artist") text: QbzBridge.tr("Blacklist artist", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -1447,10 +1447,10 @@ Rectangle {
menuWidth: 224 menuWidth: 224
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Play all next"), "icon": "list-start", "action": "next-all" }, { "label": QbzBridge.tr("Play all next", QbzBridge.trRev), "icon": "list-start", "action": "next-all" },
{ "label": QbzBridge.tr("Add all to queue"), "icon": "list-end", "action": "queue-all" }, { "label": QbzBridge.tr("Add all to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue-all" },
{ "label": QbzBridge.tr("Shuffle all"), "icon": "shuffle", "action": "shuffle-all" }, { "label": QbzBridge.tr("Shuffle all", QbzBridge.trRev), "icon": "shuffle", "action": "shuffle-all" },
{ "label": QbzBridge.tr("Add all to playlist"), "icon": "list-music", "action": "playlist-all" }, { "label": QbzBridge.tr("Add all to playlist", QbzBridge.trRev), "icon": "list-music", "action": "playlist-all" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
+3 -3
View File
@@ -201,7 +201,7 @@ Item {
Text { Text {
x: 14 x: 14
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("No results for") + " “" + (root.doc.query || "") + "”" text: QbzBridge.tr("No results for", QbzBridge.trRev) + " “" + (root.doc.query || "") + "”"
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -217,7 +217,7 @@ Item {
Text { Text {
x: 10 x: 10
height: 22 height: 22
text: QbzBridge.tr("Top result") text: QbzBridge.tr("Top result", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -253,7 +253,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 10 anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("View more") text: QbzBridge.tr("View more", QbzBridge.trRev)
color: vmArea.containsMouse ? theme.textPrimary : theme.accent color: vmArea.containsMouse ? theme.textPrimary : theme.accent
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightMedium font.weight: theme.weightMedium
+20 -20
View File
@@ -294,7 +294,7 @@ Rectangle {
visible: searchInput.text === "" && !searchInput.activeFocus visible: searchInput.text === "" && !searchInput.activeFocus
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: 30 anchors.leftMargin: 30
text: QbzBridge.tr("Search") text: QbzBridge.tr("Search", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -308,7 +308,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 10 anchors.rightMargin: 10
height: parent.height height: parent.height
text: "⏎ " + QbzBridge.tr("Enter") text: "⏎ " + QbzBridge.tr("Enter", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -376,9 +376,9 @@ Rectangle {
} }
Text { Text {
height: parent.height height: parent.height
text: root.badgeState === 3 ? QbzBridge.tr("Logged out") text: root.badgeState === 3 ? QbzBridge.tr("Logged out", QbzBridge.trRev)
: root.badgeState === 2 ? QbzBridge.tr("Offline (manual)") : root.badgeState === 2 ? QbzBridge.tr("Offline (manual)", QbzBridge.trRev)
: QbzBridge.tr("Offline (hard)") : QbzBridge.tr("Offline (hard)", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 11 font.pixelSize: 11
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -422,13 +422,13 @@ Rectangle {
width: parent.width - 23 width: parent.width - 23
text: root.badgeState === 3 text: root.badgeState === 3
? (QbzBridge.connectivity === 2 ? (QbzBridge.connectivity === 2
? QbzBridge.tr("You're signed out. Sign-in needs a connection.") ? QbzBridge.tr("You're signed out. Sign-in needs a connection.", QbzBridge.trRev)
: QbzBridge.connectivity === 1 : QbzBridge.connectivity === 1
? QbzBridge.tr("Connection available — sign back in to Qobuz.") ? QbzBridge.tr("Connection available — sign back in to Qobuz.", QbzBridge.trRev)
: QbzBridge.tr("You're signed out — sign back in to Qobuz.")) : QbzBridge.tr("You're signed out — sign back in to Qobuz.", QbzBridge.trRev))
: root.badgeState === 2 : root.badgeState === 2
? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.") ? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.", QbzBridge.trRev)
: QbzBridge.tr("No internet connection — your local library and downloads keep working.") : QbzBridge.tr("No internet connection — your local library and downloads keep working.", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@@ -452,7 +452,7 @@ Rectangle {
Text { Text {
id: signInText id: signInText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Sign in") text: QbzBridge.tr("Sign in", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -591,14 +591,14 @@ Rectangle {
spacing: 2 spacing: 2
Text { Text {
text: QbzBridge.sessionUserName === "" text: QbzBridge.sessionUserName === ""
? QbzBridge.tr("Guest") : QbzBridge.sessionUserName ? QbzBridge.tr("Guest", QbzBridge.trRev) : QbzBridge.sessionUserName
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
} }
Text { Text {
text: QbzBridge.sessionSubscription === "" text: QbzBridge.sessionSubscription === ""
? QbzBridge.tr("Not signed in") : QbzBridge.sessionSubscription ? QbzBridge.tr("Not signed in", QbzBridge.trRev) : QbzBridge.sessionSubscription
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -661,13 +661,13 @@ Rectangle {
AppMenuItem { AppMenuItem {
name: "search" name: "search"
label: QbzBridge.tr("Intelligent search") label: QbzBridge.tr("Intelligent search", QbzBridge.trRev)
checkedItem: QbzBridge.intelligentSearch checkedItem: QbzBridge.intelligentSearch
onClicked: QbzBridge.toggleIntelligentSearch() onClicked: QbzBridge.toggleIntelligentSearch()
} }
AppMenuItem { AppMenuItem {
name: "layout-grid" name: "layout-grid"
label: QbzBridge.tr("Ambient background") label: QbzBridge.tr("Ambient background", QbzBridge.trRev)
checkedItem: QbzBridge.ambientMode > 0 checkedItem: QbzBridge.ambientMode > 0
onClicked: { onClicked: {
QbzBridge.toggleAmbientBackground() QbzBridge.toggleAmbientBackground()
@@ -676,7 +676,7 @@ Rectangle {
} }
AppMenuItem { AppMenuItem {
name: "layout-grid" name: "layout-grid"
label: QbzBridge.tr("Use system title bar") label: QbzBridge.tr("Use system title bar", QbzBridge.trRev)
checkedItem: QbzBridge.systemTitleBarPref checkedItem: QbzBridge.systemTitleBarPref
onClicked: { onClicked: {
QbzBridge.toggleSystemTitleBar() QbzBridge.toggleSystemTitleBar()
@@ -687,13 +687,13 @@ Rectangle {
Text { Text {
width: parent.width width: parent.width
leftPadding: 37 leftPadding: 37
text: QbzBridge.tr("Takes effect after restarting QBZ.") text: QbzBridge.tr("Takes effect after restarting QBZ.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
} }
AppMenuItem { AppMenuItem {
name: "settings-2" name: "settings-2"
label: QbzBridge.tr("Settings") label: QbzBridge.tr("Settings", QbzBridge.trRev)
onClicked: { onClicked: {
appMenu.close() appMenu.close()
QbzBridge.navigateTo("settings") QbzBridge.navigateTo("settings")
@@ -701,7 +701,7 @@ Rectangle {
} }
AppMenuItem { AppMenuItem {
name: "log-out" name: "log-out"
label: QbzBridge.tr("Log Out") label: QbzBridge.tr("Log Out", QbzBridge.trRev)
onClicked: { onClicked: {
appMenu.close() appMenu.close()
QbzBridge.logout() QbzBridge.logout()
@@ -709,7 +709,7 @@ Rectangle {
} }
AppMenuItem { AppMenuItem {
name: "x" name: "x"
label: QbzBridge.tr("Close") label: QbzBridge.tr("Close", QbzBridge.trRev)
// POC-NOTE: the Slint app hides to tray / follows the // POC-NOTE: the Slint app hides to tray / follows the
// platform close behavior; the POC just quits. // platform close behavior; the POC just quits.
onClicked: Qt.quit() onClicked: Qt.quit()
+15 -15
View File
@@ -88,7 +88,7 @@ Rectangle {
Text { Text {
id: linkText id: linkText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("View all →") text: QbzBridge.tr("View all →", QbzBridge.trRev)
color: vaArea.containsMouse ? theme.textPrimary : theme.textSecondary color: vaArea.containsMouse ? theme.textPrimary : theme.textSecondary
font.pixelSize: 14 font.pixelSize: 14
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -670,22 +670,22 @@ Rectangle {
spacing: 32 spacing: 32
MixTile { MixTile {
badge: "qobuz"; mixName: "DailyQ" badge: "qobuz"; mixName: "DailyQ"
desc: QbzBridge.tr("Elevate your day with a customized selection of music.") desc: QbzBridge.tr("Elevate your day with a customized selection of music.", QbzBridge.trRev)
c0: "#1e3a8a"; c1: "#6366f1"; c2: "#c084fc" c0: "#1e3a8a"; c1: "#6366f1"; c2: "#c084fc"
} }
MixTile { MixTile {
badge: "qobuz"; mixName: "WeeklyQ" badge: "qobuz"; mixName: "WeeklyQ"
desc: QbzBridge.tr("Take a weekly journey with a fresh mix every Friday.") desc: QbzBridge.tr("Take a weekly journey with a fresh mix every Friday.", QbzBridge.trRev)
c0: "#065f46"; c1: "#10b981"; c2: "#fbbf24" c0: "#065f46"; c1: "#10b981"; c2: "#fbbf24"
} }
MixTile { MixTile {
badge: "qbz"; mixName: "FavQ" badge: "qbz"; mixName: "FavQ"
desc: QbzBridge.tr("A fresh shuffle from your personal library.") desc: QbzBridge.tr("A fresh shuffle from your personal library.", QbzBridge.trRev)
c0: "#7f1d1d"; c1: "#ef4444"; c2: "#fb923c" c0: "#7f1d1d"; c1: "#ef4444"; c2: "#fb923c"
} }
MixTile { MixTile {
badge: "qbz"; mixName: "TopQ" badge: "qbz"; mixName: "TopQ"
desc: QbzBridge.tr("Discover new music from your most-played playlists.") desc: QbzBridge.tr("Discover new music from your most-played playlists.", QbzBridge.trRev)
c0: "#1f2937"; c1: "#4b5563"; c2: "#fbbf24" c0: "#1f2937"; c1: "#4b5563"; c2: "#fbbf24"
} }
} }
@@ -851,7 +851,7 @@ Rectangle {
Item { width: 1; height: 18 } Item { width: 1; height: 18 }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("You're offline") text: QbzBridge.tr("You're offline", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -860,8 +860,8 @@ Rectangle {
Text { Text {
width: 420 width: 420
text: QbzBridge.offlineMode === 2 text: QbzBridge.offlineMode === 2
? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.") ? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.", QbzBridge.trRev)
: QbzBridge.tr("No internet connection. Your local library and downloads keep working.") : QbzBridge.tr("No internet connection. Your local library and downloads keep working.", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -902,10 +902,10 @@ Rectangle {
spacing: 4 spacing: 4
Repeater { Repeater {
model: [ model: [
{ "id": "home", "label": QbzBridge.tr("Home") }, { "id": "home", "label": QbzBridge.tr("Home", QbzBridge.trRev) },
{ "id": "editorPicks", "label": QbzBridge.tr("Editor's Picks") }, { "id": "editorPicks", "label": QbzBridge.tr("Editor's Picks", QbzBridge.trRev) },
{ "id": "forYou", "label": QbzBridge.tr("For You") }, { "id": "forYou", "label": QbzBridge.tr("For You", QbzBridge.trRev) },
{ "id": "recommendations", "label": QbzBridge.tr("Recommendations") }, { "id": "recommendations", "label": QbzBridge.tr("Recommendations", QbzBridge.trRev) },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -966,7 +966,7 @@ Rectangle {
tintName: "secondary" tintName: "secondary"
} }
Text { Text {
text: QbzBridge.tr("Filter by genre") text: QbzBridge.tr("Filter by genre", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@@ -1076,7 +1076,7 @@ Rectangle {
Text { Text {
id: retryText id: retryText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Retry") text: QbzBridge.tr("Retry", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
} }
@@ -1122,7 +1122,7 @@ Rectangle {
width: parent.width - 64 width: parent.width - 64
spacing: 10 spacing: 10
Text { Text {
text: QbzBridge.tr("Recommendations") text: QbzBridge.tr("Recommendations", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontSection font.pixelSize: theme.fontSection
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
+35 -35
View File
@@ -25,10 +25,10 @@ Column {
spacing: 4 spacing: 4
// ======================= RECOMMENDATIONS ============================= // ======================= RECOMMENDATIONS =============================
GroupHeader { text: QbzBridge.tr("RECOMMENDATIONS") } GroupHeader { text: QbzBridge.tr("RECOMMENDATIONS", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Show Recommendations in Discover") label: QbzBridge.tr("Show Recommendations in Discover", QbzBridge.trRev)
description: QbzBridge.tr("A personalized Discover tab built from your listening. For the best results connect Last.fm and ListenBrainz below — MusicBrainz is used automatically to match releases.") description: QbzBridge.tr("A personalized Discover tab built from your listening. For the best results connect Last.fm and ListenBrainz below — MusicBrainz is used automatically to match releases.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.showRecommendations === true checked: root.doc.showRecommendations === true
onToggled: function (v) { QbzBridge.settingsBool("show-recommendations", v) } onToggled: function (v) { QbzBridge.settingsBool("show-recommendations", v) }
@@ -40,10 +40,10 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// =========================== METADATA ================================ // =========================== METADATA ================================
GroupHeader { text: QbzBridge.tr("METADATA") } GroupHeader { text: QbzBridge.tr("METADATA", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("MusicBrainz") label: QbzBridge.tr("MusicBrainz", QbzBridge.trRev)
description: QbzBridge.tr("Enable artist relationships and enhanced metadata from MusicBrainz. No telemetry — it only matches releases to enrich artist pages and playlist song suggestions. Turn off to disable those sections.") description: QbzBridge.tr("Enable artist relationships and enhanced metadata from MusicBrainz. No telemetry — it only matches releases to enrich artist pages and playlist song suggestions. Turn off to disable those sections.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.musicbrainzEnabled === true checked: root.doc.musicbrainzEnabled === true
onToggled: function (v) { QbzBridge.settingsBool("musicbrainz", v) } onToggled: function (v) { QbzBridge.settingsBool("musicbrainz", v) }
@@ -68,7 +68,7 @@ Column {
spacing: 3 spacing: 3
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("SCROBBLERS") text: QbzBridge.tr("SCROBBLERS", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.letterSpacing: 1.5 font.letterSpacing: 1.5
@@ -77,7 +77,7 @@ Column {
} }
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Send your plays to Last.fm and ListenBrainz. Works for Qobuz, local, and Plex tracks.") text: QbzBridge.tr("Send your plays to Last.fm and ListenBrainz. Works for Qobuz, local, and Plex tracks.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@@ -124,12 +124,12 @@ Column {
spacing: 4 spacing: 4
// ------------------------- LAST.FM ------------------------------ // ------------------------- LAST.FM ------------------------------
GroupHeader { text: QbzBridge.tr("LAST.FM") } GroupHeader { text: QbzBridge.tr("LAST.FM", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Scrobble to Last.fm") label: QbzBridge.tr("Scrobble to Last.fm", QbzBridge.trRev)
description: root.doc.lastfmAuthed === true description: root.doc.lastfmAuthed === true
? QbzBridge.tr("Signed in as {}.").replace("{}", root.doc.lastfmUsername || "") ? QbzBridge.tr("Signed in as {}.", QbzBridge.trRev).replace("{}", root.doc.lastfmUsername || "")
: QbzBridge.tr("Connect your Last.fm account to enable scrobbling.") : QbzBridge.tr("Connect your Last.fm account to enable scrobbling.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.lastfmEnabled === true checked: root.doc.lastfmEnabled === true
onToggled: function (v) { QbzBridge.settingsBool("lastfm-enable", v) } onToggled: function (v) { QbzBridge.settingsBool("lastfm-enable", v) }
@@ -137,34 +137,34 @@ Column {
} }
SettingRow { SettingRow {
visible: root.doc.lastfmAuthed !== true visible: root.doc.lastfmAuthed !== true
label: QbzBridge.tr("Connect") label: QbzBridge.tr("Connect", QbzBridge.trRev)
description: QbzBridge.tr("Authorize QBZ in your browser, then click Finish.") description: QbzBridge.tr("Authorize QBZ in your browser, then click Finish.", QbzBridge.trRev)
Row { Row {
spacing: 8 spacing: 8
SettingsButton { SettingsButton {
text: root.doc.lastfmBusy === true ? QbzBridge.tr("Working...") : QbzBridge.tr("Connect Last.fm") text: root.doc.lastfmBusy === true ? QbzBridge.tr("Working...", QbzBridge.trRev) : QbzBridge.tr("Connect Last.fm", QbzBridge.trRev)
enabled: root.doc.lastfmBusy !== true enabled: root.doc.lastfmBusy !== true
onClicked: QbzBridge.integrationsAction("lastfm-connect") onClicked: QbzBridge.integrationsAction("lastfm-connect")
} }
SettingsButton { SettingsButton {
visible: (root.doc.lastfmAuthUrl || "") !== "" visible: (root.doc.lastfmAuthUrl || "") !== ""
text: QbzBridge.tr("Open authorize page") text: QbzBridge.tr("Open authorize page", QbzBridge.trRev)
onClicked: QbzBridge.integrationsAction("lastfm-open-auth-url") onClicked: QbzBridge.integrationsAction("lastfm-open-auth-url")
} }
SettingsButton { SettingsButton {
visible: (root.doc.lastfmAuthUrl || "") !== "" visible: (root.doc.lastfmAuthUrl || "") !== ""
text: QbzBridge.tr("Finish") text: QbzBridge.tr("Finish", QbzBridge.trRev)
onClicked: QbzBridge.integrationsAction("lastfm-finish") onClicked: QbzBridge.integrationsAction("lastfm-finish")
} }
} }
} }
SettingRow { SettingRow {
visible: root.doc.lastfmAuthed === true visible: root.doc.lastfmAuthed === true
label: QbzBridge.tr("Disconnect Last.fm") label: QbzBridge.tr("Disconnect Last.fm", QbzBridge.trRev)
description: QbzBridge.tr("Sign out of Last.fm.") description: QbzBridge.tr("Sign out of Last.fm.", QbzBridge.trRev)
SettingsButton { SettingsButton {
danger: true danger: true
text: QbzBridge.tr("Disconnect") text: QbzBridge.tr("Disconnect", QbzBridge.trRev)
onClicked: QbzBridge.integrationsAction("lastfm-disconnect") onClicked: QbzBridge.integrationsAction("lastfm-disconnect")
} }
} }
@@ -172,12 +172,12 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// ----------------------- LISTENBRAINZ ---------------------------- // ----------------------- LISTENBRAINZ ----------------------------
GroupHeader { text: QbzBridge.tr("LISTENBRAINZ") } GroupHeader { text: QbzBridge.tr("LISTENBRAINZ", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Scrobble to ListenBrainz") label: QbzBridge.tr("Scrobble to ListenBrainz", QbzBridge.trRev)
description: root.doc.listenbrainzAuthed === true description: root.doc.listenbrainzAuthed === true
? QbzBridge.tr("Signed in as {}.").replace("{}", root.doc.listenbrainzUsername || "") ? QbzBridge.tr("Signed in as {}.", QbzBridge.trRev).replace("{}", root.doc.listenbrainzUsername || "")
: QbzBridge.tr("Paste your ListenBrainz user token to enable scrobbling.") : QbzBridge.tr("Paste your ListenBrainz user token to enable scrobbling.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.listenbrainzEnabled === true checked: root.doc.listenbrainzEnabled === true
onToggled: function (v) { QbzBridge.settingsBool("listenbrainz-enable", v) } onToggled: function (v) { QbzBridge.settingsBool("listenbrainz-enable", v) }
@@ -185,21 +185,21 @@ Column {
} }
SettingRow { SettingRow {
visible: root.doc.listenbrainzAuthed !== true visible: root.doc.listenbrainzAuthed !== true
label: QbzBridge.tr("User token") label: QbzBridge.tr("User token", QbzBridge.trRev)
description: QbzBridge.tr("From listenbrainz.org/settings.") description: QbzBridge.tr("From listenbrainz.org/settings.", QbzBridge.trRev)
QbzLineEdit { QbzLineEdit {
isPassword: true isPassword: true
placeholder: QbzBridge.tr("ListenBrainz token") placeholder: QbzBridge.tr("ListenBrainz token", QbzBridge.trRev)
onCommitted: function (v) { QbzBridge.settingsString("listenbrainz-token", v) } onCommitted: function (v) { QbzBridge.settingsString("listenbrainz-token", v) }
} }
} }
SettingRow { SettingRow {
visible: root.doc.listenbrainzAuthed === true visible: root.doc.listenbrainzAuthed === true
label: QbzBridge.tr("Disconnect ListenBrainz") label: QbzBridge.tr("Disconnect ListenBrainz", QbzBridge.trRev)
description: QbzBridge.tr("Sign out of ListenBrainz.") description: QbzBridge.tr("Sign out of ListenBrainz.", QbzBridge.trRev)
SettingsButton { SettingsButton {
danger: true danger: true
text: QbzBridge.tr("Disconnect") text: QbzBridge.tr("Disconnect", QbzBridge.trRev)
onClicked: QbzBridge.integrationsAction("listenbrainz-disconnect") onClicked: QbzBridge.integrationsAction("listenbrainz-disconnect")
} }
} }
@@ -222,17 +222,17 @@ Column {
SettingsSpacer { } SettingsSpacer { }
// =========================== DISCORD ================================= // =========================== DISCORD =================================
GroupHeader { text: QbzBridge.tr("DISCORD") } GroupHeader { text: QbzBridge.tr("DISCORD", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Discord Rich Presence") label: QbzBridge.tr("Discord Rich Presence", QbzBridge.trRev)
description: QbzBridge.tr("Show what you're listening to as your Discord status. Opt-in — Discord must be running.") description: QbzBridge.tr("Show what you're listening to as your Discord status. Opt-in — Discord must be running.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.discordEnabled === true checked: root.doc.discordEnabled === true
onToggled: function (v) { QbzBridge.settingsBool("discord-rpc", v) } onToggled: function (v) { QbzBridge.settingsBool("discord-rpc", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Flatpak socket access") label: QbzBridge.tr("Flatpak socket access", QbzBridge.trRev)
description: QbzBridge.tr("Flatpak install and the presence isn't showing? Grant access to Discord's IPC socket, then restart QBZ:\nflatpak override --user --filesystem=xdg-run/discord-ipc-0 com.blitzfc.qbz") description: QbzBridge.tr("Flatpak install and the presence isn't showing? Grant access to Discord's IPC socket, then restart QBZ:\nflatpak override --user --filesystem=xdg-run/discord-ipc-0 com.blitzfc.qbz", QbzBridge.trRev)
} }
} }
+51 -51
View File
@@ -475,14 +475,14 @@ Rectangle {
// Track context-menu model (TrackCard.slint track-menu) + dispatch. // Track context-menu model (TrackCard.slint track-menu) + dispatch.
function trackMenuModel(item) { function trackMenuModel(item) {
var m = [ var m = [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-start", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-start", "action": "next" },
{ "label": QbzBridge.tr("Play later"), "icon": "list-plus", "action": "later" }, { "label": QbzBridge.tr("Play later", QbzBridge.trRev), "icon": "list-plus", "action": "later" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
] ]
if (item.artistId !== "") m.push({ "label": QbzBridge.tr("Go to artist"), "icon": "user", "action": "go-artist" }) if (item.artistId !== "") m.push({ "label": QbzBridge.tr("Go to artist", QbzBridge.trRev), "icon": "user", "action": "go-artist" })
if (item.albumId !== "") m.push({ "label": QbzBridge.tr("Go to album"), "icon": "disc", "action": "go-album" }) if (item.albumId !== "") m.push({ "label": QbzBridge.tr("Go to album", QbzBridge.trRev), "icon": "disc", "action": "go-album" })
m.push({ "label": item.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), m.push({ "label": item.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev),
"icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" }) "icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" })
return m return m
} }
@@ -623,7 +623,7 @@ Rectangle {
Text { Text {
width: parent.width width: parent.width
height: 18 height: 18
text: QbzBridge.tr("Track") + " • " + item.artist text: QbzBridge.tr("Track", QbzBridge.trRev) + " • " + item.artist
color: item.artistId !== "" && tcArtistArea.containsMouse color: item.artistId !== "" && tcArtistArea.containsMouse
? theme.textPrimary : theme.textMuted ? theme.textPrimary : theme.textMuted
font.pixelSize: theme.fontLink - 1 font.pixelSize: theme.fontLink - 1
@@ -737,9 +737,9 @@ Rectangle {
id: agMenu id: agMenu
menuWidth: 196 menuWidth: 196
entries: [ entries: [
{ "label": QbzBridge.tr("Open artist"), "icon": "user", "action": "open" }, { "label": QbzBridge.tr("Open artist", QbzBridge.trRev), "icon": "user", "action": "open" },
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Not interested"), "icon": "thumbs-down", "action": "not-interested" }, { "label": QbzBridge.tr("Not interested", QbzBridge.trRev), "icon": "thumbs-down", "action": "not-interested" },
] ]
onPicked: function (a) { onPicked: function (a) {
if (a === "open") QbzBridge.openArtist(item.id) if (a === "open") QbzBridge.openArtist(item.id)
@@ -858,13 +858,13 @@ Rectangle {
// the playlist track-list builder (out of scope) — inert, // the playlist track-list builder (out of scope) — inert,
// POC-NOTE; favorite stays wired for owned playlists. // POC-NOTE; favorite stays wired for owned playlists.
entries: [ entries: [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-start", "action": "play-next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-start", "action": "play-next" },
{ "label": QbzBridge.tr("Play later"), "icon": "list-plus", "action": "play-later" }, { "label": QbzBridge.tr("Play later", QbzBridge.trRev), "icon": "list-plus", "action": "play-later" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": item.playlistOwned { "label": item.playlistOwned
? (item.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library")) ? (item.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev))
: (item.playlistFollowing ? QbzBridge.tr("Unfollow on Qobuz") : QbzBridge.tr("Follow on Qobuz")), : (item.playlistFollowing ? QbzBridge.tr("Unfollow on Qobuz", QbzBridge.trRev) : QbzBridge.tr("Follow on Qobuz", QbzBridge.trRev)),
"icon": item.playlistOwned ? (item.isFavorite ? "heart-filled" : "heart") "icon": item.playlistOwned ? (item.isFavorite ? "heart-filled" : "heart")
: (item.playlistFollowing ? "check" : "user-plus"), : (item.playlistFollowing ? "check" : "user-plus"),
"action": "favorite" }, "action": "favorite" },
@@ -1133,11 +1133,11 @@ Rectangle {
tintName: "muted" tintName: "muted"
} }
Text { Text {
text: item.kind === "track" ? QbzBridge.tr("Track") text: item.kind === "track" ? QbzBridge.tr("Track", QbzBridge.trRev)
: item.kind === "album" ? QbzBridge.tr("Album") : item.kind === "album" ? QbzBridge.tr("Album", QbzBridge.trRev)
: item.kind === "artist" ? QbzBridge.tr("Artist") : item.kind === "artist" ? QbzBridge.tr("Artist", QbzBridge.trRev)
: item.kind === "playlist" ? QbzBridge.tr("Playlist") : item.kind === "playlist" ? QbzBridge.tr("Playlist", QbzBridge.trRev)
: QbzBridge.tr("Label") : QbzBridge.tr("Label", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 10 font.pixelSize: 10
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1204,17 +1204,17 @@ Rectangle {
menuWidth: 196 menuWidth: 196
entries: item.kind === "track" ? root.trackMenuModel(item) entries: item.kind === "track" ? root.trackMenuModel(item)
: item.kind === "album" ? [ : item.kind === "album" ? [
{ "label": QbzBridge.tr("Open album"), "icon": "library-big", "action": "open" }, { "label": QbzBridge.tr("Open album", QbzBridge.trRev), "icon": "library-big", "action": "open" },
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": item.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), { "label": item.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev),
"icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, "icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
] ]
: item.kind === "artist" ? [ : item.kind === "artist" ? [
{ "label": QbzBridge.tr("Go to artist"), "icon": "user", "action": "go-artist" }, { "label": QbzBridge.tr("Go to artist", QbzBridge.trRev), "icon": "user", "action": "go-artist" },
] ]
: [ : [
{ "label": QbzBridge.tr("Open"), "icon": "list-music", "action": "open" }, { "label": QbzBridge.tr("Open", QbzBridge.trRev), "icon": "list-music", "action": "open" },
{ "label": item.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), { "label": item.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev),
"icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, "icon": item.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
] ]
onPicked: function (a) { onPicked: function (a) {
@@ -1415,7 +1415,7 @@ Rectangle {
Item { width: 1; height: 18 } Item { width: 1; height: 18 }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("You're offline") text: QbzBridge.tr("You're offline", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1424,8 +1424,8 @@ Rectangle {
Text { Text {
width: 420 width: 420
text: QbzBridge.offlineMode === 2 text: QbzBridge.offlineMode === 2
? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.") ? QbzBridge.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.", QbzBridge.trRev)
: QbzBridge.tr("No internet connection. Your local library and downloads keep working.") : QbzBridge.tr("No internet connection. Your local library and downloads keep working.", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -1455,12 +1455,12 @@ Rectangle {
id: tabRow id: tabRow
padding: 3 padding: 3
spacing: 4 spacing: 4
SegTab { label: QbzBridge.tr("All"); count: counts.all || 0; active: root.activeTab === "all"; onClicked: root.activeTab = "all" } SegTab { label: QbzBridge.tr("All", QbzBridge.trRev); count: counts.all || 0; active: root.activeTab === "all"; onClicked: root.activeTab = "all" }
SegTab { label: QbzBridge.tr("Tracks"); count: counts.tracks || 0; active: root.activeTab === "tracks"; onClicked: root.activeTab = "tracks" } SegTab { label: QbzBridge.tr("Tracks", QbzBridge.trRev); count: counts.tracks || 0; active: root.activeTab === "tracks"; onClicked: root.activeTab = "tracks" }
SegTab { label: QbzBridge.tr("Albums"); count: counts.albums || 0; active: root.activeTab === "albums"; onClicked: root.activeTab = "albums" } SegTab { label: QbzBridge.tr("Albums", QbzBridge.trRev); count: counts.albums || 0; active: root.activeTab === "albums"; onClicked: root.activeTab = "albums" }
SegTab { label: QbzBridge.tr("Artists"); count: counts.artists || 0; active: root.activeTab === "artists"; onClicked: root.activeTab = "artists" } SegTab { label: QbzBridge.tr("Artists", QbzBridge.trRev); count: counts.artists || 0; active: root.activeTab === "artists"; onClicked: root.activeTab = "artists" }
SegTab { label: QbzBridge.tr("Playlists"); count: counts.playlists || 0; active: root.activeTab === "playlists"; onClicked: root.activeTab = "playlists" } SegTab { label: QbzBridge.tr("Playlists", QbzBridge.trRev); count: counts.playlists || 0; active: root.activeTab === "playlists"; onClicked: root.activeTab = "playlists" }
SegTab { label: QbzBridge.tr("Labels"); count: counts.labels || 0; active: root.activeTab === "labels"; onClicked: root.activeTab = "labels" } SegTab { label: QbzBridge.tr("Labels", QbzBridge.trRev); count: counts.labels || 0; active: root.activeTab === "labels"; onClicked: root.activeTab = "labels" }
} }
} }
@@ -1477,7 +1477,7 @@ Rectangle {
spacing: 8 spacing: 8
height: parent.height height: parent.height
SearchBox { SearchBox {
placeholder: QbzBridge.tr("Search your library") placeholder: QbzBridge.tr("Search your library", QbzBridge.trRev)
onSearchEdited: { onSearchEdited: {
root.search = text root.search = text
allSearchDebounce.restart() allSearchDebounce.restart()
@@ -1515,10 +1515,10 @@ Rectangle {
spacing: 6 spacing: 6
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Sort") + ": " + ( text: QbzBridge.tr("Sort", QbzBridge.trRev) + ": " + (
root.sortBy === "title" ? QbzBridge.tr("Title") root.sortBy === "title" ? QbzBridge.tr("Title", QbzBridge.trRev)
: root.sortBy === "artist" ? QbzBridge.tr("Artist") : root.sortBy === "artist" ? QbzBridge.tr("Artist", QbzBridge.trRev)
: QbzBridge.tr("Date added")) : QbzBridge.tr("Date added", QbzBridge.trRev))
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -1553,9 +1553,9 @@ Rectangle {
contentItem: Column { contentItem: Column {
Repeater { Repeater {
model: [ model: [
{ "field": "date", "label": QbzBridge.tr("Date added") }, { "field": "date", "label": QbzBridge.tr("Date added", QbzBridge.trRev) },
{ "field": "title", "label": QbzBridge.tr("Title") }, { "field": "title", "label": QbzBridge.tr("Title", QbzBridge.trRev) },
{ "field": "artist", "label": QbzBridge.tr("Artist") }, { "field": "artist", "label": QbzBridge.tr("Artist", QbzBridge.trRev) },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -1613,7 +1613,7 @@ Rectangle {
// ===== Other-tab toolbars ===== // ===== Other-tab toolbars =====
SearchBox { SearchBox {
visible: root.activeTab !== "all" visible: root.activeTab !== "all"
placeholder: QbzBridge.tr("Search") placeholder: QbzBridge.tr("Search", QbzBridge.trRev)
onSearchEdited: root.tabSearch = text onSearchEdited: root.tabSearch = text
} }
// Albums sort popup (real, JS-side). // Albums sort popup (real, JS-side).
@@ -1631,7 +1631,7 @@ Rectangle {
spacing: 6 spacing: 6
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Sort") + ": " + root.albumsSort text: QbzBridge.tr("Sort", QbzBridge.trRev) + ": " + root.albumsSort
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -1700,8 +1700,8 @@ Rectangle {
spacing: 4 spacing: 4
Repeater { Repeater {
model: [ model: [
{ "id": "favorites", "label": QbzBridge.tr("Library") }, { "id": "favorites", "label": QbzBridge.tr("Library", QbzBridge.trRev) },
{ "id": "following", "label": QbzBridge.tr("Following") }, { "id": "following", "label": QbzBridge.tr("Following", QbzBridge.trRev) },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -1754,7 +1754,7 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
spacing: 10 spacing: 10
Text { Text {
text: QbzBridge.tr("Couldn't load your Library.") text: QbzBridge.tr("Couldn't load your Library.", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -1775,7 +1775,7 @@ Rectangle {
Text { Text {
id: retryText id: retryText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Retry") text: QbzBridge.tr("Retry", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
} }
+18 -18
View File
@@ -67,7 +67,7 @@ Rectangle {
Item { width: 1; height: theme.spacingSm } Item { width: 1; height: theme.spacingSm }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("QBZ") text: QbzBridge.tr("QBZ", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontWordmark font.pixelSize: theme.fontWordmark
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -76,7 +76,7 @@ Rectangle {
Item { width: 1; height: 2 } Item { width: 1; height: 2 }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("QOBUZ™ PLAYER") text: QbzBridge.tr("QOBUZ™ PLAYER", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontSubtitle font.pixelSize: theme.fontSubtitle
font.letterSpacing: 4 font.letterSpacing: 4
@@ -115,14 +115,14 @@ Rectangle {
} }
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("I have read the") text: QbzBridge.tr("I have read the", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
} }
Text { Text {
id: tosLink id: tosLink
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Qobuz™ Terms of Service") text: QbzBridge.tr("Qobuz™ Terms of Service", QbzBridge.trRev)
color: theme.accent color: theme.accent
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
MouseArea { MouseArea {
@@ -149,7 +149,7 @@ Rectangle {
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Sign in with your browser") text: QbzBridge.tr("Sign in with your browser", QbzBridge.trRev)
color: theme.accentText color: theme.accentText
font.pixelSize: theme.fontButton font.pixelSize: theme.fontButton
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -176,7 +176,7 @@ Rectangle {
spacing: 4 spacing: 4
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Continue in your web browser — QBZ is waiting for you to finish signing in.") text: QbzBridge.tr("Continue in your web browser — QBZ is waiting for you to finish signing in.", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -184,7 +184,7 @@ Rectangle {
} }
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("The browser may open in the background without taking focus — check your other windows.") text: QbzBridge.tr("The browser may open in the background without taking focus — check your other windows.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -197,7 +197,7 @@ Rectangle {
height: cancelText.implicitHeight + 3 height: cancelText.implicitHeight + 3
Text { Text {
id: cancelText id: cancelText
text: QbzBridge.tr("Cancel") text: QbzBridge.tr("Cancel", QbzBridge.trRev)
color: cancelArea.containsMouse ? theme.accent : theme.textMuted color: cancelArea.containsMouse ? theme.accent : theme.textMuted
font.pixelSize: theme.fontLink font.pixelSize: theme.fontLink
} }
@@ -219,7 +219,7 @@ Rectangle {
Text { Text {
visible: QbzBridge.loginPhase === 2 visible: QbzBridge.loginPhase === 2
width: parent.width width: parent.width
text: QbzBridge.tr("Signing you in…") text: QbzBridge.tr("Signing you in…", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -242,7 +242,7 @@ Rectangle {
spacing: 4 spacing: 4
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Sign-in failed") text: QbzBridge.tr("Sign-in failed", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -283,7 +283,7 @@ Rectangle {
spacing: 4 spacing: 4
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("No internet connection — you can start in offline mode with your local library and downloads") text: QbzBridge.tr("No internet connection — you can start in offline mode with your local library and downloads", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -292,7 +292,7 @@ Rectangle {
Text { Text {
visible: QbzBridge.captivePortal visible: QbzBridge.captivePortal
width: parent.width width: parent.width
text: QbzBridge.tr("A network sign-in page may be blocking the connection") text: QbzBridge.tr("A network sign-in page may be blocking the connection", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -332,7 +332,7 @@ Rectangle {
spacing: 4 spacing: 4
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Could not restore your session") text: QbzBridge.tr("Could not restore your session", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -360,7 +360,7 @@ Rectangle {
height: offlineText.implicitHeight + 3 height: offlineText.implicitHeight + 3
Text { Text {
id: offlineText id: offlineText
text: QbzBridge.tr("Start offline (no access to Qobuz™ services)") text: QbzBridge.tr("Start offline (no access to Qobuz™ services)", QbzBridge.trRev)
color: offlineArea.containsMouse ? theme.accent : theme.textMuted color: offlineArea.containsMouse ? theme.accent : theme.textMuted
font.pixelSize: theme.fontLink font.pixelSize: theme.fontLink
} }
@@ -384,13 +384,13 @@ Rectangle {
// --- Legal disclaimer ------------------------------------ // --- Legal disclaimer ------------------------------------
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("QBZ requires an active Qobuz™ subscription. Your credentials are sent directly to Qobuz™.") text: QbzBridge.tr("QBZ requires an active Qobuz™ subscription. Your credentials are sent directly to Qobuz™.", QbzBridge.trRev)
+ "\n" + "\n"
+ QbzBridge.tr("QBZ can be used as an offline player without a Qobuz™ account (no access to the Qobuz™ library).") + QbzBridge.tr("QBZ can be used as an offline player without a Qobuz™ account (no access to the Qobuz™ library).", QbzBridge.trRev)
+ "\n" + "\n"
+ QbzBridge.tr("This application uses the Qobuz API but is not certified by Qobuz.") + QbzBridge.tr("This application uses the Qobuz API but is not certified by Qobuz.", QbzBridge.trRev)
+ " " + " "
+ QbzBridge.tr("Qobuz™ is a trademark of Qobuz. QBZ is an open-source application licensed under the MIT License and is not affiliated with, endorsed by, or certified by Qobuz.") + QbzBridge.tr("Qobuz™ is a trademark of Qobuz. QBZ is an open-source application licensed under the MIT License and is not affiliated with, endorsed by, or certified by Qobuz.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
+6 -6
View File
@@ -71,7 +71,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: 2 spacing: 2
Text { Text {
text: QbzBridge.tr("LYRICS") text: QbzBridge.tr("LYRICS", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -155,7 +155,7 @@ Rectangle {
QbzSpinner { size: 24; anchors.horizontalCenter: parent.horizontalCenter } QbzSpinner { size: 24; anchors.horizontalCenter: parent.horizontalCenter }
Text { Text {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: QbzBridge.tr("Fetching lyrics...") text: QbzBridge.tr("Fetching lyrics...", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
} }
@@ -169,7 +169,7 @@ Rectangle {
spacing: 12 spacing: 12
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("No lyrics available") text: QbzBridge.tr("No lyrics available", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -180,7 +180,7 @@ Rectangle {
spacing: 2 spacing: 2
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Missing lyrics? You can contribute them to LRCLIB:") text: QbzBridge.tr("Missing lyrics? You can contribute them to LRCLIB:", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 10 font.pixelSize: 10
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -207,7 +207,7 @@ Rectangle {
visible: doc.status === 5 visible: doc.status === 5
anchors.centerIn: parent anchors.centerIn: parent
width: parent.width - 32 width: parent.width - 32
text: QbzBridge.tr("Lyrics unavailable offline") text: QbzBridge.tr("Lyrics unavailable offline", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -296,7 +296,7 @@ Rectangle {
bottomPadding: 5 bottomPadding: 5
spacing: 3 spacing: 3
Text { Text {
text: QbzBridge.tr("Lyrics source") + ":" text: QbzBridge.tr("Lyrics source", QbzBridge.trRev) + ":"
color: theme.textMuted color: theme.textMuted
font.pixelSize: 9 font.pixelSize: 9
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
+1 -1
View File
@@ -223,7 +223,7 @@ Rectangle {
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.npHasTrack text: QbzBridge.npHasTrack
? QbzBridge.npTitle : QbzBridge.tr("Nothing playing") ? QbzBridge.npTitle : QbzBridge.tr("Nothing playing", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: 13 font.pixelSize: 13
font.weight: theme.weightMedium font.weight: theme.weightMedium
+1 -1
View File
@@ -242,7 +242,7 @@ Rectangle {
spacing: 4 spacing: 4
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.npHasTrack ? QbzBridge.npTitle : QbzBridge.tr("Nothing playing") text: QbzBridge.npHasTrack ? QbzBridge.npTitle : QbzBridge.tr("Nothing playing", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
+35 -35
View File
@@ -67,13 +67,13 @@ Rectangle {
} }
function sortLabel() { function sortLabel() {
return sortField === "title" ? QbzBridge.tr("Title") return sortField === "title" ? QbzBridge.tr("Title", QbzBridge.trRev)
: sortField === "artist" ? QbzBridge.tr("Artist") : sortField === "artist" ? QbzBridge.tr("Artist", QbzBridge.trRev)
: sortField === "album" ? QbzBridge.tr("Album") : sortField === "album" ? QbzBridge.tr("Album", QbzBridge.trRev)
: sortField === "duration" ? QbzBridge.tr("Duration") : sortField === "duration" ? QbzBridge.tr("Duration", QbzBridge.trRev)
: sortField === "added" ? QbzBridge.tr("Date added") : sortField === "added" ? QbzBridge.tr("Date added", QbzBridge.trRev)
: sortField === "custom" ? QbzBridge.tr("Custom") : sortField === "custom" ? QbzBridge.tr("Custom", QbzBridge.trRev)
: QbzBridge.tr("Default") : QbzBridge.tr("Default", QbzBridge.trRev)
} }
// --- Reorder state (the view-level half of the shared drag) ---------- // --- Reorder state (the view-level half of the shared drag) ----------
@@ -396,15 +396,15 @@ Rectangle {
menuWidth: 220 menuWidth: 220
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-start", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-start", "action": "next" },
{ "label": QbzBridge.tr("Play later"), "icon": "list-plus", "action": "later" }, { "label": QbzBridge.tr("Play later", QbzBridge.trRev), "icon": "list-plus", "action": "later" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": QbzBridge.tr("Go to artist"), "icon": "user", "action": "go-artist", "show": modelData.artistId !== "" }, { "label": QbzBridge.tr("Go to artist", QbzBridge.trRev), "icon": "user", "action": "go-artist", "show": modelData.artistId !== "" },
{ "label": QbzBridge.tr("Go to album"), "icon": "disc", "action": "go-album", "show": modelData.albumId !== "" }, { "label": QbzBridge.tr("Go to album", QbzBridge.trRev), "icon": "disc", "action": "go-album", "show": modelData.albumId !== "" },
{ "label": modelData.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), { "label": modelData.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev),
"icon": modelData.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, "icon": modelData.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
{ "label": QbzBridge.tr("Remove from playlist"), "icon": "trash-2", "action": "remove", "show": root.isOwner }, { "label": QbzBridge.tr("Remove from playlist", QbzBridge.trRev), "icon": "trash-2", "action": "remove", "show": root.isOwner },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -498,7 +498,7 @@ Rectangle {
width: parent.width - 150 - 24 width: parent.width - 150 - 24
spacing: 0 spacing: 0
Text { Text {
text: QbzBridge.tr("Playlist").toUpperCase() text: QbzBridge.tr("Playlist", QbzBridge.trRev).toUpperCase()
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -525,7 +525,7 @@ Rectangle {
Text { Text {
visible: (doc.description || "") !== (doc.descriptionShort || "") visible: (doc.description || "") !== (doc.descriptionShort || "")
height: 18 height: 18
text: QbzBridge.tr("Read more") text: QbzBridge.tr("Read more", QbzBridge.trRev)
color: rmArea.containsMouse ? theme.accentHover : theme.accent color: rmArea.containsMouse ? theme.accentHover : theme.accent
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -539,7 +539,7 @@ Rectangle {
} }
Item { width: 1; height: 8 } Item { width: 1; height: 8 }
Text { Text {
text: (doc.owner || "") + " • " + (doc.trackCount || 0) + " " + QbzBridge.tr("tracks") text: (doc.owner || "") + " • " + (doc.trackCount || 0) + " " + QbzBridge.tr("tracks", QbzBridge.trRev)
+ " • " + (doc.totalDuration || "") + " • " + (doc.totalDuration || "")
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
@@ -622,7 +622,7 @@ Rectangle {
Text { Text {
visible: parent.text === "" visible: parent.text === ""
anchors.fill: parent anchors.fill: parent
text: QbzBridge.tr("Search tracks") text: QbzBridge.tr("Search tracks", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -647,7 +647,7 @@ Rectangle {
Text { Text {
width: parent.width - 13 - 5 width: parent.width - 13 - 5
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Sort") + ": " + root.sortLabel() text: QbzBridge.tr("Sort", QbzBridge.trRev) + ": " + root.sortLabel()
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontLegal font.pixelSize: theme.fontLegal
elide: Text.ElideRight elide: Text.ElideRight
@@ -666,13 +666,13 @@ Rectangle {
menuWidth: 172 menuWidth: 172
Repeater { Repeater {
model: [ model: [
{ "field": "default", "label": QbzBridge.tr("Default") }, { "field": "default", "label": QbzBridge.tr("Default", QbzBridge.trRev) },
{ "field": "title", "label": QbzBridge.tr("Title") }, { "field": "title", "label": QbzBridge.tr("Title", QbzBridge.trRev) },
{ "field": "artist", "label": QbzBridge.tr("Artist") }, { "field": "artist", "label": QbzBridge.tr("Artist", QbzBridge.trRev) },
{ "field": "album", "label": QbzBridge.tr("Album") }, { "field": "album", "label": QbzBridge.tr("Album", QbzBridge.trRev) },
{ "field": "duration", "label": QbzBridge.tr("Duration") }, { "field": "duration", "label": QbzBridge.tr("Duration", QbzBridge.trRev) },
{ "field": "added", "label": QbzBridge.tr("Date added") }, { "field": "added", "label": QbzBridge.tr("Date added", QbzBridge.trRev) },
{ "field": "custom", "label": QbzBridge.tr("Custom"), "ownerOnly": true }, { "field": "custom", "label": QbzBridge.tr("Custom", QbzBridge.trRev), "ownerOnly": true },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -731,7 +731,7 @@ Rectangle {
} }
Text { Text {
visible: !root.loading && root.allTracks.length === 0 visible: !root.loading && root.allTracks.length === 0
text: QbzBridge.tr("This playlist is empty.") text: QbzBridge.tr("This playlist is empty.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
} }
@@ -744,10 +744,10 @@ Rectangle {
spacing: 14 spacing: 14
Text { text: "#"; width: 32; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter } Text { text: "#"; width: 32; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter }
Rectangle { width: 36; height: 1; color: "transparent" } Rectangle { width: 36; height: 1; color: "transparent" }
Text { text: QbzBridge.tr("Title"); width: parent.width - 32 - 36 - 220 - 70 - 92 - 28 - 28 - 32 - 8 * 14; color: theme.textMuted; font.pixelSize: theme.fontLegal } Text { text: QbzBridge.tr("Title", QbzBridge.trRev); width: parent.width - 32 - 36 - 220 - 70 - 92 - 28 - 28 - 32 - 8 * 14; color: theme.textMuted; font.pixelSize: theme.fontLegal }
Text { text: QbzBridge.tr("Album"); width: 220; color: theme.textMuted; font.pixelSize: theme.fontLegal } Text { text: QbzBridge.tr("Album", QbzBridge.trRev); width: 220; color: theme.textMuted; font.pixelSize: theme.fontLegal }
Text { text: QbzBridge.tr("Duration"); width: 70; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter } Text { text: QbzBridge.tr("Duration", QbzBridge.trRev); width: 70; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter }
Text { text: QbzBridge.tr("Quality"); width: 92; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter } Text { text: QbzBridge.tr("Quality", QbzBridge.trRev); width: 92; color: theme.textMuted; font.pixelSize: theme.fontLegal; horizontalAlignment: Text.AlignHCenter }
Rectangle { width: 28; height: 1; color: "transparent" } Rectangle { width: 28; height: 1; color: "transparent" }
Rectangle { width: 28; height: 1; color: "transparent" } Rectangle { width: 28; height: 1; color: "transparent" }
Rectangle { width: 32; height: 1; color: "transparent" } Rectangle { width: 32; height: 1; color: "transparent" }
@@ -815,7 +815,7 @@ Rectangle {
contentItem: Column { contentItem: Column {
spacing: 14 spacing: 14
Text { Text {
text: QbzBridge.tr("Edit playlist") text: QbzBridge.tr("Edit playlist", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontHeading font.pixelSize: theme.fontHeading
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -852,7 +852,7 @@ Rectangle {
Text { Text {
id: delText id: delText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Delete") text: QbzBridge.tr("Delete", QbzBridge.trRev)
color: "#ef4444" color: "#ef4444"
font.pixelSize: 13 font.pixelSize: 13
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -876,7 +876,7 @@ Rectangle {
Text { Text {
id: saveText id: saveText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Save") text: QbzBridge.tr("Save", QbzBridge.trRev)
color: "#ffffff" color: "#ffffff"
font.pixelSize: 13 font.pixelSize: 13
font.weight: theme.weightMedium font.weight: theme.weightMedium
+1 -1
View File
@@ -176,7 +176,7 @@ Rectangle {
Text { Text {
visible: searchInput.text === "" visible: searchInput.text === ""
anchors.fill: parent anchors.fill: parent
text: QbzBridge.tr("Search…") text: QbzBridge.tr("Search…", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
+16 -16
View File
@@ -233,9 +233,9 @@ Rectangle {
menuWidth: 196 menuWidth: 196
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Remove from queue"), "icon": "trash-2", "action": "remove" }, { "label": QbzBridge.tr("Remove from queue", QbzBridge.trRev), "icon": "trash-2", "action": "remove" },
{ "label": QbzBridge.tr("Remove all after"), "icon": "list-x", "action": "remove-after" }, { "label": QbzBridge.tr("Remove all after", QbzBridge.trRev), "icon": "list-x", "action": "remove-after" },
{ "label": row.isFavorite ? QbzBridge.tr("Remove from Library") : QbzBridge.tr("Add to Library"), "icon": row.isFavorite ? "heart-filled" : "heart", "action": "favorite" }, { "label": row.isFavorite ? QbzBridge.tr("Remove from Library", QbzBridge.trRev) : QbzBridge.tr("Add to Library", QbzBridge.trRev), "icon": row.isFavorite ? "heart-filled" : "heart", "action": "favorite" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -311,7 +311,7 @@ Rectangle {
spacing: 14 spacing: 14
QueueTab { QueueTab {
text: QbzBridge.tr("Queue") text: QbzBridge.tr("Queue", QbzBridge.trRev)
active: root.tab === 0 active: root.tab === 0
onClicked: root.tab = 0 onClicked: root.tab = 0
} }
@@ -323,7 +323,7 @@ Rectangle {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
QueueTab { QueueTab {
text: QbzBridge.tr("History") text: QbzBridge.tr("History", QbzBridge.trRev)
active: root.tab === 1 active: root.tab === 1
onClicked: root.tab = 1 onClicked: root.tab = 1
} }
@@ -385,7 +385,7 @@ Rectangle {
width: parent.width - 20 width: parent.width - 20
spacing: 10 spacing: 10
Text { Text {
text: QbzBridge.tr("NOW PLAYING") text: QbzBridge.tr("NOW PLAYING", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -473,7 +473,7 @@ Rectangle {
width: parent.width - 20 width: parent.width - 20
spacing: 8 spacing: 8
Text { Text {
text: QbzBridge.tr("UP NEXT") text: QbzBridge.tr("UP NEXT", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -502,7 +502,7 @@ Rectangle {
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: modelData.section === "next-in-queue" text: modelData.section === "next-in-queue"
? QbzBridge.tr("Next in queue") : QbzBridge.tr("Next up") ? QbzBridge.tr("Next in queue", QbzBridge.trRev) : QbzBridge.tr("Next up", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -550,7 +550,7 @@ Rectangle {
} }
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Page {} of {}").replace("{}", (doc.page || 0) + 1).replace("{}", doc.pageCount || 1) text: QbzBridge.tr("Page {} of {}", QbzBridge.trRev).replace("{}", (doc.page || 0) + 1).replace("{}", doc.pageCount || 1)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
} }
@@ -573,7 +573,7 @@ Rectangle {
spacing: 6 spacing: 6
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Your queue is empty") text: QbzBridge.tr("Your queue is empty", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -581,7 +581,7 @@ Rectangle {
} }
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("Play an album or track to get started") text: QbzBridge.tr("Play an album or track to get started", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -607,7 +607,7 @@ Rectangle {
spacing: 8 spacing: 8
Text { Text {
text: QbzBridge.tr("RECENTLY PLAYED") text: QbzBridge.tr("RECENTLY PLAYED", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -627,7 +627,7 @@ Rectangle {
visible: root.historyRows.length === 0 visible: root.historyRows.length === 0
width: parent.width width: parent.width
topPadding: 48 - 10 topPadding: 48 - 10
text: QbzBridge.tr("Nothing played yet") text: QbzBridge.tr("Nothing played yet", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -650,8 +650,8 @@ Rectangle {
rightPadding: theme.spacingMd rightPadding: theme.spacingMd
topPadding: 8 topPadding: 8
text: (doc.upcomingTotal === 1 text: (doc.upcomingTotal === 1
? QbzBridge.tr("Showing {} of {} track.") ? QbzBridge.tr("Showing {} of {} track.", QbzBridge.trRev)
: QbzBridge.tr("Showing {} of {} tracks.")) : QbzBridge.tr("Showing {} of {} tracks.", QbzBridge.trRev))
.replace("{}", doc.pageEnd || 0).replace("{}", doc.upcomingTotal || 0) .replace("{}", doc.pageEnd || 0).replace("{}", doc.upcomingTotal || 0)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
@@ -706,7 +706,7 @@ Rectangle {
Text { Text {
visible: parent.text === "" visible: parent.text === ""
anchors.fill: parent anchors.fill: parent
text: QbzBridge.tr("Search queue") text: QbzBridge.tr("Search queue", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
+28 -28
View File
@@ -215,7 +215,7 @@ Rectangle {
Text { Text {
width: 200 width: 200
height: 18 height: 18
text: QbzBridge.tr("Track") + " • " + (card.artist || "") text: QbzBridge.tr("Track", QbzBridge.trRev) + " • " + (card.artist || "")
color: theme.textMuted color: theme.textMuted
font.pixelSize: theme.fontLink - 1 font.pixelSize: theme.fontLink - 1
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -434,12 +434,12 @@ Rectangle {
menuWidth: 196 menuWidth: 196
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Play"), "icon": "play-fill", "action": "play" }, { "label": QbzBridge.tr("Play", QbzBridge.trRev), "icon": "play-fill", "action": "play" },
{ "label": QbzBridge.tr("Play next"), "icon": "list-start", "action": "next" }, { "label": QbzBridge.tr("Play next", QbzBridge.trRev), "icon": "list-start", "action": "next" },
{ "label": QbzBridge.tr("Play later"), "icon": "list-plus", "action": "later" }, { "label": QbzBridge.tr("Play later", QbzBridge.trRev), "icon": "list-plus", "action": "later" },
{ "label": QbzBridge.tr("Add to queue"), "icon": "list-end", "action": "queue" }, { "label": QbzBridge.tr("Add to queue", QbzBridge.trRev), "icon": "list-end", "action": "queue" },
{ "label": item.artistId !== "" ? QbzBridge.tr("Go to artist") : "", "icon": "user", "action": "go-artist" }, { "label": item.artistId !== "" ? QbzBridge.tr("Go to artist", QbzBridge.trRev) : "", "icon": "user", "action": "go-artist" },
{ "label": item.albumId !== "" ? QbzBridge.tr("Go to album") : "", "icon": "disc", "action": "go-album" }, { "label": item.albumId !== "" ? QbzBridge.tr("Go to album", QbzBridge.trRev) : "", "icon": "disc", "action": "go-album" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -509,7 +509,7 @@ Rectangle {
Text { Text {
id: moreText id: moreText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("View all") text: QbzBridge.tr("View all", QbzBridge.trRev)
color: theme.accent color: theme.accent
font.pixelSize: 14 font.pixelSize: 14
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -543,7 +543,7 @@ Rectangle {
Text { Text {
id: lmText id: lmText
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Load more") + " (" + loaded + " / " + total + ")" text: QbzBridge.tr("Load more", QbzBridge.trRev) + " (" + loaded + " / " + total + ")"
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -613,7 +613,7 @@ Rectangle {
Text { Text {
x: 32 x: 32
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: QbzBridge.tr("Search") text: QbzBridge.tr("Search", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontSection font.pixelSize: theme.fontSection
font.weight: theme.weightBold font.weight: theme.weightBold
@@ -624,11 +624,11 @@ Rectangle {
anchors.rightMargin: 32 anchors.rightMargin: 32
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
spacing: 16 spacing: 16
FilterRadio { label: QbzBridge.tr("Main Artist"); selected: root.filterIndex === 1; onPicked: QbzBridge.searchFilterChanged(1) } FilterRadio { label: QbzBridge.tr("Main Artist", QbzBridge.trRev); selected: root.filterIndex === 1; onPicked: QbzBridge.searchFilterChanged(1) }
FilterRadio { label: QbzBridge.tr("Performer"); selected: root.filterIndex === 2; onPicked: QbzBridge.searchFilterChanged(2) } FilterRadio { label: QbzBridge.tr("Performer", QbzBridge.trRev); selected: root.filterIndex === 2; onPicked: QbzBridge.searchFilterChanged(2) }
FilterRadio { label: QbzBridge.tr("Composer"); selected: root.filterIndex === 3; onPicked: QbzBridge.searchFilterChanged(3) } FilterRadio { label: QbzBridge.tr("Composer", QbzBridge.trRev); selected: root.filterIndex === 3; onPicked: QbzBridge.searchFilterChanged(3) }
FilterRadio { label: QbzBridge.tr("Label"); selected: root.filterIndex === 4; onPicked: QbzBridge.searchFilterChanged(4) } FilterRadio { label: QbzBridge.tr("Label", QbzBridge.trRev); selected: root.filterIndex === 4; onPicked: QbzBridge.searchFilterChanged(4) }
FilterRadio { label: QbzBridge.tr("Release Name"); selected: root.filterIndex === 5; onPicked: QbzBridge.searchFilterChanged(5) } FilterRadio { label: QbzBridge.tr("Release Name", QbzBridge.trRev); selected: root.filterIndex === 5; onPicked: QbzBridge.searchFilterChanged(5) }
Rectangle { Rectangle {
visible: root.filterIndex !== 0 visible: root.filterIndex !== 0
width: 24 width: 24
@@ -660,11 +660,11 @@ Rectangle {
spacing: 22 spacing: 22
Repeater { Repeater {
model: [ model: [
{ "t": 0, "label": QbzBridge.tr("All") }, { "t": 0, "label": QbzBridge.tr("All", QbzBridge.trRev) },
{ "t": 1, "label": QbzBridge.tr("Albums") }, { "t": 1, "label": QbzBridge.tr("Albums", QbzBridge.trRev) },
{ "t": 2, "label": QbzBridge.tr("Tracks") }, { "t": 2, "label": QbzBridge.tr("Tracks", QbzBridge.trRev) },
{ "t": 3, "label": QbzBridge.tr("Artists") }, { "t": 3, "label": QbzBridge.tr("Artists", QbzBridge.trRev) },
{ "t": 4, "label": QbzBridge.tr("Playlists") }, { "t": 4, "label": QbzBridge.tr("Playlists", QbzBridge.trRev) },
] ]
delegate: Column { delegate: Column {
required property var modelData required property var modelData
@@ -730,7 +730,7 @@ Rectangle {
spacing: 8 spacing: 8
QbzIcon { name: "award"; width: 18; height: 18; tintName: "warning" } QbzIcon { name: "award"; width: 18; height: 18; tintName: "warning" }
Text { Text {
text: QbzBridge.tr("Most popular") text: QbzBridge.tr("Most popular", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontSection font.pixelSize: theme.fontSection
font.weight: theme.weightSemibold font.weight: theme.weightSemibold
@@ -772,7 +772,7 @@ Rectangle {
width: parent.width - 224 width: parent.width - 224
spacing: 12 spacing: 12
SectionHeader { SectionHeader {
title: QbzBridge.tr("Artists") title: QbzBridge.tr("Artists", QbzBridge.trRev)
showMore: true showMore: true
onMoreClicked: QbzBridge.searchTabChanged(3) onMoreClicked: QbzBridge.searchTabChanged(3)
} }
@@ -794,7 +794,7 @@ Rectangle {
width: parent.width width: parent.width
spacing: 12 spacing: 12
SectionHeader { SectionHeader {
title: QbzBridge.tr("Artists") title: QbzBridge.tr("Artists", QbzBridge.trRev)
showMore: true showMore: true
onMoreClicked: QbzBridge.searchTabChanged(3) onMoreClicked: QbzBridge.searchTabChanged(3)
} }
@@ -816,7 +816,7 @@ Rectangle {
width: parent.width width: parent.width
spacing: 12 spacing: 12
SectionHeader { SectionHeader {
title: QbzBridge.tr("Albums") title: QbzBridge.tr("Albums", QbzBridge.trRev)
showMore: true showMore: true
onMoreClicked: QbzBridge.searchTabChanged(1) onMoreClicked: QbzBridge.searchTabChanged(1)
} }
@@ -878,7 +878,7 @@ Rectangle {
width: parent.width width: parent.width
spacing: 4 spacing: 4
SectionHeader { SectionHeader {
title: QbzBridge.tr("Tracks") title: QbzBridge.tr("Tracks", QbzBridge.trRev)
showMore: root.tab === 0 && (root.doc.tracksTotal || 0) > root.previewCap showMore: root.tab === 0 && (root.doc.tracksTotal || 0) > root.previewCap
onMoreClicked: QbzBridge.searchTabChanged(2) onMoreClicked: QbzBridge.searchTabChanged(2)
} }
@@ -918,7 +918,7 @@ Rectangle {
width: parent.width width: parent.width
spacing: 12 spacing: 12
SectionHeader { SectionHeader {
title: QbzBridge.tr("Playlists") title: QbzBridge.tr("Playlists", QbzBridge.trRev)
showMore: true showMore: true
onMoreClicked: QbzBridge.searchTabChanged(4) onMoreClicked: QbzBridge.searchTabChanged(4)
} }
@@ -961,7 +961,7 @@ Rectangle {
spacing: 18 spacing: 18
QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter } QbzSpinner { size: 36; anchors.horizontalCenter: parent.horizontalCenter }
Text { Text {
text: QbzBridge.tr("Searching…") text: QbzBridge.tr("Searching…", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 13 font.pixelSize: 13
} }
@@ -971,7 +971,7 @@ Rectangle {
visible: !root.loading && !root.hasResults visible: !root.loading && !root.hasResults
x: 32 x: 32
y: 8 y: 8
text: QbzBridge.tr("No results.") text: QbzBridge.tr("No results.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 14 font.pixelSize: 14
} }
+74 -74
View File
@@ -64,7 +64,7 @@ Item {
x: 32 x: 32
// padding-top 11 + 12px gap below the (0px) NavButtons row. // padding-top 11 + 12px gap below the (0px) NavButtons row.
y: 23 y: 23
text: QbzBridge.tr("Settings") text: QbzBridge.tr("Settings", QbzBridge.trRev)
color: theme.textPrimary color: theme.textPrimary
font.pixelSize: theme.fontTitle font.pixelSize: theme.fontTitle
font.weight: theme.weightBold font.weight: theme.weightBold
@@ -131,49 +131,49 @@ Item {
SubNavItem { SubNavItem {
name: "volume-2" name: "volume-2"
label: QbzBridge.tr("Audio") label: QbzBridge.tr("Audio", QbzBridge.trRev)
active: root.section === 0 active: root.section === 0
onClicked: root.section = 0 onClicked: root.section = 0
} }
SubNavItem { SubNavItem {
name: "play-fill" name: "play-fill"
label: QbzBridge.tr("Playback") label: QbzBridge.tr("Playback", QbzBridge.trRev)
active: root.section === 1 active: root.section === 1
onClicked: root.section = 1 onClicked: root.section = 1
} }
SubNavItem { SubNavItem {
name: "layers" name: "layers"
label: QbzBridge.tr("Appearance") label: QbzBridge.tr("Appearance", QbzBridge.trRev)
active: root.section === 2 active: root.section === 2
onClicked: root.section = 2 onClicked: root.section = 2
} }
SubNavItem { SubNavItem {
name: "cloud-download" name: "cloud-download"
label: QbzBridge.tr("Offline") label: QbzBridge.tr("Offline", QbzBridge.trRev)
active: root.section === 3 active: root.section === 3
onClicked: root.section = 3 onClicked: root.section = 3
} }
SubNavItem { SubNavItem {
name: "hard-drive" name: "hard-drive"
label: QbzBridge.tr("Local Library") label: QbzBridge.tr("Local Library", QbzBridge.trRev)
active: root.section === 4 active: root.section === 4
onClicked: root.section = 4 onClicked: root.section = 4
} }
SubNavItem { SubNavItem {
name: "blind-eye" name: "blind-eye"
label: QbzBridge.tr("Blacklist") label: QbzBridge.tr("Blacklist", QbzBridge.trRev)
active: root.section === 5 active: root.section === 5
onClicked: root.section = 5 onClicked: root.section = 5
} }
SubNavItem { SubNavItem {
name: "refresh-cw" name: "refresh-cw"
label: QbzBridge.tr("Integrations") label: QbzBridge.tr("Integrations", QbzBridge.trRev)
active: root.section === 6 active: root.section === 6
onClicked: root.section = 6 onClicked: root.section = 6
} }
SubNavItem { SubNavItem {
name: "bug" name: "bug"
label: QbzBridge.tr("Developer") label: QbzBridge.tr("Developer", QbzBridge.trRev)
active: root.section === 7 active: root.section === 7
onClicked: root.section = 7 onClicked: root.section = 7
} }
@@ -186,7 +186,7 @@ Item {
Item { width: 1; height: parent.height - 8 * 42 - 38 - 4 } Item { width: 1; height: parent.height - 8 * 42 - 38 - 4 }
SubNavItem { SubNavItem {
name: "cloud-upload" name: "cloud-upload"
label: QbzBridge.tr("Share logs") label: QbzBridge.tr("Share logs", QbzBridge.trRev)
active: false active: false
// POC-NOTE: LogViewerState (copy + upload viewer) is // POC-NOTE: LogViewerState (copy + upload viewer) is
// not ported — the row is inert. // not ported — the row is inert.
@@ -222,10 +222,10 @@ Item {
width: parent.width width: parent.width
spacing: 4 spacing: 4
GroupHeader { text: QbzBridge.tr("STREAMING") } GroupHeader { text: QbzBridge.tr("STREAMING", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Streaming quality") label: QbzBridge.tr("Streaming quality", QbzBridge.trRev)
description: QbzBridge.tr("The quality tier QBZ requests for playback.") description: QbzBridge.tr("The quality tier QBZ requests for playback.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 200 menuWidth: 200
options: root.doc.streamingQualities || [] options: root.doc.streamingQualities || []
@@ -234,8 +234,8 @@ Item {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Limit quality to device") label: QbzBridge.tr("Limit quality to device", QbzBridge.trRev)
description: QbzBridge.tr("Cap the requested streaming quality at your output device's limit. Applies to local playback only, never to casting.") description: QbzBridge.tr("Cap the requested streaming quality at your output device's limit. Applies to local playback only, never to casting.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.limitQualityToDevice === true checked: root.doc.limitQualityToDevice === true
onToggled: function (v) { QbzBridge.settingsBool("limit-quality-to-device", v) } onToggled: function (v) { QbzBridge.settingsBool("limit-quality-to-device", v) }
@@ -250,10 +250,10 @@ Item {
SettingsDivider { } SettingsDivider { }
SettingsSpacer { } SettingsSpacer { }
GroupHeader { text: QbzBridge.tr("OUTPUT") } GroupHeader { text: QbzBridge.tr("OUTPUT", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Audio backend") label: QbzBridge.tr("Audio backend", QbzBridge.trRev)
description: QbzBridge.tr("The audio stack QBZ routes playback through.") description: QbzBridge.tr("The audio stack QBZ routes playback through.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.backends || [] options: root.doc.backends || []
@@ -265,8 +265,8 @@ Item {
// WarningBanner is skipped (backendIsJack is // WarningBanner is skipped (backendIsJack is
// published for a future port). // published for a future port).
SettingRow { SettingRow {
label: QbzBridge.tr("Output device") label: QbzBridge.tr("Output device", QbzBridge.trRev)
description: QbzBridge.tr("The DAC or sound device that receives audio.") description: QbzBridge.tr("The DAC or sound device that receives audio.", QbzBridge.trRev)
Row { Row {
spacing: 8 spacing: 8
// Refresh / release: frees a device QBZ // Refresh / release: frees a device QBZ
@@ -306,8 +306,8 @@ Item {
SettingRow { SettingRow {
visible: root.doc.backendIsAlsa === true visible: root.doc.backendIsAlsa === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("ALSA plugin") label: QbzBridge.tr("ALSA plugin", QbzBridge.trRev)
description: QbzBridge.tr("How ALSA opens the device — hw is bit-perfect, plughw converts.") description: QbzBridge.tr("How ALSA opens the device — hw is bit-perfect, plughw converts.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 220 menuWidth: 220
options: root.doc.alsaPlugins || [] options: root.doc.alsaPlugins || []
@@ -318,8 +318,8 @@ Item {
SettingRow { SettingRow {
visible: root.doc.backendIsAlsa === true && root.doc.alsaPluginIsHw === true visible: root.doc.backendIsAlsa === true && root.doc.alsaPluginIsHw === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("Hardware volume control") label: QbzBridge.tr("Hardware volume control", QbzBridge.trRev)
description: QbzBridge.tr("Use the ALSA mixer for volume instead of software gain.") description: QbzBridge.tr("Use the ALSA mixer for volume instead of software gain.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.alsaHardwareVolume === true checked: root.doc.alsaHardwareVolume === true
onToggled: function (v) { QbzBridge.settingsBool("alsa-hardware-volume", v) } onToggled: function (v) { QbzBridge.settingsBool("alsa-hardware-volume", v) }
@@ -328,8 +328,8 @@ Item {
SettingRow { SettingRow {
visible: root.doc.backendIsAlsa === true visible: root.doc.backendIsAlsa === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("DSD playback") label: QbzBridge.tr("DSD playback", QbzBridge.trRev)
description: QbzBridge.tr("How DSD tracks reach the DAC. WARNING: choose DoP or Native only if your DAC supports it — on any other DAC they play as loud noise. Volume is fixed and seeking is disabled in DoP/Native mode. Native additionally needs kernel support for the DAC.") description: QbzBridge.tr("How DSD tracks reach the DAC. WARNING: choose DoP or Native only if your DAC supports it — on any other DAC they play as loud noise. Volume is fixed and seeking is disabled in DoP/Native mode. Native additionally needs kernel support for the DAC.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 280 menuWidth: 280
options: root.doc.dsdModes || [] options: root.doc.dsdModes || []
@@ -342,10 +342,10 @@ Item {
SettingsDivider { } SettingsDivider { }
SettingsSpacer { } SettingsSpacer { }
GroupHeader { text: QbzBridge.tr("BIT-PERFECT") } GroupHeader { text: QbzBridge.tr("BIT-PERFECT", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Exclusive mode") label: QbzBridge.tr("Exclusive mode", QbzBridge.trRev)
description: QbzBridge.tr("Lock the device so no other app can resample it.") description: QbzBridge.tr("Lock the device so no other app can resample it.", QbzBridge.trRev)
rowEnabled: root.doc.backendIsAlsa === true rowEnabled: root.doc.backendIsAlsa === true
QbzToggle { QbzToggle {
checked: root.doc.exclusiveMode === true checked: root.doc.exclusiveMode === true
@@ -354,16 +354,16 @@ Item {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Reserve DAC while running") label: QbzBridge.tr("Reserve DAC while running", QbzBridge.trRev)
description: QbzBridge.tr("Hold the device reserved so other apps can't grab it.") description: QbzBridge.tr("Hold the device reserved so other apps can't grab it.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.reserveDac === true checked: root.doc.reserveDac === true
onToggled: function (v) { QbzBridge.settingsBool("reserve-dac", v) } onToggled: function (v) { QbzBridge.settingsBool("reserve-dac", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("DAC passthrough") label: QbzBridge.tr("DAC passthrough", QbzBridge.trRev)
description: QbzBridge.tr("Send the bitstream untouched to the DAC.") description: QbzBridge.tr("Send the bitstream untouched to the DAC.", QbzBridge.trRev)
rowEnabled: root.doc.backendIsPipewire === true rowEnabled: root.doc.backendIsPipewire === true
QbzToggle { QbzToggle {
checked: root.doc.dacPassthrough === true checked: root.doc.dacPassthrough === true
@@ -374,16 +374,16 @@ Item {
SettingRow { SettingRow {
visible: root.doc.dacPassthrough === true && root.doc.backendIsPipewire === true visible: root.doc.dacPassthrough === true && root.doc.backendIsPipewire === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("Force bit-perfect") label: QbzBridge.tr("Force bit-perfect", QbzBridge.trRev)
description: QbzBridge.tr("Pin the PipeWire quantum and rate for the active track.") description: QbzBridge.tr("Pin the PipeWire quantum and rate for the active track.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.pwForceBitperfect === true checked: root.doc.pwForceBitperfect === true
onToggled: function (v) { QbzBridge.settingsBool("pw-force-bitperfect", v) } onToggled: function (v) { QbzBridge.settingsBool("pw-force-bitperfect", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Allow quality fallback") label: QbzBridge.tr("Allow quality fallback", QbzBridge.trRev)
description: QbzBridge.tr("Drop to a lower tier when the requested one is unavailable.") description: QbzBridge.tr("Drop to a lower tier when the requested one is unavailable.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.allowQualityFallback === true checked: root.doc.allowQualityFallback === true
onToggled: function (v) { QbzBridge.settingsBool("allow-quality-fallback", v) } onToggled: function (v) { QbzBridge.settingsBool("allow-quality-fallback", v) }
@@ -397,10 +397,10 @@ Item {
SettingsDivider { } SettingsDivider { }
SettingsSpacer { } SettingsSpacer { }
GroupHeader { text: QbzBridge.tr("STARTUP") } GroupHeader { text: QbzBridge.tr("STARTUP", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Sync audio settings on startup") label: QbzBridge.tr("Sync audio settings on startup", QbzBridge.trRev)
description: QbzBridge.tr("Reload saved audio settings into the player when QBZ launches.") description: QbzBridge.tr("Reload saved audio settings into the player when QBZ launches.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.syncAudioOnStartup === true checked: root.doc.syncAudioOnStartup === true
onToggled: function (v) { QbzBridge.settingsBool("sync-audio-on-startup", v) } onToggled: function (v) { QbzBridge.settingsBool("sync-audio-on-startup", v) }
@@ -409,8 +409,8 @@ Item {
SettingRow { SettingRow {
visible: root.doc.backendIsPipewire === true visible: root.doc.backendIsPipewire === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("Lock output device") label: QbzBridge.tr("Lock output device", QbzBridge.trRev)
description: QbzBridge.tr("Keep external routing intact — skip switching the default sink.") description: QbzBridge.tr("Keep external routing intact — skip switching the default sink.", QbzBridge.trRev)
rowEnabled: root.doc.dacPassthrough !== true rowEnabled: root.doc.dacPassthrough !== true
QbzToggle { QbzToggle {
checked: root.doc.skipSinkSwitch === true checked: root.doc.skipSinkSwitch === true
@@ -432,7 +432,7 @@ Item {
Text { Text {
id: resetLabel id: resetLabel
anchors.centerIn: parent anchors.centerIn: parent
text: QbzBridge.tr("Reset to defaults") text: QbzBridge.tr("Reset to defaults", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -453,26 +453,26 @@ Item {
width: parent.width width: parent.width
spacing: 4 spacing: 4
GroupHeader { text: QbzBridge.tr("PLAYBACK") } GroupHeader { text: QbzBridge.tr("PLAYBACK", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Continue playback after track ends") label: QbzBridge.tr("Continue playback after track ends", QbzBridge.trRev)
description: QbzBridge.tr("Keep playing the rest of the album or playlist instead of stopping.") description: QbzBridge.tr("Keep playing the rest of the album or playlist instead of stopping.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.continuePlayback === true checked: root.doc.continuePlayback === true
onToggled: function (v) { QbzBridge.settingsBool("continue-playback", v) } onToggled: function (v) { QbzBridge.settingsBool("continue-playback", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Show track playing context") label: QbzBridge.tr("Show track playing context", QbzBridge.trRev)
description: QbzBridge.tr("Display the context-stack icon in the player.") description: QbzBridge.tr("Display the context-stack icon in the player.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.showContextIcon === true checked: root.doc.showContextIcon === true
onToggled: function (v) { QbzBridge.settingsBool("show-context-icon", v) } onToggled: function (v) { QbzBridge.settingsBool("show-context-icon", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Gapless playback") label: QbzBridge.tr("Gapless playback", QbzBridge.trRev)
description: QbzBridge.tr("Play consecutive same-format tracks without a gap.") description: QbzBridge.tr("Play consecutive same-format tracks without a gap.", QbzBridge.trRev)
rowEnabled: root.doc.streamingOnly !== true rowEnabled: root.doc.streamingOnly !== true
QbzToggle { QbzToggle {
checked: root.doc.gapless === true checked: root.doc.gapless === true
@@ -485,18 +485,18 @@ Item {
SettingsDivider { } SettingsDivider { }
SettingsSpacer { } SettingsSpacer { }
GroupHeader { text: QbzBridge.tr("SESSION") } GroupHeader { text: QbzBridge.tr("SESSION", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Restore session on startup") label: QbzBridge.tr("Restore session on startup", QbzBridge.trRev)
description: QbzBridge.tr("Restore the queue and current track on the next launch.") description: QbzBridge.tr("Restore the queue and current track on the next launch.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.persistSession === true checked: root.doc.persistSession === true
onToggled: function (v) { QbzBridge.settingsBool("persist-session", v) } onToggled: function (v) { QbzBridge.settingsBool("persist-session", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Resume playback position") label: QbzBridge.tr("Resume playback position", QbzBridge.trRev)
description: QbzBridge.tr("Also seek back to where the saved track left off.") description: QbzBridge.tr("Also seek back to where the saved track left off.", QbzBridge.trRev)
rowEnabled: root.doc.persistSession === true rowEnabled: root.doc.persistSession === true
QbzToggle { QbzToggle {
checked: root.doc.resumePosition === true checked: root.doc.resumePosition === true
@@ -505,8 +505,8 @@ Item {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Auto-connect Qobuz Connect on startup") label: QbzBridge.tr("Auto-connect Qobuz Connect on startup", QbzBridge.trRev)
description: QbzBridge.tr("Choose whether Qobuz Connect activates automatically when QBZ launches.") description: QbzBridge.tr("Choose whether Qobuz Connect activates automatically when QBZ launches.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 240 menuWidth: 240
options: root.doc.qconnectStartupModes || [] options: root.doc.qconnectStartupModes || []
@@ -515,8 +515,8 @@ Item {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Qobuz Connect device name") label: QbzBridge.tr("Qobuz Connect device name", QbzBridge.trRev)
description: QbzBridge.tr("The name other Qobuz Connect apps see for this device. Applies on the next connection.") description: QbzBridge.tr("The name other Qobuz Connect apps see for this device. Applies on the next connection.", QbzBridge.trRev)
QbzLineEdit { QbzLineEdit {
text: root.doc.qconnectDeviceName || "" text: root.doc.qconnectDeviceName || ""
placeholder: root.doc.qconnectDeviceNameDefault || "" placeholder: root.doc.qconnectDeviceNameDefault || ""
@@ -528,10 +528,10 @@ Item {
SettingsDivider { } SettingsDivider { }
SettingsSpacer { } SettingsSpacer { }
GroupHeader { text: QbzBridge.tr("STREAMING") } GroupHeader { text: QbzBridge.tr("STREAMING", QbzBridge.trRev) }
SettingRow { SettingRow {
label: QbzBridge.tr("Stream uncached tracks") label: QbzBridge.tr("Stream uncached tracks", QbzBridge.trRev)
description: QbzBridge.tr("Start uncached tracks via streaming instead of waiting for the full download.") description: QbzBridge.tr("Start uncached tracks via streaming instead of waiting for the full download.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.streamUncached === true checked: root.doc.streamUncached === true
onToggled: function (v) { QbzBridge.settingsBool("stream-uncached", v) } onToggled: function (v) { QbzBridge.settingsBool("stream-uncached", v) }
@@ -540,8 +540,8 @@ Item {
SettingRow { SettingRow {
visible: root.doc.streamUncached === true visible: root.doc.streamUncached === true
height: visible ? (description === "" ? 52 : 64) : 0 height: visible ? (description === "" ? 52 : 64) : 0
label: QbzBridge.tr("Initial buffer size") label: QbzBridge.tr("Initial buffer size", QbzBridge.trRev)
description: QbzBridge.tr("Seconds of audio buffered before streaming playback starts.") description: QbzBridge.tr("Seconds of audio buffered before streaming playback starts.", QbzBridge.trRev)
Row { Row {
spacing: 12 spacing: 12
Item { width: 1; height: 1 } Item { width: 1; height: 1 }
@@ -554,7 +554,7 @@ Item {
} }
Text { Text {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: (root.doc.bufferSeconds || 1) + QbzBridge.tr("s") text: (root.doc.bufferSeconds || 1) + QbzBridge.tr("s", QbzBridge.trRev)
color: theme.textSecondary color: theme.textSecondary
font.pixelSize: theme.fontBody font.pixelSize: theme.fontBody
font.weight: theme.weightMedium font.weight: theme.weightMedium
@@ -562,16 +562,16 @@ Item {
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("Streaming only") label: QbzBridge.tr("Streaming only", QbzBridge.trRev)
description: QbzBridge.tr("Skip writing tracks to the local cache while streaming.") description: QbzBridge.tr("Skip writing tracks to the local cache while streaming.", QbzBridge.trRev)
QbzToggle { QbzToggle {
checked: root.doc.streamingOnly === true checked: root.doc.streamingOnly === true
onToggled: function (v) { QbzBridge.settingsBool("streaming-only", v) } onToggled: function (v) { QbzBridge.settingsBool("streaming-only", v) }
} }
} }
SettingRow { SettingRow {
label: QbzBridge.tr("When quality retries fail") label: QbzBridge.tr("When quality retries fail", QbzBridge.trRev)
description: QbzBridge.tr("What to do when every quality tier for a track is unavailable.") description: QbzBridge.tr("What to do when every quality tier for a track is unavailable.", QbzBridge.trRev)
QbzSelect { QbzSelect {
menuWidth: 240 menuWidth: 240
options: root.doc.retryBehaviors || [] options: root.doc.retryBehaviors || []
@@ -606,14 +606,14 @@ Item {
width: parent.width width: parent.width
spacing: 4 spacing: 4
GroupHeader { GroupHeader {
text: root.section === 3 ? QbzBridge.tr("OFFLINE") text: root.section === 3 ? QbzBridge.tr("OFFLINE", QbzBridge.trRev)
: root.section === 4 ? QbzBridge.tr("LOCAL LIBRARY") : root.section === 4 ? QbzBridge.tr("LOCAL LIBRARY", QbzBridge.trRev)
: root.section === 5 ? QbzBridge.tr("BLACKLIST") : root.section === 5 ? QbzBridge.tr("BLACKLIST", QbzBridge.trRev)
: QbzBridge.tr("DEVELOPER") : QbzBridge.tr("DEVELOPER", QbzBridge.trRev)
} }
Text { Text {
width: parent.width width: parent.width
text: QbzBridge.tr("This section is not ported to the Qt frontend yet.") text: QbzBridge.tr("This section is not ported to the Qt frontend yet.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
+16 -16
View File
@@ -143,7 +143,7 @@ Rectangle {
NavRow { NavRow {
navId: "discover" navId: "discover"
name: "compass" name: "compass"
label: QbzBridge.tr("Discover") label: QbzBridge.tr("Discover", QbzBridge.trRev)
visible: !QbzBridge.offline visible: !QbzBridge.offline
onClicked: { onClicked: {
root.activeNav = "discover" root.activeNav = "discover"
@@ -153,7 +153,7 @@ Rectangle {
NavRow { NavRow {
navId: "library" navId: "library"
name: "music-library-2" name: "music-library-2"
label: QbzBridge.tr("Library") label: QbzBridge.tr("Library", QbzBridge.trRev)
visible: !QbzBridge.offline visible: !QbzBridge.offline
onClicked: { onClicked: {
root.activeNav = "library" root.activeNav = "library"
@@ -163,14 +163,14 @@ Rectangle {
NavRow { NavRow {
navId: "local" navId: "local"
name: "hard-drive" name: "hard-drive"
label: QbzBridge.tr("Local Library") label: QbzBridge.tr("Local Library", QbzBridge.trRev)
onClicked: root.activeNav = "local" onClicked: root.activeNav = "local"
} }
NavRow { NavRow {
navId: "myqbz" navId: "myqbz"
name: "qbz-symbolic" name: "qbz-symbolic"
// Slint: MyQbzBrandingState.label, default "My QBZ". // Slint: MyQbzBrandingState.label, default "My QBZ".
label: QbzBridge.tr("My QBZ") label: QbzBridge.tr("My QBZ", QbzBridge.trRev)
onClicked: root.activeNav = "myqbz" onClicked: root.activeNav = "myqbz"
} }
} }
@@ -193,7 +193,7 @@ Rectangle {
visible: !root.searchOpen visible: !root.searchOpen
width: parent.width - 4 * 26 width: parent.width - 4 * 26
height: parent.height height: parent.height
text: QbzBridge.tr("PLAYLISTS") text: QbzBridge.tr("PLAYLISTS", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 10 font.pixelSize: 10
font.letterSpacing: 1 font.letterSpacing: 1
@@ -220,7 +220,7 @@ Rectangle {
Text { Text {
visible: searchEdit.text === "" visible: searchEdit.text === ""
anchors.fill: parent anchors.fill: parent
text: QbzBridge.tr("Search playlists") text: QbzBridge.tr("Search playlists", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -324,7 +324,7 @@ Rectangle {
spacing: 6 spacing: 6
QbzIcon { name: "arrow-up-down"; width: 13; height: 13; tintName: "muted" } QbzIcon { name: "arrow-up-down"; width: 13; height: 13; tintName: "muted" }
Text { Text {
text: QbzBridge.tr("Sort by") text: QbzBridge.tr("Sort by", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 11 font.pixelSize: 11
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -332,11 +332,11 @@ Rectangle {
} }
Repeater { Repeater {
model: [ model: [
{ "opt": "name", "label": QbzBridge.tr("Name (A-Z)") }, { "opt": "name", "label": QbzBridge.tr("Name (A-Z)", QbzBridge.trRev) },
{ "opt": "recent", "label": QbzBridge.tr("Recent") }, { "opt": "recent", "label": QbzBridge.tr("Recent", QbzBridge.trRev) },
{ "opt": "tracks", "label": QbzBridge.tr("# of tracks") }, { "opt": "tracks", "label": QbzBridge.tr("# of tracks", QbzBridge.trRev) },
{ "opt": "playcount", "label": QbzBridge.tr("Play Count") }, { "opt": "playcount", "label": QbzBridge.tr("Play Count", QbzBridge.trRev) },
{ "opt": "custom", "label": QbzBridge.tr("Custom") }, { "opt": "custom", "label": QbzBridge.tr("Custom", QbzBridge.trRev) },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -385,9 +385,9 @@ Rectangle {
// of scope). // of scope).
Repeater { Repeater {
model: [ model: [
{ "icon": "folder-plus", "label": QbzBridge.tr("New folder") }, { "icon": "folder-plus", "label": QbzBridge.tr("New folder", QbzBridge.trRev) },
{ "icon": "library-big", "label": QbzBridge.tr("Manage playlists") }, { "icon": "library-big", "label": QbzBridge.tr("Manage playlists", QbzBridge.trRev) },
{ "icon": "import", "label": QbzBridge.tr("Import") }, { "icon": "import", "label": QbzBridge.tr("Import", QbzBridge.trRev) },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -618,7 +618,7 @@ Rectangle {
Text { Text {
visible: !root.mini && root.entries.length === 0 && !QbzBridge.offline visible: !root.mini && root.entries.length === 0 && !QbzBridge.offline
width: plColumn.width width: plColumn.width
text: QbzBridge.tr("No playlists yet.") text: QbzBridge.tr("No playlists yet.", QbzBridge.trRev)
color: theme.textMuted color: theme.textMuted
font.pixelSize: 12 font.pixelSize: 12
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
+7 -7
View File
@@ -14,10 +14,10 @@ QbzContextMenu {
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("New"), "icon": "panel-left", "mode": 0 }, { "label": QbzBridge.tr("New", QbzBridge.trRev), "icon": "panel-left", "mode": 0 },
{ "label": QbzBridge.tr("Classic"), "icon": "panel-right-close", "mode": 1 }, { "label": QbzBridge.tr("Classic", QbzBridge.trRev), "icon": "panel-right-close", "mode": 1 },
{ "label": QbzBridge.tr("Small"), "icon": "rows-3", "mode": 2 }, { "label": QbzBridge.tr("Small", QbzBridge.trRev), "icon": "rows-3", "mode": 2 },
{ "label": QbzBridge.tr("Large"), "icon": "layout-grid", "mode": 3 }, { "label": QbzBridge.tr("Large", QbzBridge.trRev), "icon": "layout-grid", "mode": 3 },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
@@ -82,9 +82,9 @@ QbzContextMenu {
} }
Repeater { Repeater {
model: [ model: [
{ "label": QbzBridge.tr("Miniplayer"), "icon": "picture-in-picture-2" }, { "label": QbzBridge.tr("Miniplayer", QbzBridge.trRev), "icon": "picture-in-picture-2" },
{ "label": QbzBridge.tr("Immersive"), "icon": "maximize-2" }, { "label": QbzBridge.tr("Immersive", QbzBridge.trRev), "icon": "maximize-2" },
{ "label": QbzBridge.tr("Kiosk mode"), "icon": "hard-drive" }, { "label": QbzBridge.tr("Kiosk mode", QbzBridge.trRev), "icon": "hard-drive" },
] ]
delegate: Rectangle { delegate: Rectangle {
required property var modelData required property var modelData
+13 -3
View File
@@ -148,6 +148,11 @@ pub mod qbz_bridge {
#[qproperty(QString, theme_list_json)] #[qproperty(QString, theme_list_json)]
// Dropdown filter: 0 All / 1 Dark / 2 Light (ui_prefs theme_filter). // Dropdown filter: 0 All / 1 Dark / 2 Light (ui_prefs theme_filter).
#[qproperty(i32, theme_filter)] #[qproperty(i32, theme_filter)]
// --- i18n (phase 20) ----------------------------------------------
// Translation revision: bumped on every live language switch. Every
// QML `QbzBridge.tr(msgid, QbzBridge.trRev)` binding depends on it,
// so all ~380 call sites re-evaluate through the new catalog.
#[qproperty(i32, tr_rev)]
// --- Lyrics panel (phase 9) ---------------------------------------- // --- Lyrics panel (phase 9) ----------------------------------------
#[qproperty(bool, lyrics_open)] #[qproperty(bool, lyrics_open)]
@@ -262,9 +267,11 @@ pub mod qbz_bridge {
/// i18n lookup against the shared gettext catalog (qbz-i18n), so the /// i18n lookup against the shared gettext catalog (qbz-i18n), so the
/// QML texts reuse the EXISTING .po translations via the same msgids /// QML texts reuse the EXISTING .po translations via the same msgids
/// the Slint `@tr()` calls use. /// the Slint `@tr()` calls use. `rev` is the trRev binding
/// dependency (phase 20) — unused in Rust, it only forces QML
/// re-evaluation when the language changes live.
#[qinvokable] #[qinvokable]
fn tr(self: &QbzBridge, msgid: QString) -> QString; fn tr(self: &QbzBridge, msgid: QString, rev: i32) -> QString;
// --- Shell chrome ------------------------------------------------- // --- Shell chrome -------------------------------------------------
/// Header panel-left button: cycle the sidebar open -> mini -> /// Header panel-left button: cycle the sidebar open -> mini ->
@@ -663,6 +670,7 @@ pub struct QbzBridgeRust {
theme_slug: QString, theme_slug: QString,
theme_list_json: QString, theme_list_json: QString,
theme_filter: i32, theme_filter: i32,
tr_rev: i32,
queue_json: QString, queue_json: QString,
lyrics_open: bool, lyrics_open: bool,
lyrics_json: QString, lyrics_json: QString,
@@ -759,6 +767,7 @@ impl Default for QbzBridgeRust {
theme_slug: QString::from(crate::theme_qt::current_slug().as_str()), theme_slug: QString::from(crate::theme_qt::current_slug().as_str()),
theme_list_json: QString::from(crate::theme_qt::theme_list_json().as_str()), theme_list_json: QString::from(crate::theme_qt::theme_list_json().as_str()),
theme_filter: crate::theme_qt::theme_filter(), theme_filter: crate::theme_qt::theme_filter(),
tr_rev: 0,
queue_json: QString::from("{}"), queue_json: QString::from("{}"),
lyrics_open: false, lyrics_open: false,
lyrics_json: QString::from("{}"), lyrics_json: QString::from("{}"),
@@ -829,7 +838,8 @@ impl qbz_bridge::QbzBridge {
crate::do_logout(); crate::do_logout();
} }
pub fn tr(&self, msgid: QString) -> QString { pub fn tr(&self, msgid: QString, rev: i32) -> QString {
let _ = rev; // binding dependency only (see the bridge declaration)
QString::from(&qbz_i18n::t(&msgid.to_string())) QString::from(&qbz_i18n::t(&msgid.to_string()))
} }
+75 -1
View File
@@ -367,6 +367,7 @@ pub(crate) fn open_album(album_id: String) {
return; return;
} }
nav_qt::record("album"); nav_qt::record("album");
*LAST_DETAIL.lock().unwrap() = ("album".to_string(), album_id.clone());
let runtime = app(); let runtime = app();
let param = album_id.clone(); let param = album_id.clone();
ui(move |mut b| { ui(move |mut b| {
@@ -395,6 +396,7 @@ pub(crate) fn open_artist(artist_id: String) {
return; return;
} }
nav_qt::record("artist"); nav_qt::record("artist");
*LAST_DETAIL.lock().unwrap() = ("artist".to_string(), artist_id.clone());
let runtime = app(); let runtime = app();
let param = artist_id.clone(); let param = artist_id.clone();
ui(move |mut b| { ui(move |mut b| {
@@ -898,6 +900,7 @@ static LIBRARY_LOADED: Mutex<bool> = Mutex::new(false);
/// Sidebar navigation: record the view and lazy-load its data. /// Sidebar navigation: record the view and lazy-load its data.
pub(crate) fn navigate_to(view: &str) { pub(crate) fn navigate_to(view: &str) {
nav_qt::record(view); nav_qt::record(view);
LAST_DETAIL.lock().unwrap().0.clear();
if view == "library" { if view == "library" {
load_library_once(); load_library_once();
} }
@@ -906,6 +909,70 @@ pub(crate) fn navigate_to(view: &str) {
} }
} }
// ============================ i18n (phase 20) ==============================
/// The active detail view ("album"/"artist" + id) — re-published on a live
/// language switch so its Rust-built section headers re-translate.
static LAST_DETAIL: Mutex<(String, String)> = Mutex::new((String::new(), String::new()));
/// Settings > Appearance > Language: the pref is already persisted by the
/// settings arm; this applies it LIVE — "auto" resolves POSIX env — then:
/// 1. bumps trRev, so EVERY `QbzBridge.tr(msgid, QbzBridge.trRev)` binding
/// re-evaluates through the new catalog (the Slint reseed equivalent);
/// 2. re-publishes the Rust-built translated documents (home section
/// titles, library feed labels, settings option labels, the active
/// album/artist detail headers — tf() plurals included).
pub(crate) fn apply_language(code: String) {
let resolved = if code == "auto" {
qbz_i18n::resolve_auto().to_string()
} else {
code.clone()
};
qbz_i18n::set_language(&resolved);
log::info!("[qbz-qt] language -> {code} (resolved: {resolved})");
ui(move |mut b| {
let next = b.as_ref().tr_rev() + 1;
b.as_mut().set_tr_rev(next);
});
reload_home();
reload_library();
publish_settings();
let (view, id) = LAST_DETAIL.lock().unwrap().clone();
if !id.is_empty() {
match view.as_str() {
"album" => republish_album(id),
"artist" => republish_artist(id),
_ => {}
}
}
}
/// Re-fetch + publish the album/artist detail doc WITHOUT touching nav
/// (the open_* entry points record a nav entry).
fn republish_album(album_id: String) {
if offline_fwd::engine().status().is_offline() {
return;
}
let runtime = app();
spawn(async move {
if let Ok(json) = album_qt::load_album_view(&runtime, &album_id).await {
ui(move |mut b| b.as_mut().set_album_json(QString::from(json.as_str())));
}
});
}
fn republish_artist(artist_id: String) {
if offline_fwd::engine().status().is_offline() {
return;
}
let runtime = app();
spawn(async move {
if let Ok(json) = artist_qt::load_artist_view(&runtime, &artist_id).await {
ui(move |mut b| b.as_mut().set_artist_json(QString::from(json.as_str())));
}
});
}
// ============================ Search (phase 15) =========================== // ============================ Search (phase 15) ===========================
pub(crate) fn search_live(query: String) { pub(crate) fn search_live(query: String) {
@@ -1249,7 +1316,14 @@ fn publish_home_sections(sections: &home_qt::DiscoverSections) {
fn main() { fn main() {
qbz_log::install("info"); qbz_log::install("info");
qbz_i18n::set_language(qbz_i18n::resolve_auto()); // i18n (phase 20): honor the persisted ui_prefs language; "auto"/missing
// resolves POSIX env (qbz_i18n::resolve_auto).
let boot_lang = settings_qt::pref_str("language", "auto");
qbz_i18n::set_language(if boot_lang == "auto" {
qbz_i18n::resolve_auto()
} else {
boot_lang.as_str()
});
// rustls process-level CryptoProvider (aws-lc-rs) — required before any // rustls process-level CryptoProvider (aws-lc-rs) — required before any
// reqwest call, same as the Slint and daemon binaries. // reqwest call, same as the Slint and daemon binaries.
qbz_app::ensure_crypto_provider(); qbz_app::ensure_crypto_provider();
+2 -3
View File
@@ -1340,9 +1340,8 @@ pub async fn settings_select(runtime: &Arc<AppRuntime<LoggingAdapter>>, key: &st
return; return;
}; };
save_pref("language", serde_json::json!(lang)); save_pref("language", serde_json::json!(lang));
// POC-NOTE: live language switching is phase 20; the pref // Live switch (phase 20): trRev bump + doc republish.
// persists here and applies on the next launch. crate::apply_language(lang.to_string());
log::info!("[qbz-qt] language -> {lang} (applies on next launch; live switch is phase 20)");
} }
"ui-scale" => { "ui-scale" => {
let Some(scale) = UI_SCALE_VALUES.get(index) else { let Some(scale) = UI_SCALE_VALUES.get(index) else {