Fix PDF locale and missing translations for ru/en
- Set app locale from user preference in PDF route before rendering - Wrap hardcoded strings (TOTAL, Subtotal, Achitat etc.) with __() - Translate status values via __() in blade - Add ru/en translations: statuses, totals, payment lines Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -140,7 +140,7 @@
|
||||
<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>
|
||||
@@ -254,15 +254,15 @@
|
||||
|
||||
<div class="total-box">
|
||||
@if ($wo->discount_pct > 0)
|
||||
<div class="total-line">Subtotal: {{ number_format((float) ($worksTotal + $partsTotal), 2, '.', ' ') }} {{ $currency }}</div>
|
||||
<div class="total-line">Discount: -{{ $wo->discount_pct }}%</div>
|
||||
<div class="total-line">{{ __('Subtotal:') }} {{ number_format((float) ($worksTotal + $partsTotal), 2, '.', ' ') }} {{ $currency }}</div>
|
||||
<div class="total-line">{{ __('Discount:') }} -{{ $wo->discount_pct }}%</div>
|
||||
@endif
|
||||
<div class="total-line grand">
|
||||
TOTAL DE PLATĂ: {{ number_format((float) $wo->total, 2, '.', ' ') }} {{ $currency }}
|
||||
{{ __('TOTAL DE PLATĂ:') }} {{ number_format((float) $wo->total, 2, '.', ' ') }} {{ $currency }}
|
||||
</div>
|
||||
@if ($paid > 0)
|
||||
<div class="total-line">Achitat: {{ number_format($paid, 2, '.', ' ') }} {{ $currency }}</div>
|
||||
<div class="total-line"><b>Rest de achitat: {{ number_format($balance, 2, '.', ' ') }} {{ $currency }}</b></div>
|
||||
<div class="total-line">{{ __('Achitat:') }} {{ number_format($paid, 2, '.', ' ') }} {{ $currency }}</div>
|
||||
<div class="total-line"><b>{{ __('Rest de achitat:') }} {{ number_format($balance, 2, '.', ' ') }} {{ $currency }}</b></div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user