i18n(photos): translate FilterBar via $_() — App/Zeitraum/Sortierung/Reihenfolge + Reset/Apply

Reuses existing photos.filters.* (app, dateRange, date, size, sortOrder)
and adds 6 keys (sortByShort, createdAt, newestFirst, oldestFirst, reset,
apply) for the workbench-embedded filter bar's compact labels.

Baselines: hardcoded 1002 → 994 (8 cleared); missing-keys baseline unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-27 15:26:51 +02:00
parent 5f15946776
commit 4ed8686ddc
7 changed files with 51 additions and 17 deletions

View file

@ -85,12 +85,18 @@
"to": "Bis",
"hasLocation": "Mit Standort",
"sortBy": "Sortieren nach",
"sortByShort": "Sortierung",
"date": "Datum",
"createdAt": "Erstellt",
"size": "Größe",
"sortOrder": "Reihenfolge",
"asc": "Aufsteigend",
"desc": "Absteigend",
"clear": "Filter zurücksetzen"
"newestFirst": "Neueste zuerst",
"oldestFirst": "Älteste zuerst",
"clear": "Filter zurücksetzen",
"reset": "Zurücksetzen",
"apply": "Anwenden"
},
"settings": {
"title": "Einstellungen",

View file

@ -85,12 +85,18 @@
"to": "To",
"hasLocation": "With Location",
"sortBy": "Sort by",
"sortByShort": "Sort",
"date": "Date",
"createdAt": "Created",
"size": "Size",
"sortOrder": "Order",
"asc": "Ascending",
"desc": "Descending",
"clear": "Clear Filters"
"newestFirst": "Newest first",
"oldestFirst": "Oldest first",
"clear": "Clear Filters",
"reset": "Reset",
"apply": "Apply"
},
"settings": {
"title": "Settings",

View file

@ -85,12 +85,18 @@
"to": "Hasta",
"hasLocation": "Con ubicación",
"sortBy": "Ordenar por",
"sortByShort": "Orden",
"date": "Fecha",
"createdAt": "Creado",
"size": "Tamaño",
"sortOrder": "Orden",
"asc": "Ascendente",
"desc": "Descendente",
"clear": "Borrar filtros"
"newestFirst": "Más recientes primero",
"oldestFirst": "Más antiguos primero",
"clear": "Borrar filtros",
"reset": "Restablecer",
"apply": "Aplicar"
},
"settings": {
"title": "Ajustes",

View file

@ -85,12 +85,18 @@
"to": "Au",
"hasLocation": "Avec localisation",
"sortBy": "Trier par",
"sortByShort": "Tri",
"date": "Date",
"createdAt": "Créé",
"size": "Taille",
"sortOrder": "Ordre",
"asc": "Croissant",
"desc": "Décroissant",
"clear": "Effacer les filtres"
"newestFirst": "Plus récent d'abord",
"oldestFirst": "Plus ancien d'abord",
"clear": "Effacer les filtres",
"reset": "Réinitialiser",
"apply": "Appliquer"
},
"settings": {
"title": "Paramètres",

View file

@ -85,12 +85,18 @@
"to": "A",
"hasLocation": "Con posizione",
"sortBy": "Ordina per",
"sortByShort": "Ordinamento",
"date": "Data",
"createdAt": "Creato",
"size": "Dimensione",
"sortOrder": "Ordine",
"asc": "Crescente",
"desc": "Decrescente",
"clear": "Cancella filtri"
"newestFirst": "Più recenti prima",
"oldestFirst": "Più vecchi prima",
"clear": "Cancella filtri",
"reset": "Reimposta",
"apply": "Applica"
},
"settings": {
"title": "Impostazioni",

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { photoStore } from '$lib/modules/photos/stores/photos.svelte';
import { _ } from 'svelte-i18n';
const apps = ['picture', 'chat', 'contacts', 'food'];
@ -42,7 +43,9 @@
<div class="mb-6 flex flex-wrap gap-4 rounded-xl border border-border bg-background-card p-4">
<div class="flex flex-col gap-1.5">
<span class="text-xs font-medium uppercase text-foreground-secondary">App</span>
<span class="text-xs font-medium uppercase text-foreground-secondary"
>{$_('photos.filters.app')}</span
>
<div class="flex flex-wrap gap-1">
{#each apps as app}
<button
@ -58,7 +61,9 @@
</div>
<div class="flex flex-col gap-1.5">
<span class="text-xs font-medium uppercase text-foreground-secondary">Zeitraum</span>
<span class="text-xs font-medium uppercase text-foreground-secondary"
>{$_('photos.filters.dateRange')}</span
>
<div class="flex items-center gap-2">
<input
type="date"
@ -76,30 +81,30 @@
<div class="flex flex-col gap-1.5">
<label for="sort-by" class="text-xs font-medium uppercase text-foreground-secondary"
>Sortierung</label
>{$_('photos.filters.sortByShort')}</label
>
<select
id="sort-by"
class="rounded-lg border border-border bg-background px-2 py-1 text-sm text-foreground"
bind:value={sortBy}
>
<option value="dateTaken">Datum</option>
<option value="createdAt">Erstellt</option>
<option value="size">Größe</option>
<option value="dateTaken">{$_('photos.filters.date')}</option>
<option value="createdAt">{$_('photos.filters.createdAt')}</option>
<option value="size">{$_('photos.filters.size')}</option>
</select>
</div>
<div class="flex flex-col gap-1.5">
<label for="sort-order" class="text-xs font-medium uppercase text-foreground-secondary"
>Reihenfolge</label
>{$_('photos.filters.sortOrder')}</label
>
<select
id="sort-order"
class="rounded-lg border border-border bg-background px-2 py-1 text-sm text-foreground"
bind:value={sortOrder}
>
<option value="desc">Neueste zuerst</option>
<option value="asc">Älteste zuerst</option>
<option value="desc">{$_('photos.filters.newestFirst')}</option>
<option value="asc">{$_('photos.filters.oldestFirst')}</option>
</select>
</div>
@ -108,13 +113,13 @@
class="rounded-lg border border-border bg-background px-3 py-1.5 text-sm text-foreground-secondary hover:bg-background-card-hover"
onclick={clearFilters}
>
Zurücksetzen
{$_('photos.filters.reset')}
</button>
<button
class="rounded-lg bg-primary px-3 py-1.5 text-sm font-medium text-white hover:bg-primary/90"
onclick={applyFilters}
>
Anwenden
{$_('photos.filters.apply')}
</button>
</div>
</div>