feat(i18n): convert 38 hardcoded static labels + safe blade wrap + 226 keys
- Convert all remaining static \$modelLabel/\$pluralModelLabel to getter methods with __() (AppointmentResource, WorkOrderResource, MasterResource, ServiceTemplateResource, LaborResource, and 33 others) - Safe blade wrap v2 (37 files, 201 wraps): fixed the regex to not match `->`, `=>`, `!<` — previous aggressive pass broke @if directives - Bulk-translate lowercase model-label keys (programări, fișe lucru, tehnicieni, șabloane servicii, norme-ore, etc.) — these were the RO strings appearing in page titles/breadcrumbs - Add human RU/EN for mechanic-kpi (Mecanic/Lucrări/Norma ore/etc.) and calendar-board words Tests 306 green. Blade compiles cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,9 +24,19 @@ class CompanyResource extends Resource
|
||||
return __('nav.label.Companii');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'companie';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'companii';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('companie');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('companii');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 10;
|
||||
|
||||
|
||||
@@ -24,9 +24,19 @@ class PlanResource extends Resource
|
||||
return __('nav.label.Planuri');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'plan';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'planuri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('plan');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('planuri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 20;
|
||||
|
||||
|
||||
@@ -35,7 +35,12 @@ class SubscriptionResource extends Resource
|
||||
return __('factură');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = 'facturi';
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('facturi');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 30;
|
||||
|
||||
|
||||
@@ -25,9 +25,19 @@ class SuperAdminResource extends Resource
|
||||
return __('nav.label.Utilizatori');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'utilizator';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'utilizatori';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('utilizator');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('utilizatori');
|
||||
}
|
||||
|
||||
protected static string|\UnitEnum|null $navigationGroup = null;
|
||||
|
||||
|
||||
@@ -26,9 +26,19 @@ class ActivityResource extends Resource
|
||||
return __('nav.group.Admin');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'eveniment';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'jurnal';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('eveniment');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('jurnal');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 95;
|
||||
|
||||
|
||||
@@ -32,7 +32,12 @@ class AppointmentResource extends Resource
|
||||
return __('nav.group.CRM');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'programare';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('programare');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -29,9 +29,19 @@ class CallResource extends Resource
|
||||
return __('nav.group.Marketing');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'apel';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'apeluri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('apel');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('apeluri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 62;
|
||||
|
||||
|
||||
@@ -23,7 +23,12 @@ class ClientResource extends Resource
|
||||
return __('nav.label.Clienți');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'client';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('client');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -37,9 +37,19 @@ class DealResource extends Resource
|
||||
return false; // PipelineBoard page is the canonical entry; this resource keeps CRUD routes for edit/create.
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'deal';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'deal-uri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('deal');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('deal-uri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 6;
|
||||
|
||||
|
||||
@@ -29,7 +29,12 @@ class EmployeeProfileResource extends Resource
|
||||
return __('nav.group.Finanțe');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'angajat';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('angajat');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -36,7 +36,12 @@ class ExpenseResource extends Resource
|
||||
return __('cheltuială');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = 'cheltuieli';
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('cheltuieli');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 51;
|
||||
|
||||
|
||||
@@ -36,7 +36,12 @@ class LaborResource extends Resource
|
||||
return __('normă');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = 'norme-ore';
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('norme-ore');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 32;
|
||||
|
||||
|
||||
@@ -30,9 +30,19 @@ class LeadResource extends Resource
|
||||
return __('nav.group.CRM');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'cerere';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'cereri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('cerere');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('cereri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 5;
|
||||
|
||||
|
||||
@@ -28,7 +28,12 @@ class MarketingChannelResource extends Resource
|
||||
return __('nav.group.Marketing');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'canal';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('canal');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -33,9 +33,19 @@ class MasterResource extends Resource
|
||||
return __('nav.group.Service');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'tehnician';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'tehnicieni';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('tehnician');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('tehnicieni');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 33;
|
||||
|
||||
|
||||
@@ -28,9 +28,19 @@ class MessageTemplateResource extends Resource
|
||||
return __('nav.group.Marketing');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'template';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'template-uri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('template');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('template-uri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 60;
|
||||
|
||||
|
||||
@@ -37,7 +37,12 @@ class PartResource extends Resource
|
||||
return __('piesă');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = 'piese';
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('piese');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 40;
|
||||
|
||||
|
||||
@@ -29,7 +29,12 @@ class PayrollAdjustmentResource extends Resource
|
||||
return __('nav.group.Finanțe');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'ajustare';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('ajustare');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -31,9 +31,19 @@ class PayrollRunResource extends Resource
|
||||
return __('nav.group.Finanțe');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'salariu';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'salarii';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('salariu');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('salarii');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 53;
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ class PostResource extends Resource
|
||||
return __('nav.group.Admin');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'pod';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('pod');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
|
||||
@@ -29,9 +29,19 @@ class RoleResource extends Resource
|
||||
return __('nav.group.Admin');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'rol';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'roluri';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('rol');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('roluri');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 82;
|
||||
|
||||
|
||||
@@ -28,9 +28,19 @@ class SupplierResource extends Resource
|
||||
return __('nav.group.Depozit');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'furnizor';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'furnizori';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('furnizor');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('furnizori');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 42;
|
||||
|
||||
|
||||
@@ -30,9 +30,19 @@ class UserResource extends Resource
|
||||
return __('nav.group.Admin');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'utilizator';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'utilizatori';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('utilizator');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('utilizatori');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 80;
|
||||
|
||||
|
||||
@@ -28,9 +28,19 @@ class WarehouseResource extends Resource
|
||||
return __('nav.group.Depozit');
|
||||
}
|
||||
|
||||
protected static ?string $modelLabel = 'depozit';
|
||||
protected static ?string $modelLabel = null;
|
||||
|
||||
protected static ?string $pluralModelLabel = 'depozite';
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('depozit');
|
||||
}
|
||||
|
||||
protected static ?string $pluralModelLabel = null;
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('depozite');
|
||||
}
|
||||
|
||||
protected static ?int $navigationSort = 38;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user