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

This commit is contained in:
2026-05-31 14:07:02 +02:00
parent 2f90534877
commit 557528d85a
3 changed files with 6 additions and 1 deletions
+2
View File
@@ -124,6 +124,8 @@ async function loadVehicles() {
state.vehicles = data || [];
statCarsCount.textContent = state.vehicles.length;
statCarsLabel.dataset.i18n = state.vehicles.length === 1 ? 'statCar' : 'statCars';
applyI18n();
// Load vehicle photos
if (state.vehicles.length > 0) {
+2
View File
@@ -12,6 +12,7 @@ export const translations = {
statDeposit: "Faire Kaution",
statCars: "Fahrzeuge",
statCar: "Fahrzeug",
fleetTitle: "Handverlesen. Gepflegt. Startklar.",
fleetSub: "Filtern Sie nach Marke und Preis. Klicken Sie für Details oder buchen Sie direkt.",
@@ -248,6 +249,7 @@ export const translations = {
statDeposit: "Fair Deposit",
statCars: "Vehicles",
statCar: "Vehicle",
fleetTitle: "Hand-picked. Maintained. Ready.",
fleetSub: "Filter by brand or price. Click for details or book directly.",
+2 -1
View File
@@ -135,7 +135,8 @@
<div class="hero-stats">
<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>
</div>
</section>