From 8c50c16faa8a272ff8cc79f6f814b12e18b57f7b Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 13 Jul 2026 21:01:16 -0600 Subject: [PATCH] fix(offline): clarify that Clear cache keeps downloaded albums MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After #606 the offline Clear-cache purges only the transient cache dirs (tracks/tracks-cmaf/artwork), never the organized downloaded albums — those are removed per-item from the offline manager. The old copy ('Remove every downloaded track. This cannot be undone.') was misleading. Relabels the row 'Clear cache', rewrites the description to say downloads are kept and point to the manager, and softens the toasts to 'Cache cleared' / 'Couldn't clear the cache'. 8 locales. cc --- crates/qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po | 11 +++++++++++ crates/qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/ja/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/nl/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/translations/ru/LC_MESSAGES/qbz-ui.po | 8 ++++++++ crates/qbz-ui/ui/settings/OfflineSettings.slint | 4 ++-- crates/qbz/src/offline_cache.rs | 4 ++-- 10 files changed, 71 insertions(+), 4 deletions(-) diff --git a/crates/qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po index d3cdafc44..229a14b58 100644 --- a/crates/qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/de/LC_MESSAGES/qbz-ui.po @@ -4511,3 +4511,11 @@ msgstr "Zuerst hinzugefügt" msgid "Random" msgstr "Zufällig" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Gibt zwischengespeicherte Daten frei. Deine heruntergeladenen Alben bleiben erhalten — entferne sie über den Offline-Manager oben." + +msgid "Couldn't clear the cache" +msgstr "Cache konnte nicht geleert werden" + diff --git a/crates/qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po index 73ff95291..a6562f294 100644 --- a/crates/qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/en/LC_MESSAGES/qbz-ui.po @@ -280,3 +280,14 @@ msgstr "First added" msgid "Random" msgstr "Random" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." + +msgid "Cache cleared" +msgstr "Cache cleared" + +msgid "Couldn't clear the cache" +msgstr "Couldn't clear the cache" + diff --git a/crates/qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po index 0250d4051..c14b6bebf 100644 --- a/crates/qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/es/LC_MESSAGES/qbz-ui.po @@ -4541,3 +4541,11 @@ msgstr "Primeros agregados" msgid "Random" msgstr "Aleatorio" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Libera datos en caché. Tus álbumes descargados se conservan — elimínalos desde el administrador offline de arriba." + +msgid "Couldn't clear the cache" +msgstr "No se pudo limpiar el caché" + diff --git a/crates/qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po index 8a1d1d3da..de0f39b48 100644 --- a/crates/qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/fr/LC_MESSAGES/qbz-ui.po @@ -4511,3 +4511,11 @@ msgstr "Ajoutés en premier" msgid "Random" msgstr "Aléatoire" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Libère les données en cache. Vos albums téléchargés sont conservés — supprimez-les depuis le gestionnaire hors ligne ci-dessus." + +msgid "Couldn't clear the cache" +msgstr "Impossible de vider le cache" + diff --git a/crates/qbz-ui/translations/ja/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/ja/LC_MESSAGES/qbz-ui.po index 76162abc4..f22f04c4e 100644 --- a/crates/qbz-ui/translations/ja/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/ja/LC_MESSAGES/qbz-ui.po @@ -4500,3 +4500,11 @@ msgstr "追加が古い順" msgid "Random" msgstr "ランダム" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "キャッシュデータを解放します。ダウンロード済みのアルバムは保持されます。削除は上のオフラインマネージャーから行ってください。" + +msgid "Couldn't clear the cache" +msgstr "キャッシュを削除できませんでした" + diff --git a/crates/qbz-ui/translations/nl/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/nl/LC_MESSAGES/qbz-ui.po index 5f316cbd3..0ee157805 100644 --- a/crates/qbz-ui/translations/nl/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/nl/LC_MESSAGES/qbz-ui.po @@ -4523,3 +4523,11 @@ msgstr "Eerst toegevoegd" msgid "Random" msgstr "Willekeurig" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Maakt cachegegevens vrij. Je gedownloade albums blijven behouden — verwijder die via de offline manager hierboven." + +msgid "Couldn't clear the cache" +msgstr "Kan de cache niet wissen" + diff --git a/crates/qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po index c2b52d44f..12d685db0 100644 --- a/crates/qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/pt/LC_MESSAGES/qbz-ui.po @@ -4511,3 +4511,11 @@ msgstr "Adicionados primeiro" msgid "Random" msgstr "Aleatório" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Libera dados em cache. Seus álbuns baixados são mantidos — remova-os no gerenciador offline acima." + +msgid "Couldn't clear the cache" +msgstr "Não foi possível limpar o cache" + diff --git a/crates/qbz-ui/translations/ru/LC_MESSAGES/qbz-ui.po b/crates/qbz-ui/translations/ru/LC_MESSAGES/qbz-ui.po index 61b82edf3..4056de512 100644 --- a/crates/qbz-ui/translations/ru/LC_MESSAGES/qbz-ui.po +++ b/crates/qbz-ui/translations/ru/LC_MESSAGES/qbz-ui.po @@ -4524,3 +4524,11 @@ msgstr "Добавленные первыми" msgid "Random" msgstr "Случайно" + +# Offline cache clear — communicate it does not remove downloads (#606) +msgid "Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above." +msgstr "Освобождает кэшированные данные. Загруженные альбомы сохраняются — удаляйте их в офлайн-менеджере выше." + +msgid "Couldn't clear the cache" +msgstr "Не удалось очистить кэш" + diff --git a/crates/qbz-ui/ui/settings/OfflineSettings.slint b/crates/qbz-ui/ui/settings/OfflineSettings.slint index 2aedbdfbf..a9824a61d 100644 --- a/crates/qbz-ui/ui/settings/OfflineSettings.slint +++ b/crates/qbz-ui/ui/settings/OfflineSettings.slint @@ -155,8 +155,8 @@ export component OfflineSettings inherits VerticalLayout { } } SettingRow { - label: @tr("Clear offline cache"); - description: @tr("Remove every downloaded track. This cannot be undone."); + label: @tr("Clear cache"); + description: @tr("Frees up cached data. Your downloaded albums are kept — remove those from the offline manager above."); SecondaryButton { label: @tr("Clear all"); danger: true; diff --git a/crates/qbz/src/offline_cache.rs b/crates/qbz/src/offline_cache.rs index 7e6520180..23ff2e97d 100644 --- a/crates/qbz/src/offline_cache.rs +++ b/crates/qbz/src/offline_cache.rs @@ -511,13 +511,13 @@ pub fn clear_all(weak: slint::Weak, handle: tokio::runtime::Handle) { }; if let Err(e) = qbz_offline_cache::purge_all_cached_files(&off, &off.library_db).await { log::error!("[qbz-slint] clear offline cache failed: {e}"); - crate::toast::error_weak(&weak, qbz_i18n::t("Couldn't clear the offline cache")); + crate::toast::error_weak(&weak, qbz_i18n::t("Couldn't clear the cache")); return; } if let Ok(mut s) = cached_ids().lock() { s.clear(); } - crate::toast::success_weak(&weak, qbz_i18n::t("Offline cache cleared")); + crate::toast::success_weak(&weak, qbz_i18n::t("Cache cleared")); crate::offline_manager::rebuild(weak.clone()).await; }); }