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
@@ -30,11 +30,11 @@
@click="navigator.clipboard.writeText($refs.t.innerText); copied = true; setTimeout(() => copied = false, 2000)"
style="margin-left:12px;background:#3b82f6;color:white;padding:4px 10px;border:none;border-radius:4px;cursor:pointer;font-size:11px;">
<span x-show="!copied">{{ __('📋 Copiază') }}</span>
<span x-show="copied" x-cloak> Copiat</span>
<span x-show="copied" x-cloak>{{ __('✓ Copiat') }}</span>
</button>
</div>
<button type="button" wire:click="dismissNew" style="font-size:12px;color:#6b7280;background:none;border:none;cursor:pointer;">
Am salvat token-ul, ascunde-l
{{ __('Am salvat token-ul, ascunde-l') }}
</button>
</div>
@endif
@@ -49,8 +49,8 @@
<tr>
<th>{{ __('Nume') }}</th>
<th>{{ __('Folosit ultima dată') }}</th>
<th>Creat</th>
<th>Permisiuni</th>
<th>{{ __('Creat') }}</th>
<th>{{ __('Permisiuni') }}</th>
<th></th>
</tr>
</thead>
@@ -77,10 +77,10 @@
<div class="at-doc" style="margin-top:16px;">
<b>{{ __('Cum folosești API-ul:') }}</b>
<ol style="margin:8px 0 0 20px;">
<li>{{ __('Obține token cu') }} <code>POST /api/v1/login</code> cu <code>email</code>+<code>password</code> JSON</li>
<li>{{ __('Obține token cu') }} <code>{{ __('POST /api/v1/login') }}</code> cu <code>email</code>+<code>password</code> JSON</li>
<li>{{ __('Sau generează unul aici (recomandat pentru integrări permanente)') }}</li>
<li>{{ __('Adaugă header') }} <code>Authorization: Bearer &lt;token&gt;</code> la fiecare request</li>
<li>Endpoints disponibile: <code>/api/v1/clients</code>, <code>/api/v1/vehicles</code>, <code>/api/v1/work-orders</code> (GET, POST, PATCH, DELETE)</li>
<li>{{ __('Adaugă header') }} <code>Authorization: Bearer &lt;token&gt;</code> {{ __('la fiecare request') }}</li>
<li>{{ __('Endpoints disponibile:') }} <code>{{ __('/api/v1/clients') }}</code>, <code>{{ __('/api/v1/vehicles') }}</code>, <code>{{ __('/api/v1/work-orders') }}</code> {{ __('(GET, POST, PATCH, DELETE)') }}</li>
<li>{{ __('Tot apelul trebuie făcut pe subdomain-ul tău:') }} <code>https://{{ tenant()?->slug ?? 'YOURSLUG' }}.service.mir.md/api/v1/...</code></li>
</ol>
</div>