i18n(injector-protocol PDF): switch keys from Cyrillic to RO source + 24 dict entries

Prior version used Cyrillic strings as __() keys — RO users saw
Cyrillic text because fallback = key. Now all PDF labels use RO as
the source-language key (e.g. 'Automobil', 'Nr. înmatriculare',
'Nr. protocol:', 'INJECTOARE'). ru.json + en.json provide translations.

+24 keys covering title, all field labels, table headers, measurement
column headers, before/after subheadings, footer note, conclusion
section, signature block, unit suffixes (km, ml).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 11:43:16 +00:00
parent f484167b51
commit 44726adcb3
3 changed files with 87 additions and 34 deletions
+37 -32
View File
@@ -170,6 +170,11 @@
'conclusion_needs_cleaning' => __('Necesită curățare repetată'),
'conclusion_needs_replacement' => __('Recomandată înlocuire'),
];
// PDF strings use RO keys as the source language; ru.json + en.json provide translations.
// NOTE: these labels were previously in Cyrillic (matching the sample PDF) — but that
// broke fallback on RO locale. Now the RO variant is the key.
$publicQr = asset('img/injector-protocol/qr-sample.png');
@endphp
@@ -195,34 +200,34 @@
@endif
</div>
<div class="title">{{ __('ПРОТОКОЛ ДИАГНОСТИКИ И ОЧИСТКИ') }}<br>{{ __('ЭЛЕКТРОКЛАПАННЫХ ФОРСУНОК') }}</div>
<div class="title">{{ __('PROTOCOL DE DIAGNOSTIC ȘI CURĂȚARE') }}<br>{{ __('AL INJECTOARELOR CU ELECTROVALVĂ') }}</div>
<div class="title-underline"></div>
{{-- ── SECTION 1: DATA ── --}}
<div style="display:flex;justify-content:space-between;align-items:center;">
<div class="plaque">{{ __('ДАННЫЕ АВТОМОБИЛЯ И КЛИЕНТА') }}</div>
<div class="plaque">{{ __('DATELE AUTOMOBILULUI ȘI CLIENTULUI') }}</div>
<div class="inline-field">
<span class="lbl">{{ __('№ протокола:') }}</span>
<span class="lbl">{{ __('Nr. protocol:') }}</span>
<span class="val number" style="color:var(--blue);font-weight:700;">{{ $protocol->protocol_number ?? '—' }}</span>
</div>
</div>
<div class="grid">
<div class="field">
<div class="field-label">{{ __('Автосервис / Клиент') }}</div>
<div class="field-label">{{ __('Autoservice / Client') }}</div>
<div class="field-value">{{ $protocol->source_name }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Телефон') }}</div>
<div class="field-label">{{ __('Telefon') }}</div>
<div class="field-value">{{ $protocol->phone }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Автомобиль') }}</div>
<div class="field-label">{{ __('Automobil') }}</div>
<div class="field-value">{{ $protocol->car_model }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Гос. номер') }}</div>
<div class="field-label">{{ __('Nr. înmatriculare') }}</div>
<div class="field-value">{{ $protocol->plate_number }}</div>
</div>
<div class="field">
@@ -230,26 +235,26 @@
<div class="field-value" style="font-family:monospace;">{{ $protocol->vin }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Пробег, км') }}</div>
<div class="field-label">{{ __('Kilometraj, km') }}</div>
<div class="field-value">{{ $protocol->mileage ? number_format($protocol->mileage, 0, '.', ' ') : '' }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Год выпуска') }}</div>
<div class="field-label">{{ __('An fabricație') }}</div>
<div class="field-value">{{ $protocol->year }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Марка форсунок') }}</div>
<div class="field-label">{{ __('Marca injectoarelor') }}</div>
<div class="field-value">{{ $protocol->injector_brand }}</div>
</div>
<div class="field">
<div class="field-label">{{ __('Кол-во форсунок') }}</div>
<div class="field-label">{{ __('Nr. injectoare') }}</div>
<div class="field-value">{{ $protocol->injector_count }}</div>
</div>
</div>
{{-- ── SECTION 2: REASON ── --}}
<div class="plaque">{{ __('ПРИЧИНА ОБРАЩЕНИЯ') }}</div>
<div class="plaque">{{ __('CAUZA ADRESĂRII') }}</div>
<div class="cbrow">
@foreach ($reasons as $field => $label)
<div class="cb">
@@ -260,25 +265,25 @@
</div>
{{-- ── SECTION 3: MEASUREMENTS ── --}}
<div class="plaque">{{ __('ИЗМЕРЕНИЯ МЕХАНИКИ ФОРСУНОК') }}</div>
<div class="plaque">{{ __('MĂSURĂTORI MECANICA INJECTOARELOR') }}</div>
<table class="meas">
<thead>
<tr>
<th rowspan="2" class="rot">{{ __('ФОРСУНКИ') }}</th>
<th colspan="2">{{ __('Сопротивление, Ом') }}</th>
<th colspan="2">{{ __('Время открытия, мс') }}</th>
<th colspan="2">{{ __('Время закрытия, мс') }}</th>
<th colspan="2">{{ __('Время закр. в КЗ, мс') }}</th>
<th colspan="2">{{ __('Расход, мл') }}</th>
<th colspan="2">{{ __('Герметичность') }}</th>
<th rowspan="2" class="rot">{{ __('INJECTOARE') }}</th>
<th colspan="2">{{ __('Rezistență, Ω') }}</th>
<th colspan="2">{{ __('Timp deschidere, ms') }}</th>
<th colspan="2">{{ __('Timp închidere, ms') }}</th>
<th colspan="2">{{ __('Timp închidere KZ, ms') }}</th>
<th colspan="2">{{ __('Debit, ml') }}</th>
<th colspan="2">{{ __('Etanșeitate') }}</th>
</tr>
<tr>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('до') }}</th><th class="subhead">{{ __('после') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
<th class="subhead">{{ __('înainte') }}</th><th class="subhead">{{ __('după') }}</th>
</tr>
</thead>
<tbody>
@@ -302,10 +307,10 @@
@endfor
</tbody>
</table>
<div class="meas-note">{{ __('Заполняйте строки по количеству форсунок; лишние строки оставьте пустыми.') }}</div>
<div class="meas-note">{{ __('Completați rândurile după numărul de injectoare; lăsați goale rândurile în plus.') }}</div>
{{-- ── SECTION 4: CONCLUSION ── --}}
<div class="plaque">{{ __('ЗАКЛЮЧЕНИЕ') }}</div>
<div class="plaque">{{ __('CONCLUZIE') }}</div>
<div class="cbrow">
@foreach ($conclusions as $field => $label)
<div class="cb">
@@ -314,22 +319,22 @@
</div>
@endforeach
</div>
<div class="field-label" style="margin-top:2mm;">{{ __('Комментарий / рекомендации мастера') }}</div>
<div class="field-label" style="margin-top:2mm;">{{ __('Comentariu / recomandări maistru') }}</div>
<div class="comment-box">{{ $protocol->master_comment }}</div>
<div class="sig-row">
<div class="sig">
<div class="field-label">{{ __('Мастер (ФИО, подпись)') }}</div>
<div class="field-label">{{ __('Maistru (nume, semnătură)') }}</div>
<div class="val">{{ $protocol->master?->name ?: $protocol->master_name_signed }}</div>
</div>
<div class="sig">
<div class="field-label">{{ __('Дата выдачи') }}</div>
<div class="field-label">{{ __('Data emiterii') }}</div>
<div class="val">{{ $protocol->issue_date?->format('d.m.Y') }}</div>
</div>
</div>
<div class="sig-row">
<div class="sig">
<div class="field-label">{{ __('Клиент ознакомлен (подпись)') }}</div>
<div class="field-label">{{ __('Client informat (semnătură)') }}</div>
<div class="val">@if ($protocol->client_acknowledged) @endif</div>
</div>
<div style="text-align:right;color:var(--gray-text);font-size:9pt;padding-top:8mm;">