From f45df71410e07d7e2c6b35f9683ad1f20fdc1a16 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Thu, 16 Jul 2026 20:59:33 +0000 Subject: [PATCH] i18n(pricing-coefficients): wrap BODY_TYPES/TRANSMISSION_TYPES CheckboxList options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two CheckboxList options passed raw Vehicle::BODY_TYPES and Vehicle::TRANSMISSION_TYPES arrays — now they run through I18n::opts() so the RO values translate at display. +6 translations for the enum values that weren't yet in dict (Crossover, Pickup, Minivan, DSG, DCT, AMT). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Tenant/Resources/PricingCoefficientResource.php | 4 ++-- lang/en.json | 6 ++++++ lang/ru.json | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/Filament/Tenant/Resources/PricingCoefficientResource.php b/app/Filament/Tenant/Resources/PricingCoefficientResource.php index 5372e9f..fc2af3a 100644 --- a/app/Filament/Tenant/Resources/PricingCoefficientResource.php +++ b/app/Filament/Tenant/Resources/PricingCoefficientResource.php @@ -62,12 +62,12 @@ class PricingCoefficientResource extends Resource ->columnSpanFull(), Forms\Components\CheckboxList::make('conditions.body_types') ->label(__('Caroserie')) - ->options(\App\Models\Tenant\Vehicle::BODY_TYPES) + ->options(\App\Support\I18n::opts(\App\Models\Tenant\Vehicle::BODY_TYPES)) ->columns(3) ->columnSpanFull(), Forms\Components\CheckboxList::make('conditions.transmissions') ->label(__('Cutie de viteze')) - ->options(\App\Models\Tenant\Vehicle::TRANSMISSION_TYPES) + ->options(\App\Support\I18n::opts(\App\Models\Tenant\Vehicle::TRANSMISSION_TYPES)) ->columns(3) ->columnSpanFull(), Forms\Components\TextInput::make('conditions.age_min')->label(__('Vârstă min (ani)'))->numeric(), diff --git a/lang/en.json b/lang/en.json index 764133b..12c99d5 100644 --- a/lang/en.json +++ b/lang/en.json @@ -35,6 +35,7 @@ "AI: preț recomandat": "AI: recommended price", "AI: recomandări": "AI: recommendations", "AI: sugerează diagnostic": "AI: suggest diagnosis", + "AMT (Robot)": "AMT (Robot)", "API Tokens": "API Tokens", "AUTOCRM_001": "AUTOCRM_001", "AYS...": "AYS...", @@ -479,6 +480,7 @@ "Crescător": "Ascending", "Critic": "Critical", "Cronologic": "Chronologically", + "Crossover": "Crossover", "Cu TVA": "With VAT", "Cu jante": "Cu jante", "Culoare": "Color", @@ -500,7 +502,9 @@ "Când": "When", "Când & unde": "When & where", "DCT": "DCT", + "DCT (Dual-Clutch)": "DCT (Dual-Clutch)", "DOT": "DOT", + "DSG": "DSG", "Da, confirmă": "Yes, confirm", "Da, șterge": "Yes, delete", "Dacă e gol, generăm 10 caractere random.": "If empty, we generate 10 random characters.", @@ -1046,6 +1050,7 @@ "Min qty": "Min qty", "Min.": "Min.", "Minim": "Minim", + "Minivan": "Minivan", "Minute": "Minutes", "Mod": "Mode", "Mod recepție": "Receive mode", @@ -1301,6 +1306,7 @@ "Phone alt": "Alt. phone", "Photo": "Photo", "Photos": "Photos", + "Pickup": "Pickup", "Pierdut": "Lost", "Pierdute": "Pierdute", "Piese": "Parts", diff --git a/lang/ru.json b/lang/ru.json index a1219d5..ed82b8b 100644 --- a/lang/ru.json +++ b/lang/ru.json @@ -35,6 +35,7 @@ "AI: preț recomandat": "AI: рекомендованная цена", "AI: recomandări": "AI: рекомендации", "AI: sugerează diagnostic": "AI: подсказать диагноз", + "AMT (Robot)": "АКПП (Робот)", "API Tokens": "API Tokens", "AUTOCRM_001": "AUTOCRM_001", "AYS...": "AYS...", @@ -479,6 +480,7 @@ "Crescător": "По возрастанию", "Critic": "Критический", "Cronologic": "Хронологически", + "Crossover": "Кроссовер", "Cu TVA": "С НДС", "Cu jante": "Cu jante", "Culoare": "Цвет", @@ -500,7 +502,9 @@ "Când": "Когда", "Când & unde": "Когда и где", "DCT": "DCT", + "DCT (Dual-Clutch)": "DCT (Dual-Clutch)", "DOT": "DOT", + "DSG": "DSG", "Da, confirmă": "Да, подтвердить", "Da, șterge": "Да, удалить", "Dacă e gol, generăm 10 caractere random.": "Если пусто — сгенерируем 10 случайных символов.", @@ -1046,6 +1050,7 @@ "Min qty": "Мин. кол-во", "Min.": "Мин.", "Minim": "Minim", + "Minivan": "Минивэн", "Minute": "Минуты", "Mod": "Режим", "Mod recepție": "Режим приёмки", @@ -1301,6 +1306,7 @@ "Phone alt": "Тел. дополн.", "Photo": "Фото", "Photos": "Фото", + "Pickup": "Пикап", "Pierdut": "Потерян", "Pierdute": "Pierdute", "Piese": "Запчасти",