feat(ui): translation language setting in the lyrics flyout
New QbzSelect row (Auto (account language) + en es fr de it pt nl ja ru,
the owner-approved list) after the Size row; language names are native
literals, the same convention as the Appearance dropdown. The options
array lives on LyricsState (reseeded from Rust on language change) and
the choice persists per-user in lyrics_prefs.json as translation_language
("auto" or an ISO 639-1 code), sanitized on load (unknown -> auto) and
round-tripped through apply_to_ui/persist_from_ui like the other prefs.
Flyout popup height grows by the new row (and the comment now counts the
lite-fill row it had missed).
km
This commit is contained in:
4 files changed
+84
-4
No files matched your search
@@ -4555,6 +4555,25 @@ export global LyricsState {
|
||||
// between line changes). Default false (smooth karaoke). Kiosk / weak-GPU
|
||||
// tiers force it on via ShellState.reduce-motion regardless of this pref.
|
||||
in-out property <bool> lite-fill: false;
|
||||
// Translation language (Qobuz v10, persisted like the other prefs):
|
||||
// 0 Auto (account language) · 1..9 = en es fr de it pt nl ja ru. Option
|
||||
// labels: the Auto entry is @tr'd, the language names are native
|
||||
// literals — the same convention as AppearanceState.languages. The @tr
|
||||
// DEFAULT is not reactive, so `reseed_i18n_labels` re-pushes the array
|
||||
// on language change.
|
||||
in-out property <int> translation-language-index: 0;
|
||||
in-out property <[string]> translation-language-options: [
|
||||
@tr("Auto (account language)"),
|
||||
"English",
|
||||
"Español",
|
||||
"Français",
|
||||
"Deutsch",
|
||||
"Italiano",
|
||||
"Português",
|
||||
"Nederlands",
|
||||
"日本語",
|
||||
"Русский",
|
||||
];
|
||||
// Active (karaoke fill) color. `use-custom-color: false` = follow the theme
|
||||
// accent (Tauri activeColor: ''). The palette swatches set both (deviation
|
||||
// D6: swatches instead of a native color input — Slint has none).
|
||||
|
||||
Reference in new issue
Block a user