feat(v2): say when filters or a search empty the gallery

An empty result under active filters read "No games in this platform
yet". The shell now says no games match the selected filters, or the
query when one is set, and falls back to the view's own message. The
platform's empty message moves into the locale files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VhukP5AfTE36MxtiJR6vL
This commit is contained in:
zurdi
2026-09-18 17:22:30 +02:00
parent 4fe426cd1c
commit bd3dc94c63
38 changed files with 47 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
"developer": "Разработчик",
"download-platform": "Изтегли платформа",
"edit-platform": "Редактирай платформата",
"empty": "Все още няма игри в тази платформа.",
"export": "Експортирай",
"family": "Фамилия",
"filter-gallery": "Филтрирай галерията",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Превключи към друга категория от страничната лента, за да видиш другите файлове на този ROM.",
"no-files-uploaded": "Не са качени файлове.",
"no-games-match": "Няма игри, отговарящи на търсенето.",
"no-games-match-filters": "Няма игри, отговарящи на избраните филтри.",
"no-games-match-query": "Няма игри, отговарящи на \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Няма активиран източник на метаданни",

View File

@@ -16,6 +16,7 @@
"developer": "Vývojář",
"download-platform": "Stáhnout platformu",
"edit-platform": "Upravit platformu",
"empty": "Na této platformě zatím nejsou žádné hry.",
"export": "Export",
"family": "Rodina",
"filter-gallery": "Filtrovat galerii",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Přepněte na jinou kategorii v postranním panelu pro zobrazení dalších souborů této ROM.",
"no-files-uploaded": "Žádné soubory nebyly nahrány.",
"no-games-match": "Žádné hry neodpovídají vašemu hledání.",
"no-games-match-filters": "Žádné hry neodpovídají vybraným filtrům.",
"no-games-match-query": "Žádné hry neodpovídají „{query}“.",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Žádný zdroj metadat není povolen",

View File

@@ -16,6 +16,7 @@
"developer": "Entwickler",
"download-platform": "Plattform herunterladen",
"edit-platform": "Plattform bearbeiten",
"empty": "Auf dieser Plattform gibt es noch keine Spiele.",
"export": "Exportieren",
"family": "Familie",
"filter-gallery": "Gallerie filtern",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Wechsle zu einer anderen Kategorie in der Seitenleiste, um andere Dateien dieser ROM zu sehen.",
"no-files-uploaded": "Keine Dateien wurden hochgeladen.",
"no-games-match": "Keine Spiele entsprechen deiner Suche.",
"no-games-match-filters": "Keine Spiele entsprechen den ausgewählten Filtern.",
"no-games-match-query": "Keine Spiele entsprechen \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Keine Quelle für Metadaten aktiv",

View File

@@ -16,6 +16,7 @@
"developer": "Developer",
"download-platform": "Download platform",
"edit-platform": "Edit platform",
"empty": "No games in this platform yet.",
"export": "Export",
"family": "Family",
"filter-gallery": "Filter gallery",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Switch to another category from the sidebar to see this ROM's other files.",
"no-files-uploaded": "No files were uploaded.",
"no-games-match": "No games match your search.",
"no-games-match-filters": "No games match the selected filters.",
"no-games-match-query": "No games match \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "No metadata source enabled",

View File

@@ -16,6 +16,7 @@
"developer": "Developer",
"download-platform": "Download platform",
"edit-platform": "Edit platform",
"empty": "No games in this platform yet.",
"export": "Export",
"family": "Family",
"filter-gallery": "Filter gallery",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Switch to another category from the sidebar to see this ROM's other files.",
"no-files-uploaded": "No files were uploaded.",
"no-games-match": "No games match your search.",
"no-games-match-filters": "No games match the selected filters.",
"no-games-match-query": "No games match \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "No metadata source enabled",

View File

@@ -16,6 +16,7 @@
"developer": "Desarrollador",
"download-platform": "Descargar plataforma",
"edit-platform": "Editar plataforma",
"empty": "Todavía no hay juegos en esta plataforma.",
"export": "Exportar",
"family": "Familia",
"filter-gallery": "Filtrar galería",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Sube archivos para añadirlos a esta categoría.",
"no-files-uploaded": "Aún no hay archivos subidos",
"no-games-match": "Ningún juego coincide con la búsqueda.",
"no-games-match-filters": "Ningún juego coincide con los filtros seleccionados.",
"no-games-match-query": "Ningún juego coincide con \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "No hay fuente de metadatos habilitada",

View File

@@ -16,6 +16,7 @@
"developer": "Développeur",
"download-platform": "Télécharger la plateforme",
"edit-platform": "Modifier la plateforme",
"empty": "Aucun jeu sur cette plateforme pour le moment.",
"export": "Exporter",
"family": "Famille",
"filter-gallery": "Filtrer la galerie",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Choisissez une autre catégorie depuis la barre latérale pour voir les autres fichiers de cette ROM.",
"no-files-uploaded": "Aucun fichier n'a été téléversé.",
"no-games-match": "Aucun jeu ne correspond à votre recherche.",
"no-games-match-filters": "Aucun jeu ne correspond aux filtres sélectionnés.",
"no-games-match-query": "Aucun jeu ne correspond à « {query} ».",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Aucune source de métadonnées activée",

View File

@@ -16,6 +16,7 @@
"developer": "Fejlesztő",
"download-platform": "Platform letöltése",
"edit-platform": "Platform szerkesztése",
"empty": "Ezen a platformon még nincsenek játékok.",
"export": "Exportálás",
"family": "Család",
"filter-gallery": "Szűrőgaléria",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Válts másik kategóriára az oldalsávon, hogy a ROM többi fájlját lásd.",
"no-files-uploaded": "Egyetlen fájl sem lett feltöltve.",
"no-games-match": "Egyetlen játék sem felel meg a keresésnek.",
"no-games-match-filters": "Egyetlen játék sem felel meg a kiválasztott szűrőknek.",
"no-games-match-query": "Egyetlen játék sem felel meg a következőnek: „{query}”.",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Nincs engedélyezett metaadat-forrás",

View File

@@ -16,6 +16,7 @@
"developer": "Sviluppatore",
"download-platform": "Scarica piattaforma",
"edit-platform": "Modifica piattaforma",
"empty": "Ancora nessun gioco in questa piattaforma.",
"export": "Esporta",
"family": "Famiglia",
"filter-gallery": "Filtra galleria",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Passa a un'altra categoria dalla barra laterale per vedere gli altri file di questa ROM.",
"no-files-uploaded": "Nessun file caricato.",
"no-games-match": "Nessun gioco corrisponde alla tua ricerca.",
"no-games-match-filters": "Nessun gioco corrisponde ai filtri selezionati.",
"no-games-match-query": "Nessun gioco corrisponde a \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Nessuna fonte di metadati abilitata",

View File

@@ -16,6 +16,7 @@
"developer": "開発元",
"download-platform": "プラットフォームをダウンロード",
"edit-platform": "プラットフォームを編集",
"empty": "このプラットフォームにはまだゲームがありません。",
"export": "エクスポート",
"family": "ファミリー",
"filter-gallery": "ギャラリーをフィルタ",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "サイドバーから別のカテゴリに切り替えると、このROMの他のファイルを確認できます。",
"no-files-uploaded": "アップロードされたファイルはありません。",
"no-games-match": "検索に一致するゲームはありません。",
"no-games-match-filters": "選択したフィルターに一致するゲームがありません。",
"no-games-match-query": "「{query}」に一致するゲームはありません。",
"no-manual": "No manual available for this game.",
"no-metadata-source": "メタデータ検索が無効です",

View File

@@ -16,6 +16,7 @@
"developer": "개발사",
"download-platform": "플랫폼 다운로드",
"edit-platform": "플랫폼 편집",
"empty": "이 플랫폼에 아직 게임이 없습니다.",
"export": "내보내기",
"family": "계열",
"filter-gallery": "갤러리 필터",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "사이드바에서 다른 카테고리로 전환하여 이 ROM의 다른 파일을 확인하세요.",
"no-files-uploaded": "업로드된 파일이 없습니다.",
"no-games-match": "검색과 일치하는 게임이 없습니다.",
"no-games-match-filters": "선택한 필터와 일치하는 게임이 없습니다.",
"no-games-match-query": "\"{query}\"와(과) 일치하는 게임이 없습니다.",
"no-manual": "No manual available for this game.",
"no-metadata-source": "메타데이터 DB 연동 안됨",

View File

@@ -16,6 +16,7 @@
"developer": "Deweloper",
"download-platform": "Pobierz platforme",
"edit-platform": "Edytuj platformę",
"empty": "Na tej platformie nie ma jeszcze gier.",
"export": "Eksportuj",
"family": "Rodzina",
"filter-gallery": "Filtruj galerię",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Przełącz się na inną kategorię z paska bocznego, aby zobaczyć inne pliki tego ROM-u.",
"no-files-uploaded": "Nie przesłano żadnych plików.",
"no-games-match": "Brak gier pasujących do wyszukiwania.",
"no-games-match-filters": "Brak gier pasujących do wybranych filtrów.",
"no-games-match-query": "Brak gier pasujących do \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Brak aktywnego źródła metadanych",

View File

@@ -16,6 +16,7 @@
"developer": "Desenvolvedor",
"download-platform": "Baixar plataforma",
"edit-platform": "Editar plataforma",
"empty": "Ainda não há jogos nesta plataforma.",
"export": "Exportar",
"family": "Família",
"filter-gallery": "Filtrar galeria",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Mude para outra categoria na barra lateral para ver os outros arquivos desta ROM.",
"no-files-uploaded": "Nenhum arquivo foi enviado.",
"no-games-match": "Nenhum jogo corresponde à sua busca.",
"no-games-match-filters": "Nenhum jogo corresponde aos filtros selecionados.",
"no-games-match-query": "Nenhum jogo corresponde a \"{query}\".",
"no-manual": "Nenhum manual disponível para este jogo.",
"no-metadata-source": "Nenhuma fonte de metadados habilitada",

View File

@@ -16,6 +16,7 @@
"developer": "Dezvoltator",
"download-platform": "Descarcă platforma",
"edit-platform": "Editează platforma",
"empty": "Încă nu există jocuri pe această platformă.",
"export": "Exportare",
"family": "Familie",
"filter-gallery": "Filtrare galerie",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Comută la altă categorie din bara laterală pentru a vedea celelalte fișiere ale acestui ROM.",
"no-files-uploaded": "Niciun fișier nu a fost încărcat.",
"no-games-match": "Niciun joc nu corespunde căutării.",
"no-games-match-filters": "Niciun joc nu corespunde filtrelor selectate.",
"no-games-match-query": "Niciun joc nu corespunde căutării „{query}”.",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Nicio sursă de metadate activată",

View File

@@ -16,6 +16,7 @@
"developer": "Разработчик",
"download-platform": "Скачать платформу",
"edit-platform": "Редактировать платформу",
"empty": "В этой платформе пока нет игр.",
"export": "Экспорт",
"family": "Семейство",
"filter-gallery": "Фильтр галереи",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Переключитесь на другую категорию в боковой панели, чтобы увидеть другие файлы этого ROM.",
"no-files-uploaded": "Файлы не были загружены.",
"no-games-match": "Нет игр, соответствующих вашему запросу.",
"no-games-match-filters": "Нет игр, соответствующих выбранным фильтрам.",
"no-games-match-query": "Нет игр, соответствующих \"{query}\".",
"no-manual": "No manual available for this game.",
"no-metadata-source": "Источник метаданных не включен",

View File

@@ -16,6 +16,7 @@
"developer": "Geliştirici",
"download-platform": "Platformu indir",
"edit-platform": "Platformu düzenle",
"empty": "Bu platformda henüz oyun yok.",
"export": "Dışa aktar",
"family": "Aile",
"filter-gallery": "Galeriyi filtrele",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "Bu ROM'un diğer dosyalarını görmek için kenar çubuğundan başka bir kategori seçin.",
"no-files-uploaded": "Hiç dosya yüklenmedi.",
"no-games-match": "Aramanızla eşleşen oyun bulunamadı.",
"no-games-match-filters": "Seçili filtrelere uyan oyun yok.",
"no-games-match-query": "\"{query}\" ile eşleşen oyun bulunamadı.",
"no-manual": "Bu oyun için kılavuz mevcut değil.",
"no-metadata-source": "Meta veri kaynağı etkin değil",

View File

@@ -16,6 +16,7 @@
"developer": "开发商",
"download-platform": "下载平台",
"edit-platform": "编辑平台",
"empty": "此平台还没有游戏。",
"export": "导出",
"family": "家族",
"filter-gallery": "筛选游戏库",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "从侧边栏切换到其他分类,以查看此 ROM 的其他文件。",
"no-files-uploaded": "未上传任何文件。",
"no-games-match": "没有符合搜索条件的游戏。",
"no-games-match-filters": "没有符合所选筛选条件的游戏。",
"no-games-match-query": "没有符合 \"{query}\" 的游戏。",
"no-manual": "此游戏暂无手册。",
"no-metadata-source": "未启用元数据源",

View File

@@ -16,6 +16,7 @@
"developer": "開發商",
"download-platform": "下載平台",
"edit-platform": "編輯平台",
"empty": "此平台還沒有遊戲。",
"export": "導出",
"family": "家族",
"filter-gallery": "篩選遊戲庫",

View File

@@ -253,6 +253,7 @@
"no-files-in-category-hint": "從側邊欄切換到其他類別,以查看此 ROM 的其他檔案。",
"no-files-uploaded": "未上傳任何檔案。",
"no-games-match": "沒有符合搜尋的遊戲。",
"no-games-match-filters": "沒有符合所選篩選條件的遊戲。",
"no-games-match-query": "找不到符合「{query}」的遊戲。",
"no-manual": "No manual available for this game.",
"no-metadata-source": "未啟用元數據來源",

View File

@@ -35,6 +35,7 @@ import {
watch,
watchEffect,
} from "vue";
import { useI18n } from "vue-i18n";
import { onBeforeRouteLeave, onBeforeRouteUpdate, useRoute } from "vue-router";
import { useUISettings } from "@/composables/useUISettings";
import storeGalleryFilter from "@/stores/galleryFilter";
@@ -125,6 +126,7 @@ defineSlots<{
useGalleryFilterUrl();
useGalleryViewModeUrl();
const { t } = useI18n();
const route = useRoute();
const galleryRoms = storeGalleryRoms();
const galleryFilterStore = storeGalleryFilter();
@@ -349,7 +351,14 @@ const loadingInitial = computed(
);
const notFoundRef = computed(() => props.notFound);
const emptyMessageRef = computed(() => props.emptyMessage);
// An empty result under a search or filters says why, not that the view is empty.
const emptyMessageRef = computed(() => {
if (searchTerm.value) {
return t("rom.no-games-match-query", { query: searchTerm.value });
}
if (filterActiveCount.value > 0) return t("rom.no-games-match-filters");
return props.emptyMessage;
});
const notFoundMessageRef = computed(
() => props.notFoundMessage ?? props.emptyMessage,
);

View File

@@ -460,7 +460,7 @@ async function onDelete() {
ref="shellRef"
:has-header="!!currentPlatform"
:search-placeholder="'Filter this platform…'"
empty-message="No games in this platform yet."
:empty-message="t('platform.empty')"
:not-found="notFound"
not-found-message="Platform not found."
:show-platform-badge="false"