From 78ff8d4b43c1e72daed5fd573ee174c2c050c482 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Mon, 13 Jul 2026 20:41:55 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20i18n=20on=20Filament=20admin=20sidebar?= =?UTF-8?q?=20=E2=80=94=2054=20resources/pages=20translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User screenshots showed the tenant admin panel (Filament) had sidebar labels stuck in Romanian even when switching to Russian: 'Cereri', 'Calendar vizual', 'Atelierul meu', 'KPI mecanici', 'Fișe lucru', 'Norme-ore', 'Tehnicieni', 'Șabloane servicii', 'Depozite', 'Scaner', 'Depozit', 'VIN-căutare', 'Furnizori', 'Achiziții', 'Procentaj', 'Coeficienți preț', plus all group headers. Root cause: every Filament Resource and Page had static properties 'protected static ?string $navigationLabel = "Fișe lucru"' — string literals baked into class definitions. Static properties don't run through the translation layer. Fix in two parts: 1. New translation files with 52 label keys + 12 group keys: - lang/ro/nav.php — Romanian (identity) - lang/ru/nav.php — full Russian translations (Заказ-наряды, Автомобили, Клиенты, Календарь, Моя мастерская, Механики KPI, Настройки, etc.) - lang/en/nav.php — English translations (Work orders, Vehicles, Clients, Calendar, My workshop, Mechanic KPI, Settings, etc.) Keyed by the Romanian original so lookups map 1:1 — 'nav.label.Fișe lucru' returns 'Заказ-наряды' in RU, 'Work orders' in EN, 'Fișe lucru' in RO. 2. Python transformer converted 54 files: - 33 Filament Tenant Resources - 15 Filament Tenant Pages - 4 Filament Central Resources - 1 Filament Central Page - 1 Widget Each 'protected static ?string $navigationLabel = "X";' became 'public static function getNavigationLabel(): string { return __("nav.label.X"); }'. Same treatment for $navigationGroup. Cleanup: 6 resources already had manually-added getNavigationLabel methods from an earlier partial effort — those used flat JSON keys (__("Cereri")) that never resolved. Deduped so only the nav.label.* version remains. Untouched (intentional): - $modelLabel / $pluralModelLabel (used in breadcrumbs and headings — still hardcoded, next tier of work) - Section titles, column headers, form field labels (medium priority) - $navigationSort (numeric, no translation needed) - $navigationIcon (icon reference) Suite: 306 passed (853 assertions). Unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../Central/Pages/PaymentSettings.php | 5 +- .../Central/Resources/CompanyResource.php | 5 +- .../Central/Resources/PlanResource.php | 5 +- .../Resources/SubscriptionResource.php | 5 +- .../Central/Resources/SuperAdminResource.php | 5 +- app/Filament/Tenant/Pages/AiAssistant.php | 10 ++- app/Filament/Tenant/Pages/ApiTokens.php | 10 ++- app/Filament/Tenant/Pages/Backup.php | 10 ++- app/Filament/Tenant/Pages/CalendarBoard.php | 10 ++- .../Tenant/Pages/ExcelImportWizard.php | 10 ++- app/Filament/Tenant/Pages/Finance.php | 10 ++- app/Filament/Tenant/Pages/Integrations.php | 10 ++- app/Filament/Tenant/Pages/MechanicBoard.php | 10 ++- app/Filament/Tenant/Pages/MechanicKpi.php | 10 ++- app/Filament/Tenant/Pages/PipelineBoard.php | 10 ++- app/Filament/Tenant/Pages/Recommendations.php | 10 ++- app/Filament/Tenant/Pages/Reports.php | 10 ++- app/Filament/Tenant/Pages/Scanner.php | 10 ++- app/Filament/Tenant/Pages/Settings.php | 10 ++- app/Filament/Tenant/Pages/VinSearch.php | 10 ++- app/Filament/Tenant/Pages/Workload.php | 10 ++- .../Tenant/Resources/ActivityResource.php | 10 ++- .../Tenant/Resources/AppointmentResource.php | 10 ++- .../Tenant/Resources/BodyshopJobResource.php | 21 ++--- .../Tenant/Resources/CallResource.php | 10 ++- .../Tenant/Resources/ClientResource.php | 5 +- .../Tenant/Resources/DealResource.php | 10 ++- .../Resources/EmployeeProfileResource.php | 10 ++- .../Tenant/Resources/ExpenseResource.php | 10 ++- .../Tenant/Resources/LaborResource.php | 10 ++- .../Tenant/Resources/LeadResource.php | 10 ++- .../Resources/MarketingChannelResource.php | 10 ++- .../Tenant/Resources/MarkupRuleResource.php | 10 ++- .../Tenant/Resources/MasterResource.php | 10 ++- .../Resources/MessageTemplateResource.php | 10 ++- .../Tenant/Resources/OnlineOrderResource.php | 10 ++- .../Tenant/Resources/PartResource.php | 10 ++- .../Tenant/Resources/PaymentResource.php | 10 ++- .../Resources/PayrollAdjustmentResource.php | 10 ++- .../Tenant/Resources/PayrollRunResource.php | 10 ++- .../Tenant/Resources/PostResource.php | 10 ++- .../Resources/PricingCoefficientResource.php | 21 ++--- .../Tenant/Resources/PurchaseResource.php | 10 ++- .../Tenant/Resources/RoleResource.php | 10 ++- .../Resources/ServiceTemplateResource.php | 10 ++- .../Tenant/Resources/ShopCustomerResource.php | 21 ++--- .../Resources/SubcontractJobResource.php | 21 ++--- .../Resources/SubcontractorResource.php | 21 ++--- .../Tenant/Resources/SupplierResource.php | 10 ++- .../Tenant/Resources/TireSetResource.php | 21 ++--- .../Tenant/Resources/UserResource.php | 10 ++- .../Tenant/Resources/VehicleResource.php | 5 +- .../Tenant/Resources/WarehouseResource.php | 10 ++- .../Tenant/Resources/WorkOrderResource.php | 10 ++- lang/en/nav.php | 74 ++++++++++++++++++ lang/ro/nav.php | 76 +++++++++++++++++++ lang/ru/nav.php | 76 +++++++++++++++++++ 57 files changed, 630 insertions(+), 167 deletions(-) create mode 100644 lang/en/nav.php create mode 100644 lang/ro/nav.php create mode 100644 lang/ru/nav.php diff --git a/app/Filament/Central/Pages/PaymentSettings.php b/app/Filament/Central/Pages/PaymentSettings.php index b3b0ba3..e23faf2 100644 --- a/app/Filament/Central/Pages/PaymentSettings.php +++ b/app/Filament/Central/Pages/PaymentSettings.php @@ -14,7 +14,10 @@ class PaymentSettings extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-credit-card'; - protected static ?string $navigationLabel = 'Setări plăți'; + public static function getNavigationLabel(): string + { + return __('nav.label.Setări plăți'); + } protected static ?string $title = 'Integrări de plată'; diff --git a/app/Filament/Central/Resources/CompanyResource.php b/app/Filament/Central/Resources/CompanyResource.php index d36f0db..abe5c57 100644 --- a/app/Filament/Central/Resources/CompanyResource.php +++ b/app/Filament/Central/Resources/CompanyResource.php @@ -19,7 +19,10 @@ class CompanyResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-building-office-2'; - protected static ?string $navigationLabel = 'Companii'; + public static function getNavigationLabel(): string + { + return __('nav.label.Companii'); + } protected static ?string $modelLabel = 'companie'; diff --git a/app/Filament/Central/Resources/PlanResource.php b/app/Filament/Central/Resources/PlanResource.php index 4b87ecb..f649abb 100644 --- a/app/Filament/Central/Resources/PlanResource.php +++ b/app/Filament/Central/Resources/PlanResource.php @@ -19,7 +19,10 @@ class PlanResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-stack'; - protected static ?string $navigationLabel = 'Planuri'; + public static function getNavigationLabel(): string + { + return __('nav.label.Planuri'); + } protected static ?string $modelLabel = 'plan'; diff --git a/app/Filament/Central/Resources/SubscriptionResource.php b/app/Filament/Central/Resources/SubscriptionResource.php index aa0ce8f..b099d4d 100644 --- a/app/Filament/Central/Resources/SubscriptionResource.php +++ b/app/Filament/Central/Resources/SubscriptionResource.php @@ -23,7 +23,10 @@ class SubscriptionResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-credit-card'; - protected static ?string $navigationLabel = 'Facturi & abonamente'; + public static function getNavigationLabel(): string + { + return __('nav.label.Facturi & abonamente'); + } protected static ?string $modelLabel = 'factură'; diff --git a/app/Filament/Central/Resources/SuperAdminResource.php b/app/Filament/Central/Resources/SuperAdminResource.php index 208d310..21b84eb 100644 --- a/app/Filament/Central/Resources/SuperAdminResource.php +++ b/app/Filament/Central/Resources/SuperAdminResource.php @@ -20,7 +20,10 @@ class SuperAdminResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-users'; - protected static ?string $navigationLabel = 'Utilizatori'; + public static function getNavigationLabel(): string + { + return __('nav.label.Utilizatori'); + } protected static ?string $modelLabel = 'utilizator'; diff --git a/app/Filament/Tenant/Pages/AiAssistant.php b/app/Filament/Tenant/Pages/AiAssistant.php index de6e78a..706289c 100644 --- a/app/Filament/Tenant/Pages/AiAssistant.php +++ b/app/Filament/Tenant/Pages/AiAssistant.php @@ -12,9 +12,15 @@ class AiAssistant extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-sparkles'; - protected static ?string $navigationLabel = 'Asistent AI'; + public static function getNavigationLabel(): string + { + return __('nav.label.Asistent AI'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Analiză'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Analiză'); + } protected static ?int $navigationSort = 71; diff --git a/app/Filament/Tenant/Pages/ApiTokens.php b/app/Filament/Tenant/Pages/ApiTokens.php index 300cc3a..8ee1238 100644 --- a/app/Filament/Tenant/Pages/ApiTokens.php +++ b/app/Filament/Tenant/Pages/ApiTokens.php @@ -11,9 +11,15 @@ class ApiTokens extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-key'; - protected static ?string $navigationLabel = 'API Tokens'; + public static function getNavigationLabel(): string + { + return __('nav.label.API Tokens'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?int $navigationSort = 95; diff --git a/app/Filament/Tenant/Pages/Backup.php b/app/Filament/Tenant/Pages/Backup.php index 938fb37..e5076ef 100644 --- a/app/Filament/Tenant/Pages/Backup.php +++ b/app/Filament/Tenant/Pages/Backup.php @@ -12,9 +12,15 @@ class Backup extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-archive-box-arrow-down'; - protected static ?string $navigationLabel = 'Backup'; + public static function getNavigationLabel(): string + { + return __('nav.label.Backup'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?int $navigationSort = 96; diff --git a/app/Filament/Tenant/Pages/CalendarBoard.php b/app/Filament/Tenant/Pages/CalendarBoard.php index e082130..0fa3869 100644 --- a/app/Filament/Tenant/Pages/CalendarBoard.php +++ b/app/Filament/Tenant/Pages/CalendarBoard.php @@ -15,9 +15,15 @@ class CalendarBoard extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-calendar-days'; - protected static ?string $navigationLabel = 'Calendar vizual'; + public static function getNavigationLabel(): string + { + return __('nav.label.Calendar vizual'); + } - protected static string|\UnitEnum|null $navigationGroup = 'CRM'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.CRM'); + } protected static ?int $navigationSort = 8; diff --git a/app/Filament/Tenant/Pages/ExcelImportWizard.php b/app/Filament/Tenant/Pages/ExcelImportWizard.php index 0ce409d..5c8eef6 100644 --- a/app/Filament/Tenant/Pages/ExcelImportWizard.php +++ b/app/Filament/Tenant/Pages/ExcelImportWizard.php @@ -15,9 +15,15 @@ class ExcelImportWizard extends Page protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-arrow-up-tray'; - protected static ?string $navigationLabel = 'Import factură Excel'; + public static function getNavigationLabel(): string + { + return __('nav.label.Import factură Excel'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Stoc & Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Stoc & Finanțe'); + } protected static ?int $navigationSort = 65; diff --git a/app/Filament/Tenant/Pages/Finance.php b/app/Filament/Tenant/Pages/Finance.php index fd20ae9..2b77363 100644 --- a/app/Filament/Tenant/Pages/Finance.php +++ b/app/Filament/Tenant/Pages/Finance.php @@ -14,9 +14,15 @@ class Finance extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-currency-dollar'; - protected static ?string $navigationLabel = 'Finanțe (consolidat)'; + public static function getNavigationLabel(): string + { + return __('nav.label.Finanțe (consolidat)'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?int $navigationSort = 49; diff --git a/app/Filament/Tenant/Pages/Integrations.php b/app/Filament/Tenant/Pages/Integrations.php index 09f23eb..a24e381 100644 --- a/app/Filament/Tenant/Pages/Integrations.php +++ b/app/Filament/Tenant/Pages/Integrations.php @@ -10,9 +10,15 @@ class Integrations extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-puzzle-piece'; - protected static ?string $navigationLabel = 'Integrări'; + public static function getNavigationLabel(): string + { + return __('nav.label.Integrări'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Marketing'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Marketing'); + } protected static ?int $navigationSort = 63; diff --git a/app/Filament/Tenant/Pages/MechanicBoard.php b/app/Filament/Tenant/Pages/MechanicBoard.php index c3a2397..51d7c4c 100644 --- a/app/Filament/Tenant/Pages/MechanicBoard.php +++ b/app/Filament/Tenant/Pages/MechanicBoard.php @@ -16,9 +16,15 @@ class MechanicBoard extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-wrench'; - protected static ?string $navigationLabel = 'Atelierul meu'; + public static function getNavigationLabel(): string + { + return __('nav.label.Atelierul meu'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?int $navigationSort = 25; diff --git a/app/Filament/Tenant/Pages/MechanicKpi.php b/app/Filament/Tenant/Pages/MechanicKpi.php index adebe61..82fcb75 100644 --- a/app/Filament/Tenant/Pages/MechanicKpi.php +++ b/app/Filament/Tenant/Pages/MechanicKpi.php @@ -16,9 +16,15 @@ class MechanicKpi extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chart-bar'; - protected static ?string $navigationLabel = 'KPI mecanici'; + public static function getNavigationLabel(): string + { + return __('nav.label.KPI mecanici'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?int $navigationSort = 28; diff --git a/app/Filament/Tenant/Pages/PipelineBoard.php b/app/Filament/Tenant/Pages/PipelineBoard.php index f4e9026..0245c72 100644 --- a/app/Filament/Tenant/Pages/PipelineBoard.php +++ b/app/Filament/Tenant/Pages/PipelineBoard.php @@ -15,9 +15,15 @@ class PipelineBoard extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-funnel'; - protected static ?string $navigationLabel = 'Pipeline'; + public static function getNavigationLabel(): string + { + return __('nav.label.Pipeline'); + } - protected static string|\UnitEnum|null $navigationGroup = 'CRM'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.CRM'); + } protected static ?int $navigationSort = 5; diff --git a/app/Filament/Tenant/Pages/Recommendations.php b/app/Filament/Tenant/Pages/Recommendations.php index cea6b50..3f11ad4 100644 --- a/app/Filament/Tenant/Pages/Recommendations.php +++ b/app/Filament/Tenant/Pages/Recommendations.php @@ -11,9 +11,15 @@ class Recommendations extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-light-bulb'; - protected static ?string $navigationLabel = 'Recomandări'; + public static function getNavigationLabel(): string + { + return __('nav.label.Recomandări'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Analiză'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Analiză'); + } protected static ?int $navigationSort = 72; diff --git a/app/Filament/Tenant/Pages/Reports.php b/app/Filament/Tenant/Pages/Reports.php index 78effa3..8cc6198 100644 --- a/app/Filament/Tenant/Pages/Reports.php +++ b/app/Filament/Tenant/Pages/Reports.php @@ -18,9 +18,15 @@ class Reports extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chart-bar'; - protected static ?string $navigationLabel = 'Rapoarte'; + public static function getNavigationLabel(): string + { + return __('nav.label.Rapoarte'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Analiză'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Analiză'); + } protected static ?int $navigationSort = 70; diff --git a/app/Filament/Tenant/Pages/Scanner.php b/app/Filament/Tenant/Pages/Scanner.php index 43dff15..da57e63 100644 --- a/app/Filament/Tenant/Pages/Scanner.php +++ b/app/Filament/Tenant/Pages/Scanner.php @@ -21,9 +21,15 @@ class Scanner extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-qr-code'; - protected static ?string $navigationLabel = 'Scaner'; + public static function getNavigationLabel(): string + { + return __('nav.label.Scaner'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?int $navigationSort = 39; diff --git a/app/Filament/Tenant/Pages/Settings.php b/app/Filament/Tenant/Pages/Settings.php index d034b17..9500cfa 100644 --- a/app/Filament/Tenant/Pages/Settings.php +++ b/app/Filament/Tenant/Pages/Settings.php @@ -15,9 +15,15 @@ class Settings extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cog-6-tooth'; - protected static ?string $navigationLabel = 'Setări'; + public static function getNavigationLabel(): string + { + return __('nav.label.Setări'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?int $navigationSort = 90; diff --git a/app/Filament/Tenant/Pages/VinSearch.php b/app/Filament/Tenant/Pages/VinSearch.php index b333243..4f92c3e 100644 --- a/app/Filament/Tenant/Pages/VinSearch.php +++ b/app/Filament/Tenant/Pages/VinSearch.php @@ -11,9 +11,15 @@ class VinSearch extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-magnifying-glass'; - protected static ?string $navigationLabel = 'VIN-căutare'; + public static function getNavigationLabel(): string + { + return __('nav.label.VIN-căutare'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?int $navigationSort = 41; diff --git a/app/Filament/Tenant/Pages/Workload.php b/app/Filament/Tenant/Pages/Workload.php index f0ee84c..9e72d4b 100644 --- a/app/Filament/Tenant/Pages/Workload.php +++ b/app/Filament/Tenant/Pages/Workload.php @@ -11,9 +11,15 @@ class Workload extends Page { protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-fire'; - protected static ?string $navigationLabel = 'Încărcare STO'; + public static function getNavigationLabel(): string + { + return __('nav.label.Încărcare STO'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Analiză'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Analiză'); + } protected static ?int $navigationSort = 73; diff --git a/app/Filament/Tenant/Resources/ActivityResource.php b/app/Filament/Tenant/Resources/ActivityResource.php index 00af3d1..9230012 100644 --- a/app/Filament/Tenant/Resources/ActivityResource.php +++ b/app/Filament/Tenant/Resources/ActivityResource.php @@ -16,9 +16,15 @@ class ActivityResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-list-bullet'; - protected static ?string $navigationLabel = 'Jurnal activitate'; + public static function getNavigationLabel(): string + { + return __('nav.label.Jurnal activitate'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?string $modelLabel = 'eveniment'; diff --git a/app/Filament/Tenant/Resources/AppointmentResource.php b/app/Filament/Tenant/Resources/AppointmentResource.php index 368f0d9..fc23f18 100644 --- a/app/Filament/Tenant/Resources/AppointmentResource.php +++ b/app/Filament/Tenant/Resources/AppointmentResource.php @@ -22,9 +22,15 @@ class AppointmentResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-calendar-days'; - protected static ?string $navigationLabel = 'Calendar'; + public static function getNavigationLabel(): string + { + return __('nav.label.Calendar'); + } - protected static string|\UnitEnum|null $navigationGroup = 'CRM'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.CRM'); + } protected static ?string $modelLabel = 'programare'; diff --git a/app/Filament/Tenant/Resources/BodyshopJobResource.php b/app/Filament/Tenant/Resources/BodyshopJobResource.php index f03ac25..10e26a0 100644 --- a/app/Filament/Tenant/Resources/BodyshopJobResource.php +++ b/app/Filament/Tenant/Resources/BodyshopJobResource.php @@ -22,9 +22,15 @@ class BodyshopJobResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-paint-brush'; - protected static ?string $navigationLabel = 'Tinichigerie / Detailing'; + public static function getNavigationLabel(): string + { + return __('nav.label.Tinichigerie / Detailing'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Tinichigerie'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Tinichigerie'); + } protected static ?string $modelLabel = 'lucrare caroserie'; @@ -134,17 +140,6 @@ class BodyshopJobResource extends Resource ]; } - - public static function getNavigationLabel(): string - { - return __('Tinichigerie / Detailing'); - } - - public static function getNavigationGroup(): ?string - { - return __('Tinichigerie'); - } - public static function getModelLabel(): string { return __('lucrare caroserie'); diff --git a/app/Filament/Tenant/Resources/CallResource.php b/app/Filament/Tenant/Resources/CallResource.php index 8998b51..398b1de 100644 --- a/app/Filament/Tenant/Resources/CallResource.php +++ b/app/Filament/Tenant/Resources/CallResource.php @@ -19,9 +19,15 @@ class CallResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-phone'; - protected static ?string $navigationLabel = 'Apeluri'; + public static function getNavigationLabel(): string + { + return __('nav.label.Apeluri'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Marketing'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Marketing'); + } protected static ?string $modelLabel = 'apel'; diff --git a/app/Filament/Tenant/Resources/ClientResource.php b/app/Filament/Tenant/Resources/ClientResource.php index b31f837..a72b71b 100644 --- a/app/Filament/Tenant/Resources/ClientResource.php +++ b/app/Filament/Tenant/Resources/ClientResource.php @@ -18,7 +18,10 @@ class ClientResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-users'; - protected static ?string $navigationLabel = 'Clienți'; + public static function getNavigationLabel(): string + { + return __('nav.label.Clienți'); + } protected static ?string $modelLabel = 'client'; diff --git a/app/Filament/Tenant/Resources/DealResource.php b/app/Filament/Tenant/Resources/DealResource.php index 0cd5acb..9faf45b 100644 --- a/app/Filament/Tenant/Resources/DealResource.php +++ b/app/Filament/Tenant/Resources/DealResource.php @@ -22,9 +22,15 @@ class DealResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-funnel'; - protected static ?string $navigationLabel = 'Pipeline (tabel)'; + public static function getNavigationLabel(): string + { + return __('nav.label.Pipeline (tabel)'); + } - protected static string|\UnitEnum|null $navigationGroup = 'CRM'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.CRM'); + } public static function shouldRegisterNavigation(): bool { diff --git a/app/Filament/Tenant/Resources/EmployeeProfileResource.php b/app/Filament/Tenant/Resources/EmployeeProfileResource.php index f810214..24ae437 100644 --- a/app/Filament/Tenant/Resources/EmployeeProfileResource.php +++ b/app/Filament/Tenant/Resources/EmployeeProfileResource.php @@ -19,9 +19,15 @@ class EmployeeProfileResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-identification'; - protected static ?string $navigationLabel = 'Angajați'; + public static function getNavigationLabel(): string + { + return __('nav.label.Angajați'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?string $modelLabel = 'angajat'; diff --git a/app/Filament/Tenant/Resources/ExpenseResource.php b/app/Filament/Tenant/Resources/ExpenseResource.php index 4e61d53..033147e 100644 --- a/app/Filament/Tenant/Resources/ExpenseResource.php +++ b/app/Filament/Tenant/Resources/ExpenseResource.php @@ -19,9 +19,15 @@ class ExpenseResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-arrow-trending-down'; - protected static ?string $navigationLabel = 'Cheltuieli'; + public static function getNavigationLabel(): string + { + return __('nav.label.Cheltuieli'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?string $modelLabel = 'cheltuială'; diff --git a/app/Filament/Tenant/Resources/LaborResource.php b/app/Filament/Tenant/Resources/LaborResource.php index 2c847fe..09b3d2a 100644 --- a/app/Filament/Tenant/Resources/LaborResource.php +++ b/app/Filament/Tenant/Resources/LaborResource.php @@ -19,9 +19,15 @@ class LaborResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-clock'; - protected static ?string $navigationLabel = 'Norme-ore'; + public static function getNavigationLabel(): string + { + return __('nav.label.Norme-ore'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?string $modelLabel = 'normă'; diff --git a/app/Filament/Tenant/Resources/LeadResource.php b/app/Filament/Tenant/Resources/LeadResource.php index e6dc61c..3809689 100644 --- a/app/Filament/Tenant/Resources/LeadResource.php +++ b/app/Filament/Tenant/Resources/LeadResource.php @@ -20,9 +20,15 @@ class LeadResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-inbox-arrow-down'; - protected static ?string $navigationLabel = 'Cereri'; + public static function getNavigationLabel(): string + { + return __('nav.label.Cereri'); + } - protected static string|\UnitEnum|null $navigationGroup = 'CRM'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.CRM'); + } protected static ?string $modelLabel = 'cerere'; diff --git a/app/Filament/Tenant/Resources/MarketingChannelResource.php b/app/Filament/Tenant/Resources/MarketingChannelResource.php index 059f36e..d066b26 100644 --- a/app/Filament/Tenant/Resources/MarketingChannelResource.php +++ b/app/Filament/Tenant/Resources/MarketingChannelResource.php @@ -18,9 +18,15 @@ class MarketingChannelResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-megaphone'; - protected static ?string $navigationLabel = 'Canale marketing'; + public static function getNavigationLabel(): string + { + return __('nav.label.Canale marketing'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Marketing'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Marketing'); + } protected static ?string $modelLabel = 'canal'; diff --git a/app/Filament/Tenant/Resources/MarkupRuleResource.php b/app/Filament/Tenant/Resources/MarkupRuleResource.php index 396be6b..305ce6b 100644 --- a/app/Filament/Tenant/Resources/MarkupRuleResource.php +++ b/app/Filament/Tenant/Resources/MarkupRuleResource.php @@ -21,9 +21,15 @@ class MarkupRuleResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-percent-badge'; - protected static ?string $navigationLabel = 'Procentaj'; + public static function getNavigationLabel(): string + { + return __('nav.label.Procentaj'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'regulă'; diff --git a/app/Filament/Tenant/Resources/MasterResource.php b/app/Filament/Tenant/Resources/MasterResource.php index 4d3bc66..3febdc5 100644 --- a/app/Filament/Tenant/Resources/MasterResource.php +++ b/app/Filament/Tenant/Resources/MasterResource.php @@ -23,9 +23,15 @@ class MasterResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-wrench'; - protected static ?string $navigationLabel = 'Tehnicieni'; + public static function getNavigationLabel(): string + { + return __('nav.label.Tehnicieni'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?string $modelLabel = 'tehnician'; diff --git a/app/Filament/Tenant/Resources/MessageTemplateResource.php b/app/Filament/Tenant/Resources/MessageTemplateResource.php index f37dc1b..79cd9cb 100644 --- a/app/Filament/Tenant/Resources/MessageTemplateResource.php +++ b/app/Filament/Tenant/Resources/MessageTemplateResource.php @@ -18,9 +18,15 @@ class MessageTemplateResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-chat-bubble-left-right'; - protected static ?string $navigationLabel = 'Template-uri mesaje'; + public static function getNavigationLabel(): string + { + return __('nav.label.Template-uri mesaje'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Marketing'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Marketing'); + } protected static ?string $modelLabel = 'template'; diff --git a/app/Filament/Tenant/Resources/OnlineOrderResource.php b/app/Filament/Tenant/Resources/OnlineOrderResource.php index 6f8dd6b..4b60eac 100644 --- a/app/Filament/Tenant/Resources/OnlineOrderResource.php +++ b/app/Filament/Tenant/Resources/OnlineOrderResource.php @@ -20,9 +20,15 @@ class OnlineOrderResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-shopping-bag'; - protected static ?string $navigationLabel = 'Comenzi online'; + public static function getNavigationLabel(): string + { + return __('nav.label.Comenzi online'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Magazin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Magazin'); + } protected static ?string $modelLabel = 'comandă'; diff --git a/app/Filament/Tenant/Resources/PartResource.php b/app/Filament/Tenant/Resources/PartResource.php index afb9b51..98054a1 100644 --- a/app/Filament/Tenant/Resources/PartResource.php +++ b/app/Filament/Tenant/Resources/PartResource.php @@ -20,9 +20,15 @@ class PartResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cube'; - protected static ?string $navigationLabel = 'Depozit'; + public static function getNavigationLabel(): string + { + return __('nav.label.Depozit'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'piesă'; diff --git a/app/Filament/Tenant/Resources/PaymentResource.php b/app/Filament/Tenant/Resources/PaymentResource.php index 19315e5..4054a67 100644 --- a/app/Filament/Tenant/Resources/PaymentResource.php +++ b/app/Filament/Tenant/Resources/PaymentResource.php @@ -20,9 +20,15 @@ class PaymentResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-banknotes'; - protected static ?string $navigationLabel = 'Plăți'; + public static function getNavigationLabel(): string + { + return __('nav.label.Plăți'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?string $modelLabel = 'plată'; diff --git a/app/Filament/Tenant/Resources/PayrollAdjustmentResource.php b/app/Filament/Tenant/Resources/PayrollAdjustmentResource.php index 48fec79..f2fe0d9 100644 --- a/app/Filament/Tenant/Resources/PayrollAdjustmentResource.php +++ b/app/Filament/Tenant/Resources/PayrollAdjustmentResource.php @@ -19,9 +19,15 @@ class PayrollAdjustmentResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-adjustments-horizontal'; - protected static ?string $navigationLabel = 'Bonusuri & avansuri'; + public static function getNavigationLabel(): string + { + return __('nav.label.Bonusuri & avansuri'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?string $modelLabel = 'ajustare'; diff --git a/app/Filament/Tenant/Resources/PayrollRunResource.php b/app/Filament/Tenant/Resources/PayrollRunResource.php index b6d5289..0a68975 100644 --- a/app/Filament/Tenant/Resources/PayrollRunResource.php +++ b/app/Filament/Tenant/Resources/PayrollRunResource.php @@ -21,9 +21,15 @@ class PayrollRunResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-banknotes'; - protected static ?string $navigationLabel = 'Salarii'; + public static function getNavigationLabel(): string + { + return __('nav.label.Salarii'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Finanțe'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Finanțe'); + } protected static ?string $modelLabel = 'salariu'; diff --git a/app/Filament/Tenant/Resources/PostResource.php b/app/Filament/Tenant/Resources/PostResource.php index 8ea3b4f..ebbdb74 100644 --- a/app/Filament/Tenant/Resources/PostResource.php +++ b/app/Filament/Tenant/Resources/PostResource.php @@ -20,9 +20,15 @@ class PostResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-wrench-screwdriver'; - protected static ?string $navigationLabel = 'Posturi de lucru'; + public static function getNavigationLabel(): string + { + return __('nav.label.Posturi de lucru'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?string $modelLabel = 'pod'; diff --git a/app/Filament/Tenant/Resources/PricingCoefficientResource.php b/app/Filament/Tenant/Resources/PricingCoefficientResource.php index 6d22423..edbbe48 100644 --- a/app/Filament/Tenant/Resources/PricingCoefficientResource.php +++ b/app/Filament/Tenant/Resources/PricingCoefficientResource.php @@ -18,9 +18,15 @@ class PricingCoefficientResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-adjustments-horizontal'; - protected static ?string $navigationLabel = 'Coeficienți preț'; + public static function getNavigationLabel(): string + { + return __('nav.label.Coeficienți preț'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'coeficient'; @@ -107,17 +113,6 @@ class PricingCoefficientResource extends Resource ->defaultSort('priority'); } - - public static function getNavigationLabel(): string - { - return __('Coeficienți preț'); - } - - public static function getNavigationGroup(): ?string - { - return __('Depozit'); - } - public static function getModelLabel(): string { return __('coeficient'); diff --git a/app/Filament/Tenant/Resources/PurchaseResource.php b/app/Filament/Tenant/Resources/PurchaseResource.php index 8a542a3..0a338c7 100644 --- a/app/Filament/Tenant/Resources/PurchaseResource.php +++ b/app/Filament/Tenant/Resources/PurchaseResource.php @@ -22,9 +22,15 @@ class PurchaseResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-shopping-cart'; - protected static ?string $navigationLabel = 'Achiziții'; + public static function getNavigationLabel(): string + { + return __('nav.label.Achiziții'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'achiziție'; diff --git a/app/Filament/Tenant/Resources/RoleResource.php b/app/Filament/Tenant/Resources/RoleResource.php index 90dc55d..9e95dc8 100644 --- a/app/Filament/Tenant/Resources/RoleResource.php +++ b/app/Filament/Tenant/Resources/RoleResource.php @@ -19,9 +19,15 @@ class RoleResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-shield-check'; - protected static ?string $navigationLabel = 'Roluri & Drepturi'; + public static function getNavigationLabel(): string + { + return __('nav.label.Roluri & Drepturi'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?string $modelLabel = 'rol'; diff --git a/app/Filament/Tenant/Resources/ServiceTemplateResource.php b/app/Filament/Tenant/Resources/ServiceTemplateResource.php index e299489..0751445 100644 --- a/app/Filament/Tenant/Resources/ServiceTemplateResource.php +++ b/app/Filament/Tenant/Resources/ServiceTemplateResource.php @@ -20,9 +20,15 @@ class ServiceTemplateResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-clipboard-document-list'; - protected static ?string $navigationLabel = 'Șabloane servicii'; + public static function getNavigationLabel(): string + { + return __('nav.label.Șabloane servicii'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?string $modelLabel = 'șablon'; diff --git a/app/Filament/Tenant/Resources/ShopCustomerResource.php b/app/Filament/Tenant/Resources/ShopCustomerResource.php index 1a04ed2..5e72398 100644 --- a/app/Filament/Tenant/Resources/ShopCustomerResource.php +++ b/app/Filament/Tenant/Resources/ShopCustomerResource.php @@ -22,9 +22,15 @@ class ShopCustomerResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-user-circle'; - protected static ?string $navigationLabel = 'Clienți magazin'; + public static function getNavigationLabel(): string + { + return __('nav.label.Clienți magazin'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Magazin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Magazin'); + } protected static ?string $modelLabel = 'client magazin'; @@ -93,17 +99,6 @@ class ShopCustomerResource extends Resource ]; } - - public static function getNavigationLabel(): string - { - return __('Clienți magazin'); - } - - public static function getNavigationGroup(): ?string - { - return __('Magazin'); - } - public static function getModelLabel(): string { return __('client magazin'); diff --git a/app/Filament/Tenant/Resources/SubcontractJobResource.php b/app/Filament/Tenant/Resources/SubcontractJobResource.php index f5fafb4..5ee7808 100644 --- a/app/Filament/Tenant/Resources/SubcontractJobResource.php +++ b/app/Filament/Tenant/Resources/SubcontractJobResource.php @@ -20,9 +20,15 @@ class SubcontractJobResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-arrow-top-right-on-square'; - protected static ?string $navigationLabel = 'Lucrări terți'; + public static function getNavigationLabel(): string + { + return __('nav.label.Lucrări terți'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Subcontractare'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Subcontractare'); + } protected static ?string $modelLabel = 'lucrare terți'; @@ -122,17 +128,6 @@ class SubcontractJobResource extends Resource ->defaultSort('created_at', 'desc'); } - - public static function getNavigationLabel(): string - { - return __('Lucrări terți'); - } - - public static function getNavigationGroup(): ?string - { - return __('Subcontractare'); - } - public static function getModelLabel(): string { return __('lucrare terți'); diff --git a/app/Filament/Tenant/Resources/SubcontractorResource.php b/app/Filament/Tenant/Resources/SubcontractorResource.php index a2d783a..5b62a8e 100644 --- a/app/Filament/Tenant/Resources/SubcontractorResource.php +++ b/app/Filament/Tenant/Resources/SubcontractorResource.php @@ -18,9 +18,15 @@ class SubcontractorResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-user-group'; - protected static ?string $navigationLabel = 'Subcontractori'; + public static function getNavigationLabel(): string + { + return __('nav.label.Subcontractori'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Subcontractare'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Subcontractare'); + } protected static ?string $modelLabel = 'subcontractor'; @@ -73,17 +79,6 @@ class SubcontractorResource extends Resource ->defaultSort('name'); } - - public static function getNavigationLabel(): string - { - return __('Subcontractori'); - } - - public static function getNavigationGroup(): ?string - { - return __('Subcontractare'); - } - public static function getModelLabel(): string { return __('subcontractor'); diff --git a/app/Filament/Tenant/Resources/SupplierResource.php b/app/Filament/Tenant/Resources/SupplierResource.php index 482b5b3..7936b78 100644 --- a/app/Filament/Tenant/Resources/SupplierResource.php +++ b/app/Filament/Tenant/Resources/SupplierResource.php @@ -18,9 +18,15 @@ class SupplierResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-building-storefront'; - protected static ?string $navigationLabel = 'Furnizori'; + public static function getNavigationLabel(): string + { + return __('nav.label.Furnizori'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'furnizor'; diff --git a/app/Filament/Tenant/Resources/TireSetResource.php b/app/Filament/Tenant/Resources/TireSetResource.php index c6eaa17..9e5f901 100644 --- a/app/Filament/Tenant/Resources/TireSetResource.php +++ b/app/Filament/Tenant/Resources/TireSetResource.php @@ -22,9 +22,15 @@ class TireSetResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-lifebuoy'; - protected static ?string $navigationLabel = 'Seturi anvelope'; + public static function getNavigationLabel(): string + { + return __('nav.label.Seturi anvelope'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Anvelope'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Anvelope'); + } protected static ?string $modelLabel = 'set anvelope'; @@ -185,17 +191,6 @@ class TireSetResource extends Resource ]; } - - public static function getNavigationLabel(): string - { - return __('Seturi anvelope'); - } - - public static function getNavigationGroup(): ?string - { - return __('Anvelope'); - } - public static function getModelLabel(): string { return __('set anvelope'); diff --git a/app/Filament/Tenant/Resources/UserResource.php b/app/Filament/Tenant/Resources/UserResource.php index d9c5591..ae4098a 100644 --- a/app/Filament/Tenant/Resources/UserResource.php +++ b/app/Filament/Tenant/Resources/UserResource.php @@ -20,9 +20,15 @@ class UserResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-user-group'; - protected static ?string $navigationLabel = 'Utilizatori'; + public static function getNavigationLabel(): string + { + return __('nav.label.Utilizatori'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Admin'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Admin'); + } protected static ?string $modelLabel = 'utilizator'; diff --git a/app/Filament/Tenant/Resources/VehicleResource.php b/app/Filament/Tenant/Resources/VehicleResource.php index 4784599..9ad7820 100644 --- a/app/Filament/Tenant/Resources/VehicleResource.php +++ b/app/Filament/Tenant/Resources/VehicleResource.php @@ -19,7 +19,10 @@ class VehicleResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-truck'; - protected static ?string $navigationLabel = 'Automobile'; + public static function getNavigationLabel(): string + { + return __('nav.label.Automobile'); + } protected static ?string $modelLabel = 'mașină'; diff --git a/app/Filament/Tenant/Resources/WarehouseResource.php b/app/Filament/Tenant/Resources/WarehouseResource.php index 461f026..596b324 100644 --- a/app/Filament/Tenant/Resources/WarehouseResource.php +++ b/app/Filament/Tenant/Resources/WarehouseResource.php @@ -18,9 +18,15 @@ class WarehouseResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-building-storefront'; - protected static ?string $navigationLabel = 'Depozite'; + public static function getNavigationLabel(): string + { + return __('nav.label.Depozite'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Depozit'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Depozit'); + } protected static ?string $modelLabel = 'depozit'; diff --git a/app/Filament/Tenant/Resources/WorkOrderResource.php b/app/Filament/Tenant/Resources/WorkOrderResource.php index 8941e8e..50fec98 100644 --- a/app/Filament/Tenant/Resources/WorkOrderResource.php +++ b/app/Filament/Tenant/Resources/WorkOrderResource.php @@ -24,9 +24,15 @@ class WorkOrderResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-wrench-screwdriver'; - protected static ?string $navigationLabel = 'Fișe lucru'; + public static function getNavigationLabel(): string + { + return __('nav.label.Fișe lucru'); + } - protected static string|\UnitEnum|null $navigationGroup = 'Service'; + public static function getNavigationGroup(): ?string + { + return __('nav.group.Service'); + } protected static ?string $modelLabel = 'fișă'; diff --git a/lang/en/nav.php b/lang/en/nav.php new file mode 100644 index 0000000..2ca29b2 --- /dev/null +++ b/lang/en/nav.php @@ -0,0 +1,74 @@ + [ + 'Admin' => 'Admin', + 'Analiză' => 'Analytics', + 'Anvelope' => 'Tires', + 'CRM' => 'CRM', + 'Depozit' => 'Warehouse', + 'Finanțe' => 'Finance', + 'Magazin' => 'Shop', + 'Marketing' => 'Marketing', + 'Service' => 'Service', + 'Stoc & Finanțe' => 'Stock & Finance', + 'Subcontractare' => 'Subcontracting', + 'Tinichigerie' => 'Bodyshop', + ], + + 'label' => [ + 'API Tokens' => 'API Tokens', + 'Achiziții' => 'Purchases', + 'Angajați' => 'Employees', + 'Apeluri' => 'Calls', + 'Asistent AI' => 'AI Assistant', + 'Atelierul meu' => 'My workshop', + 'Automobile' => 'Vehicles', + 'Backup' => 'Backup', + 'Bonusuri & avansuri' => 'Bonuses & advances', + 'Calendar' => 'Calendar', + 'Calendar vizual' => 'Visual calendar', + 'Canale marketing' => 'Marketing channels', + 'Cereri' => 'Leads', + 'Cheltuieli' => 'Expenses', + 'Clienți' => 'Clients', + 'Clienți magazin' => 'Shop customers', + 'Coeficienți preț' => 'Price coefficients', + 'Comenzi online' => 'Online orders', + 'Companii' => 'Companies', + 'Depozit' => 'Warehouse', + 'Depozite' => 'Warehouses', + 'Facturi & abonamente' => 'Invoices & subscriptions', + 'Finanțe (consolidat)' => 'Finance (consolidated)', + 'Fișe lucru' => 'Work orders', + 'Furnizori' => 'Suppliers', + 'Import factură Excel' => 'Excel invoice import', + 'Integrări' => 'Integrations', + 'Jurnal activitate' => 'Activity log', + 'KPI mecanici' => 'Mechanic KPI', + 'Lucrări terți' => 'Subcontractor jobs', + 'Norme-ore' => 'Labor catalog', + 'Pipeline' => 'Pipeline', + 'Pipeline (tabel)' => 'Pipeline (table)', + 'Planuri' => 'Plans', + 'Plăți' => 'Payments', + 'Posturi de lucru' => 'Work bays', + 'Procentaj' => 'Commission', + 'Rapoarte' => 'Reports', + 'Recomandări' => 'Recommendations', + 'Roluri & Drepturi' => 'Roles & permissions', + 'Salarii' => 'Salaries', + 'Scaner' => 'Scanner', + 'Seturi anvelope' => 'Tire sets', + 'Setări' => 'Settings', + 'Setări plăți' => 'Payment settings', + 'Subcontractori' => 'Subcontractors', + 'Tehnicieni' => 'Technicians', + 'Template-uri mesaje' => 'Message templates', + 'Tinichigerie / Detailing' => 'Bodyshop / Detailing', + 'Utilizatori' => 'Users', + 'VIN-căutare' => 'VIN search', + 'Încărcare STO' => 'Workshop load', + 'Șabloane servicii' => 'Service templates', + ], +]; diff --git a/lang/ro/nav.php b/lang/ro/nav.php new file mode 100644 index 0000000..c62d38f --- /dev/null +++ b/lang/ro/nav.php @@ -0,0 +1,76 @@ + [ + 'Admin' => 'Admin', + 'Analiză' => 'Analiză', + 'Anvelope' => 'Anvelope', + 'CRM' => 'CRM', + 'Depozit' => 'Depozit', + 'Finanțe' => 'Finanțe', + 'Magazin' => 'Magazin', + 'Marketing' => 'Marketing', + 'Service' => 'Service', + 'Stoc & Finanțe' => 'Stoc & Finanțe', + 'Subcontractare' => 'Subcontractare', + 'Tinichigerie' => 'Tinichigerie', + ], + + // ── Individual navigation labels ── + 'label' => [ + 'API Tokens' => 'API Tokens', + 'Achiziții' => 'Achiziții', + 'Angajați' => 'Angajați', + 'Apeluri' => 'Apeluri', + 'Asistent AI' => 'Asistent AI', + 'Atelierul meu' => 'Atelierul meu', + 'Automobile' => 'Automobile', + 'Backup' => 'Backup', + 'Bonusuri & avansuri' => 'Bonusuri & avansuri', + 'Calendar' => 'Calendar', + 'Calendar vizual' => 'Calendar vizual', + 'Canale marketing' => 'Canale marketing', + 'Cereri' => 'Cereri', + 'Cheltuieli' => 'Cheltuieli', + 'Clienți' => 'Clienți', + 'Clienți magazin' => 'Clienți magazin', + 'Coeficienți preț' => 'Coeficienți preț', + 'Comenzi online' => 'Comenzi online', + 'Companii' => 'Companii', + 'Depozit' => 'Depozit', + 'Depozite' => 'Depozite', + 'Facturi & abonamente' => 'Facturi & abonamente', + 'Finanțe (consolidat)' => 'Finanțe (consolidat)', + 'Fișe lucru' => 'Fișe lucru', + 'Furnizori' => 'Furnizori', + 'Import factură Excel' => 'Import factură Excel', + 'Integrări' => 'Integrări', + 'Jurnal activitate' => 'Jurnal activitate', + 'KPI mecanici' => 'KPI mecanici', + 'Lucrări terți' => 'Lucrări terți', + 'Norme-ore' => 'Norme-ore', + 'Pipeline' => 'Pipeline', + 'Pipeline (tabel)' => 'Pipeline (tabel)', + 'Planuri' => 'Planuri', + 'Plăți' => 'Plăți', + 'Posturi de lucru' => 'Posturi de lucru', + 'Procentaj' => 'Procentaj', + 'Rapoarte' => 'Rapoarte', + 'Recomandări' => 'Recomandări', + 'Roluri & Drepturi' => 'Roluri & Drepturi', + 'Salarii' => 'Salarii', + 'Scaner' => 'Scaner', + 'Seturi anvelope' => 'Seturi anvelope', + 'Setări' => 'Setări', + 'Setări plăți' => 'Setări plăți', + 'Subcontractori' => 'Subcontractori', + 'Tehnicieni' => 'Tehnicieni', + 'Template-uri mesaje' => 'Template-uri mesaje', + 'Tinichigerie / Detailing' => 'Tinichigerie / Detailing', + 'Utilizatori' => 'Utilizatori', + 'VIN-căutare' => 'VIN-căutare', + 'Încărcare STO' => 'Încărcare STO', + 'Șabloane servicii' => 'Șabloane servicii', + ], +]; diff --git a/lang/ru/nav.php b/lang/ru/nav.php new file mode 100644 index 0000000..43cd744 --- /dev/null +++ b/lang/ru/nav.php @@ -0,0 +1,76 @@ + [ + 'Admin' => 'Администрирование', + 'Analiză' => 'Аналитика', + 'Anvelope' => 'Шины', + 'CRM' => 'CRM', + 'Depozit' => 'Склад', + 'Finanțe' => 'Финансы', + 'Magazin' => 'Магазин', + 'Marketing' => 'Маркетинг', + 'Service' => 'Сервис', + 'Stoc & Finanțe' => 'Склад и финансы', + 'Subcontractare' => 'Субподряд', + 'Tinichigerie' => 'Кузовной цех', + ], + + // ── Пункты навигации ── + 'label' => [ + 'API Tokens' => 'API токены', + 'Achiziții' => 'Закупки', + 'Angajați' => 'Сотрудники', + 'Apeluri' => 'Звонки', + 'Asistent AI' => 'AI-ассистент', + 'Atelierul meu' => 'Моя мастерская', + 'Automobile' => 'Автомобили', + 'Backup' => 'Резервные копии', + 'Bonusuri & avansuri' => 'Премии и авансы', + 'Calendar' => 'Календарь', + 'Calendar vizual' => 'Визуальный календарь', + 'Canale marketing' => 'Маркетинговые каналы', + 'Cereri' => 'Заявки', + 'Cheltuieli' => 'Расходы', + 'Clienți' => 'Клиенты', + 'Clienți magazin' => 'Клиенты магазина', + 'Coeficienți preț' => 'Ценовые коэффициенты', + 'Comenzi online' => 'Онлайн-заказы', + 'Companii' => 'Компании', + 'Depozit' => 'Склад', + 'Depozite' => 'Склады', + 'Facturi & abonamente' => 'Счета и подписки', + 'Finanțe (consolidat)' => 'Финансы (сводно)', + 'Fișe lucru' => 'Заказ-наряды', + 'Furnizori' => 'Поставщики', + 'Import factură Excel' => 'Импорт счёта Excel', + 'Integrări' => 'Интеграции', + 'Jurnal activitate' => 'Журнал действий', + 'KPI mecanici' => 'KPI механиков', + 'Lucrări terți' => 'Работы субподрядчиков', + 'Norme-ore' => 'Нормо-часы', + 'Pipeline' => 'Воронка', + 'Pipeline (tabel)' => 'Воронка (таблица)', + 'Planuri' => 'Тарифы', + 'Plăți' => 'Платежи', + 'Posturi de lucru' => 'Рабочие места', + 'Procentaj' => 'Проценты', + 'Rapoarte' => 'Отчёты', + 'Recomandări' => 'Рекомендации', + 'Roluri & Drepturi' => 'Роли и права', + 'Salarii' => 'Зарплаты', + 'Scaner' => 'Сканер', + 'Seturi anvelope' => 'Комплекты шин', + 'Setări' => 'Настройки', + 'Setări plăți' => 'Настройки платежей', + 'Subcontractori' => 'Субподрядчики', + 'Tehnicieni' => 'Техники', + 'Template-uri mesaje' => 'Шаблоны сообщений', + 'Tinichigerie / Detailing' => 'Кузов / Детейлинг', + 'Utilizatori' => 'Пользователи', + 'VIN-căutare' => 'Поиск по VIN', + 'Încărcare STO' => 'Загрузка СТО', + 'Șabloane servicii' => 'Шаблоны услуг', + ], +];