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:
2026-07-15 06:17:10 +00:00
parent 3911012c65
commit 7077fff3b3
63 changed files with 800 additions and 284 deletions
+16 -16
View File
@@ -134,13 +134,13 @@
</div>
<div class="col col-half">
<div class="doc-title">{{ __('FIȘĂ DE LUCRU') }}</div>
<div class="doc-meta">Nr.: <b>{{ $wo->number }}</b></div>
<div class="doc-meta">{{ __('Nr.:') }} <b>{{ $wo->number }}</b></div>
<div class="doc-meta">{{ __('Data deschiderii:') }} <b>{{ $wo->opened_at?->format('d.m.Y') }}</b></div>
@if ($wo->closed_at)
<div class="doc-meta">{{ __('Data închiderii:') }} <b>{{ $wo->closed_at->format('d.m.Y') }}</b></div>
@endif
<div class="doc-meta">
Status: <b>{{ \App\Models\Tenant\WorkOrder::STATUSES[$wo->status] ?? $wo->status }}</b>
{{ __('Status:') }} <b>{{ \App\Models\Tenant\WorkOrder::STATUSES[$wo->status] ?? $wo->status }}</b>
</div>
</div>
</div>
@@ -152,9 +152,9 @@
<h3>{{ __('Client') }}</h3>
<div class="kv">
<div><b>{{ __('Nume:') }}</b> {{ $wo->client?->name ?? '—' }}</div>
<div><b>Telefon:</b> {{ $wo->client?->phone ?? '—' }}</div>
<div><b>{{ __('Telefon:') }}</b> {{ $wo->client?->phone ?? '—' }}</div>
@if ($wo->client?->email)
<div><b>Email:</b> {{ $wo->client->email }}</div>
<div><b>{{ __('Email:') }}</b> {{ $wo->client->email }}</div>
@endif
</div>
</div>
@@ -163,12 +163,12 @@
<div class="box">
<h3>{{ __('Auto') }}</h3>
<div class="kv">
<div><b>Marca/Model:</b> {{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }} {{ $wo->vehicle?->year }}</div>
<div><b>Nr.:</b> {{ $wo->vehicle?->plate ?? '—' }}</div>
<div><b>{{ __('Marca/Model:') }}</b> {{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }} {{ $wo->vehicle?->year }}</div>
<div><b>{{ __('Nr.:') }}</b> {{ $wo->vehicle?->plate ?? '—' }}</div>
@if ($wo->vehicle?->vin)
<div><b>VIN:</b> {{ $wo->vehicle->vin }}</div>
<div><b>{{ __('VIN:') }}</b> {{ $wo->vehicle->vin }}</div>
@endif
<div><b>Km la intrare:</b> {{ $wo->mileage_in ? number_format($wo->mileage_in, 0, '.', ' ') : '—' }}</div>
<div><b>{{ __('Km la intrare:') }}</b> {{ $wo->mileage_in ? number_format($wo->mileage_in, 0, '.', ' ') : '—' }}</div>
@if ($wo->mileage_out)
<div><b>{{ __('Km la ieșire:') }}</b> {{ number_format($wo->mileage_out, 0, '.', ' ') }}</div>
@endif
@@ -184,18 +184,18 @@
<div style="margin-bottom: 8px;">{{ $wo->complaint }}</div>
@endif
@if ($wo->diagnosis)
<h3>Diagnostic</h3>
<h3>{{ __('Diagnostic') }}</h3>
<div>{{ $wo->diagnosis }}</div>
@endif
</div>
@endif
@if ($wo->works->isNotEmpty())
<h3 style="font-size: 12px; margin: 12px 0 4px; text-transform: uppercase; color: {{ $themeColor }};">Manopere</h3>
<h3 style="font-size: 12px; margin: 12px 0 4px; text-transform: uppercase; color: {{ $themeColor }};">{{ __('Manopere') }}</h3>
<table class="items">
<thead>
<tr>
<th style="width: 50%;">Denumire</th>
<th style="width: 50%;">{{ __('Denumire') }}</th>
<th class="r" style="width: 12%;">{{ __('Ore') }}</th>
<th class="r" style="width: 18%;">{{ __('Preț/h') }}</th>
<th class="r" style="width: 20%;">{{ __('Total') }}</th>
@@ -213,7 +213,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="3" class="r">Subtotal manopere:</td>
<td colspan="3" class="r">{{ __('Subtotal manopere:') }}</td>
<td class="r">{{ number_format((float) $worksTotal, 2, '.', ' ') }} {{ $currency }}</td>
</tr>
</tfoot>
@@ -221,13 +221,13 @@
@endif
@if ($wo->parts->isNotEmpty())
<h3 style="font-size: 12px; margin: 12px 0 4px; text-transform: uppercase; color: {{ $themeColor }};">Piese</h3>
<h3 style="font-size: 12px; margin: 12px 0 4px; text-transform: uppercase; color: {{ $themeColor }};">{{ __('Piese') }}</h3>
<table class="items">
<thead>
<tr>
<th style="width: 40%;">Denumire</th>
<th style="width: 40%;">{{ __('Denumire') }}</th>
<th style="width: 18%;">{{ __('Cod') }}</th>
<th class="r" style="width: 10%;">Cant.</th>
<th class="r" style="width: 10%;">{{ __('Cant.') }}</th>
<th class="r" style="width: 14%;">{{ __('Preț') }}</th>
<th class="r" style="width: 18%;">{{ __('Total') }}</th>
</tr>
@@ -245,7 +245,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="4" class="r">Subtotal piese:</td>
<td colspan="4" class="r">{{ __('Subtotal piese:') }}</td>
<td class="r">{{ number_format((float) $partsTotal, 2, '.', ' ') }} {{ $currency }}</td>
</tr>
</tfoot>