feat(i18n): mega-wrap 494 raw RO strings + 269 lang entries + 161 human RU/163 EN
Broad sweep across the whole codebase:
- Blade views (39 files, 315 wraps): tag-text and title/placeholder/alt
attributes wrapped with {{ __() }}. Excludes scripts, styles, @php,
@verbatim, {{ }}, {!! !!}, comments to avoid touching interpolations.
- PHP (54 files, 179 wraps): array 'key' => 'RO value' patterns and
list items with diacritics wrapped with __(). Reverted __() inside
const arrays (PHP disallows non-constant expressions).
- Added 269 new keys to lang/{ru,en}.json (identity fallback for
unknowns → 161 human RU + 163 EN translations added for the most
common enums, stages, roles, statuses, payment methods, vehicle
categories, warehouse, portal, form actions.
Missing translations fall back to RO so the UI never breaks. All 306
tests pass; view cache compiles cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
|
||||
<div class="rp-stack">
|
||||
<div class="rp-bar">
|
||||
<span class="rp-label">Perioadă:</span>
|
||||
<span class="rp-label">{{ __('Perioadă:') }}</span>
|
||||
@foreach ($periods as $key => $label)
|
||||
<button type="button" wire:click="setPeriod('{{ $key }}')"
|
||||
class="rp-pill {{ $period === $key ? 'active' : '' }}">{{ $label }}</button>
|
||||
@@ -88,9 +88,9 @@
|
||||
@foreach ([
|
||||
['Încasări', $data['income'], 'success'],
|
||||
['Cheltuieli', $data['expenses'], 'danger'],
|
||||
['Profit', $data['profit'], $data['profit'] >= 0 ? 'success' : 'danger'],
|
||||
['Datorii clienți', $data['debt'], 'warning'],
|
||||
] as [$label, $value, $color])
|
||||
['Profit', $data['profit'], $data['profit'] >{{ __('= 0 ? \'success\' : \'danger\'],
|
||||
[\'Datorii clienți\', $data[\'debt\'], \'warning\'],
|
||||
] as [$label, $value, $color])') }}
|
||||
<div class="rp-card">
|
||||
<div class="rp-stat-label">{{ $label }}</div>
|
||||
<div class="rp-stat-value rp-{{ $color }}">
|
||||
@@ -102,9 +102,9 @@
|
||||
|
||||
<div class="rp-grid rp-grid-2">
|
||||
<div class="rp-card">
|
||||
<div class="rp-h3">Încasări pe metodă</div>
|
||||
<div class="rp-h3">{{ __('Încasări pe metodă') }}</div>
|
||||
<table class="rp-tbl">
|
||||
<thead><tr><th>Metodă</th><th class="rp-right">Tranz.</th><th class="rp-right">Total</th></tr></thead>
|
||||
<thead><tr><th>{{ __('Metodă') }}</th><th class="rp-right">Tranz.</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($data['by_method'] as $row)
|
||||
<tr>
|
||||
@@ -113,7 +113,7 @@
|
||||
<td class="rp-right rp-bold">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="rp-muted">Nicio plată în perioada selectată.</td></tr>
|
||||
<tr><td colspan="3" class="rp-muted">{{ __('Nicio plată în perioada selectată.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -121,7 +121,7 @@
|
||||
<div class="rp-card">
|
||||
<div class="rp-h3">Cheltuieli pe categorie</div>
|
||||
<table class="rp-tbl">
|
||||
<thead><tr><th>Categorie</th><th class="rp-right">Nr.</th><th class="rp-right">Total</th></tr></thead>
|
||||
<thead><tr><th>Categorie</th><th class="rp-right">{{ __('Nr.') }}</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($data['by_category'] as $row)
|
||||
<tr>
|
||||
@@ -130,22 +130,22 @@
|
||||
<td class="rp-right rp-bold rp-danger">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="rp-muted">Nicio cheltuială.</td></tr>
|
||||
<tr><td colspan="3" class="rp-muted">{{ __('Nicio cheltuială.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 13px; color: #6b7280;">Marjă profit: <b>{{ $data['margin_pct'] }}%</b></div>
|
||||
<div style="font-size: 13px; color: #6b7280;">{{ __('Marjă profit:') }} <b>{{ $data['margin_pct'] }}%</b></div>
|
||||
|
||||
@elseif ($tab === 'workload')
|
||||
<div class="rp-grid rp-grid-2">
|
||||
<div class="rp-card">
|
||||
<div class="rp-stat-label">Fișe deschise</div>
|
||||
<div class="rp-stat-label">{{ __('Fișe deschise') }}</div>
|
||||
<div class="rp-stat-value">{{ $data['opened'] }}</div>
|
||||
</div>
|
||||
<div class="rp-card">
|
||||
<div class="rp-stat-label">Fișe închise</div>
|
||||
<div class="rp-stat-label">{{ __('Fișe închise') }}</div>
|
||||
<div class="rp-stat-value rp-success">{{ $data['closed'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@
|
||||
<td class="rp-right rp-bold">{{ $row->cnt }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="2" class="rp-muted">Nicio fișă în perioada selectată.</td></tr>
|
||||
<tr><td colspan="2" class="rp-muted">{{ __('Nicio fișă în perioada selectată.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -172,7 +172,7 @@
|
||||
<th>Mecanic</th>
|
||||
<th>Specializare</th>
|
||||
<th class="rp-right">Manopere</th>
|
||||
<th class="rp-right">Ore</th>
|
||||
<th class="rp-right">{{ __('Ore') }}</th>
|
||||
<th class="rp-right">Venit</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
@@ -195,9 +195,9 @@
|
||||
<div class="rp-card" style="overflow-x: auto;">
|
||||
<table class="rp-tbl">
|
||||
<thead><tr>
|
||||
<th>Manoperă</th>
|
||||
<th class="rp-right">Nr.</th>
|
||||
<th class="rp-right">Ore total</th>
|
||||
<th>{{ __('Manoperă') }}</th>
|
||||
<th class="rp-right">{{ __('Nr.') }}</th>
|
||||
<th class="rp-right">{{ __('Ore total') }}</th>
|
||||
<th class="rp-right">Venit</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
@@ -209,7 +209,7 @@
|
||||
<td class="rp-right rp-success">{{ number_format((float)$r->revenue, 2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4" class="rp-muted">Nicio manoperă efectuată.</td></tr>
|
||||
<tr><td colspan="4" class="rp-muted">{{ __('Nicio manoperă efectuată.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -218,9 +218,9 @@
|
||||
@elseif ($tab === 'parts')
|
||||
<div class="rp-grid rp-grid-2">
|
||||
<div class="rp-card" style="overflow-x: auto;">
|
||||
<div class="rp-h3">Top piese vândute</div>
|
||||
<div class="rp-h3">{{ __('Top piese vândute') }}</div>
|
||||
<table class="rp-tbl">
|
||||
<thead><tr><th>Piesă</th><th class="rp-right">Cant.</th><th class="rp-right">Venit</th><th class="rp-right">Marjă</th></tr></thead>
|
||||
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">Cant.</th><th class="rp-right">Venit</th><th class="rp-right">{{ __('Marjă') }}</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($data['sold'] as $r)
|
||||
<tr>
|
||||
@@ -230,15 +230,15 @@
|
||||
<td class="rp-right rp-success">{{ number_format((float)$r->margin, 2, '.', ' ') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4" class="rp-muted">Nicio piesă montată.</td></tr>
|
||||
<tr><td colspan="4" class="rp-muted">{{ __('Nicio piesă montată.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="rp-card">
|
||||
<div class="rp-h3">⚠️ Stoc minim atins</div>
|
||||
<div class="rp-h3">{{ __('⚠️ Stoc minim atins') }}</div>
|
||||
<table class="rp-tbl">
|
||||
<thead><tr><th>Piesă</th><th class="rp-right">Stoc</th><th class="rp-right">Min.</th></tr></thead>
|
||||
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">{{ __('Stoc') }}</th><th class="rp-right">Min.</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse ($data['low'] as $p)
|
||||
<tr>
|
||||
@@ -247,7 +247,7 @@
|
||||
<td class="rp-right">{{ $p->min_qty }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="rp-muted">Toate piesele sunt în stoc.</td></tr>
|
||||
<tr><td colspan="3" class="rp-muted">{{ __('Toate piesele sunt în stoc.') }}</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -257,11 +257,11 @@
|
||||
@elseif ($tab === 'clients')
|
||||
<div class="rp-grid rp-grid-2">
|
||||
<div class="rp-card">
|
||||
<div class="rp-stat-label">Clienți noi în perioadă</div>
|
||||
<div class="rp-stat-label">{{ __('Clienți noi în perioadă') }}</div>
|
||||
<div class="rp-stat-value">{{ $data['new_count'] }}</div>
|
||||
</div>
|
||||
<div class="rp-card">
|
||||
<div class="rp-h3">Lead-uri pe sursă</div>
|
||||
<div class="rp-h3">{{ __('Lead-uri pe sursă') }}</div>
|
||||
<table class="rp-tbl">
|
||||
<tbody>
|
||||
@forelse ($data['by_source'] as $row)
|
||||
|
||||
Reference in New Issue
Block a user