fix: use singular 'Fahrzeug' when only 1 car available

This commit is contained in:
2026-05-31 14:07:02 +02:00
parent e1f6bd56b0
commit c6ee8cd927
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -123,6 +123,8 @@ async function loadVehicles() {
state.vehicles = data || [];
statCarsCount.textContent = state.vehicles.length;
statCarsLabel.dataset.i18n = state.vehicles.length === 1 ? 'statCar' : 'statCars';
applyI18n();
const brands = [...new Set(state.vehicles.map(v => v.brand))].sort();
brandFilter.innerHTML = `<option value="all">${t("all")}</option>` +