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
@@ -19,14 +19,14 @@
<li>{{ __('Operatorul (tu) creezi factură:') }} <code>/admin/companies/{id}</code> {{ __('→ „Generează factură"') }}</li>
<li>{{ __('Tenantul vede factura în interiorul lui la') }} <code>https://{slug}.service.mir.md/billing</code></li>
<li>{{ __('Click „Plătește" → opțiuni: card (Stripe), PayPal, sau transfer manual') }}</li>
<li>La succes: webhook automat status=paid + extends company.active_until</li>
<li>{{ __('La succes: webhook → automat status=paid + extends company.active_until') }}</li>
<li>{{ __('La transfer manual: tenant trimite confirmare; operator click „Marchează plătit" în /admin/subscriptions') }}</li>
</ol>
<div style="margin-top:12px;padding-top:12px;border-top:1px solid #e5e7eb;">
<b>{{ __('⚠ Pentru a primi plăți LIVE:') }}</b>
<ul style="margin:4px 0 0 18px;padding:0;font-size:12px;">
<li>{{ __('Stripe: înregistrează cont la') }} <a href="https://dashboard.stripe.com" target="_blank" style="color:#6366f1;">dashboard.stripe.com</a> {{ __('→ ia keys → setează webhook la URL-ul de mai sus') }}</li>
<li>PayPal: <a href="https://developer.paypal.com/dashboard/applications" target="_blank" style="color:#6366f1;">developer.paypal.com</a> {{ __('→ creează aplicație live → ia credentials') }}</li>
<li>{{ __('Stripe: înregistrează cont la') }} <a href="https://dashboard.stripe.com" target="_blank" style="color:#6366f1;">{{ __('dashboard.stripe.com') }}</a> {{ __('→ ia keys → setează webhook la URL-ul de mai sus') }}</li>
<li>{{ __('PayPal:') }} <a href="https://developer.paypal.com/dashboard/applications" target="_blank" style="color:#6366f1;">{{ __('developer.paypal.com') }}</a> {{ __('→ creează aplicație live → ia credentials') }}</li>
<li>{{ __('Transfer bancar: pune doar IBAN-ul tău, fără cont gateway') }}</li>
</ul>
</div>
@@ -105,10 +105,10 @@
{{-- STATS GRID --}}
<div class="cv-section">
<div class="cv-section-title">📊 Activitate live</div>
<div class="cv-section-title">{{ __('📊 Activitate live') }}</div>
<div class="cv-grid">
<div class="cv-card">
<div class="label">Useri</div>
<div class="label">{{ __('Useri') }}</div>
<div class="value">{{ $stats['users'] }}</div>
</div>
<div class="cv-card">
@@ -142,17 +142,17 @@
<div class="sub">{{ $this->record->settings['currency'] ?? 'MDL' }}</div>
</div>
<div class="cv-card">
<div class="label">Storage media</div>
<div class="label">{{ __('Storage media') }}</div>
<div class="value">{{ $stats['storage_mb'] }}</div>
<div class="sub">{{ __('MB folosiți') }}</div>
</div>
<div class="cv-card {{ $stats['last_login'] && \Carbon\Carbon::parse($stats['last_login'])->diffInDays() > 14 ? 'danger' : '' }}">
<div class="label">Ultima logare</div>
<div class="label">{{ __('Ultima logare') }}</div>
<div class="value" style="font-size:14px;">
{{ $stats['last_login'] ? \Carbon\Carbon::parse($stats['last_login'])->diffForHumans() : 'Niciodată' }}
</div>
@if ($stats['last_login'] && \Carbon\Carbon::parse($stats['last_login'])->diffInDays() > 14)
<div class="sub"> Posibil churn</div>
<div class="sub">{{ __('⚠ Posibil churn') }}</div>
@endif
</div>
</div>
@@ -160,7 +160,7 @@
{{-- SUBSCRIPTIONS --}}
<div class="cv-section">
<div class="cv-section-title">💳 Istoric abonamente</div>
<div class="cv-section-title">{{ __('💳 Istoric abonamente') }}</div>
@if ($this->record->subscriptions->isEmpty())
<div style="padding:32px;text-align:center;color:#9ca3af;font-size:13px;border:1px dashed #e5e7eb;border-radius:8px;">
{{ __('Niciun abonament emis. Folosește „Generează factură" de sus.') }}
@@ -170,10 +170,10 @@
<thead>
<tr>
<th>{{ __('Factură') }}</th>
<th>Plan</th>
<th>{{ __('Plan') }}</th>
<th>{{ __('Perioadă') }}</th>
<th>{{ __('Sumă') }}</th>
<th>Status</th>
<th>{{ __('Status') }}</th>
<th>{{ __('Plătit') }}</th>
</tr>
</thead>
@@ -199,7 +199,7 @@
{{-- CONFIG --}}
<div class="cv-section">
<div class="cv-section-title"> Configurare tenant</div>
<div class="cv-section-title">{{ __('⚙ Configurare tenant') }}</div>
<div class="cv-grid" style="grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));">
<div class="cv-card">
<div class="label">{{ __('Limbă') }}</div>
@@ -216,20 +216,20 @@
<div class="value" style="font-size:14px;">{{ $this->record->settings['labor_rate'] ?? '—' }}</div>
</div>
<div class="cv-card">
<div class="label">Onboarded</div>
<div class="label">{{ __('Onboarded') }}</div>
<div class="value" style="font-size:14px;">
{{ ! empty($this->record->settings['onboarded_at']) ? '✓ Da' : '✗ Nu' }}
</div>
</div>
<div class="cv-card">
<div class="label">Theme color</div>
<div class="label">{{ __('Theme color') }}</div>
<div class="value" style="display:flex;align-items:center;gap:6px;font-size:14px;">
<span style="display:inline-block;width:18px;height:18px;border-radius:3px;background:{{ $this->record->settings['theme_color'] ?? '#3B82F6' }};"></span>
{{ $this->record->settings['theme_color'] ?? '#3B82F6' }}
</div>
</div>
<div class="cv-card">
<div class="label">AI provider</div>
<div class="label">{{ __('AI provider') }}</div>
<div class="value" style="font-size:14px;">
{{ $this->record->settings['ai']['default_provider'] ?? 'neconfigurat' }}
</div>