From c6ee8cd92776c474dc88cbe6cab2ba95e53e0a18 Mon Sep 17 00:00:00 2001 From: Jose Lago Date: Sun, 31 May 2026 14:07:02 +0200 Subject: [PATCH] fix: use singular 'Fahrzeug' when only 1 car available --- frontend/app.js | 2 ++ frontend/i18n.js | 2 ++ frontend/index.html | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 9d0cd6c..d4ca356 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -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 = `` + diff --git a/frontend/i18n.js b/frontend/i18n.js index c4debf7..812f040 100644 --- a/frontend/i18n.js +++ b/frontend/i18n.js @@ -15,6 +15,7 @@ export const translations = { statDeposit: "Faire Kaution", statSupport: "Support", statCars: "Fahrzeuge", + statCar: "Fahrzeug", fleetEyebrow: "Unsere Flotte", fleetTitle: "Handverlesen. Gepflegt. Startklar.", @@ -264,6 +265,7 @@ export const translations = { statDeposit: "Fair Deposit", statSupport: "Support", statCars: "Vehicles", + statCar: "Vehicle", fleetEyebrow: "Our Fleet", fleetTitle: "Hand-picked. Maintained. Ready.", diff --git a/frontend/index.html b/frontend/index.html index ae0e9c5..27d4d9c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -136,8 +136,8 @@
Faire KautionFair Deposit
-
Fahrzeuge
-
24/7Support
+
Fahrzeuge
+
24/7Support