feat(i18n): mega-wrap 494 raw RO strings + 269 lang entries + 161 human RU/163 EN

Broad sweep across the whole codebase:
- Blade views (39 files, 315 wraps): tag-text and title/placeholder/alt
  attributes wrapped with {{ __() }}. Excludes scripts, styles, @php,
  @verbatim, {{ }}, {!! !!}, comments to avoid touching interpolations.
- PHP (54 files, 179 wraps): array 'key' => 'RO value' patterns and
  list items with diacritics wrapped with __(). Reverted __() inside
  const arrays (PHP disallows non-constant expressions).
- Added 269 new keys to lang/{ru,en}.json (identity fallback for
  unknowns → 161 human RU + 163 EN translations added for the most
  common enums, stages, roles, statuses, payment methods, vehicle
  categories, warehouse, portal, form actions.

Missing translations fall back to RO so the UI never breaks. All 306
tests pass; view cache compiles cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 05:53:22 +00:00
parent 2d447e6294
commit 3911012c65
68 changed files with 1211 additions and 429 deletions
@@ -53,7 +53,7 @@ class ActivityResource extends Resource
->colors([
'success' => ['creat'],
'info' => ['modificat'],
'danger' => ['șters'],
'danger' => [__('șters')],
'warning' => ['restaurat'],
]),
Tables\Columns\TextColumn::make('subject_type')
@@ -76,7 +76,7 @@ class ActivityResource extends Resource
->filters([
Tables\Filters\SelectFilter::make('description')
->label(__('Acțiune'))
->options(['creat' => 'creat', 'modificat' => 'modificat', 'șters' => 'șters']),
->options(['creat' => 'creat', 'modificat' => 'modificat', __('șters') => __('șters')]),
Tables\Filters\Filter::make('today')
->label(__('Astăzi'))
->query(fn ($q) => $q->whereDate('created_at', today())),
@@ -57,7 +57,7 @@ class ClientResource extends Resource
->schema([
Forms\Components\Select::make('type')
->label(__('Tip'))
->options(['individual' => 'Persoană fizică', 'company' => 'Persoană juridică'])
->options(['individual' => __('Persoană fizică'), 'company' => __('Persoană juridică')])
->default('individual')
->required()
->live(),
@@ -68,8 +68,8 @@ class ClientResource extends Resource
->maxLength(160),
Forms\Components\Select::make('status')
->options([
'new' => 'Nou', 'active' => 'Activ', 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => 'Blocat', 'lost' => 'Pierdut',
'new' => __('Nou'), 'active' => __('Activ'), 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => __('Blocat'), 'lost' => 'Pierdut',
])
->default('active')
->required(),
@@ -133,8 +133,8 @@ class ClientResource extends Resource
])
->filters([
Tables\Filters\SelectFilter::make('status')->options([
'new' => 'Nou', 'active' => 'Activ', 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => 'Blocat', 'lost' => 'Pierdut',
'new' => __('Nou'), 'active' => __('Activ'), 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => __('Blocat'), 'lost' => 'Pierdut',
]),
])
->actions([
@@ -54,7 +54,7 @@ class MasterResource extends Resource
Forms\Components\TextInput::make('phone')->label(__('Telefon'))->tel()->maxLength(40),
Forms\Components\TextInput::make('email')->label(__('Email'))->email()->maxLength(120),
Forms\Components\Select::make('status')
->options(['active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat'])
->options(['active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat')])
->default('active')
->required(),
]),
@@ -50,7 +50,7 @@ class PartResource extends Resource
{
return [
'Stoc' => (int) $record->stock . ' ' . ($record->unit ?? 'buc'),
'Preț' => number_format((float) $record->sell_price, 2),
__('Preț') => number_format((float) $record->sell_price, 2),
];
}
@@ -77,7 +77,7 @@ class TireSetResource extends Resource
Forms\Components\TextInput::make('model')->maxLength(64),
Forms\Components\TextInput::make('dot_year')->label(__('DOT'))->maxLength(8)->placeholder('3621'),
Forms\Components\Toggle::make('has_rims')->label(__('Cu jante')),
Forms\Components\Select::make('rim_type')->label(__('Tip jante'))->options(['steel' => 'Tablă', 'alloy' => 'Aliaj']),
Forms\Components\Select::make('rim_type')->label(__('Tip jante'))->options(['steel' => __('Tablă'), 'alloy' => 'Aliaj']),
Forms\Components\Select::make('condition')->label(__('Stare'))->options(TireSet::CONDITIONS),
]),
Schemas\Components\Section::make(__('Uzură (mm) per poziție'))
@@ -61,7 +61,7 @@ class UserResource extends Resource
Forms\Components\TextInput::make('email')->email()->required()->maxLength(120),
Forms\Components\TextInput::make('phone')->tel()->maxLength(40),
Forms\Components\Select::make('locale')
->options(['ro' => 'Română', 'ru' => 'Русский', 'en' => 'English'])
->options(['ro' => __('Română'), 'ru' => 'Русский', 'en' => 'English'])
->default('ro'),
]),
Schemas\Components\Section::make(__('Acces'))
@@ -74,7 +74,7 @@ class UserResource extends Resource
->default('mechanic')
->helperText(__('Rolul principal — sincronizat automat cu drepturile RBAC.')),
Forms\Components\Select::make('status')
->options(['active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat'])
->options(['active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat')])
->default('active')
->required(),
Forms\Components\TextInput::make('password')
@@ -170,11 +170,11 @@ class UserResource extends Resource
])
->filters([
Tables\Filters\SelectFilter::make('role')->options([
'admin' => 'Admin', 'manager' => 'Manager', 'receptionist' => 'Recepție',
'admin' => 'Admin', 'manager' => 'Manager', 'receptionist' => __('Recepție'),
'mechanic' => 'Mecanic', 'parts_manager' => 'Magazie', 'accountant' => 'Contabil', 'marketer' => 'Marketing',
]),
Tables\Filters\SelectFilter::make('status')->options([
'active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat',
'active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat'),
]),
])
->actions([
@@ -39,7 +39,7 @@ class PermissionOverridesRelationManager extends RelationManager
->columnSpanFull(),
Forms\Components\Select::make('mode')
->required()
->options(['grant' => 'GRANT — adaugă dreptul', 'deny' => 'DENY — interzice dreptul'])
->options(['grant' => __('GRANT — adaugă dreptul'), 'deny' => 'DENY — interzice dreptul'])
->default('grant'),
Forms\Components\DatePicker::make('expires_at')
->label(__('Expiră la (opțional)'))
@@ -82,7 +82,7 @@ class VehicleResource extends Resource
Forms\Components\TextInput::make('gearbox')->maxLength(60),
Forms\Components\Select::make('fuel')
->options([
'Benzină' => 'Benzină', 'Diesel' => 'Diesel', 'Hybrid' => 'Hybrid',
__('Benzină') => __('Benzină'), 'Diesel' => 'Diesel', 'Hybrid' => 'Hybrid',
'EV' => 'Electric', 'GPL' => 'GPL', 'GNC' => 'GNC',
]),
Forms\Components\Select::make('vehicle_class')