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 || []; state.vehicles = data || [];
statCarsCount.textContent = state.vehicles.length; 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(); const brands = [...new Set(state.vehicles.map(v => v.brand))].sort();
brandFilter.innerHTML = `<option value="all">${t("all")}</option>` + brandFilter.innerHTML = `<option value="all">${t("all")}</option>` +
+2
View File
@@ -15,6 +15,7 @@ export const translations = {
statDeposit: "Faire Kaution", statDeposit: "Faire Kaution",
statSupport: "Support", statSupport: "Support",
statCars: "Fahrzeuge", statCars: "Fahrzeuge",
statCar: "Fahrzeug",
fleetEyebrow: "Unsere Flotte", fleetEyebrow: "Unsere Flotte",
fleetTitle: "Handverlesen. Gepflegt. Startklar.", fleetTitle: "Handverlesen. Gepflegt. Startklar.",
@@ -264,6 +265,7 @@ export const translations = {
statDeposit: "Fair Deposit", statDeposit: "Fair Deposit",
statSupport: "Support", statSupport: "Support",
statCars: "Vehicles", statCars: "Vehicles",
statCar: "Vehicle",
fleetEyebrow: "Our Fleet", fleetEyebrow: "Our Fleet",
fleetTitle: "Hand-picked. Maintained. Ready.", fleetTitle: "Hand-picked. Maintained. Ready.",
+2 -2
View File
@@ -136,8 +136,8 @@
<div class="hero-stats"> <div class="hero-stats">
<div><strong data-i18n="statDeposit">Faire Kaution</strong><span>Fair Deposit</span></div> <div><strong data-i18n="statDeposit">Faire Kaution</strong><span>Fair Deposit</span></div>
<div><strong id="statCarsCount"></strong><span data-i18n="statCars">Fahrzeuge</span></div> <div><strong id="statCarsCount"></strong><span id="statCarsLabel" data-i18n="statCars">Fahrzeuge</span></div>
<div><strong>24/7</strong><span data-i18n="statSupport">Support</span></div> <div><strong>24/7</strong><span data-i18n="statSupport">Support</span></div>
</div> </div>
</div> </div>
</section> </section>