i18n(finance): full page — tabs/periods/pnl/balance + Expense.CATEGORIES

- All 4 tabs (Overview/Cashflow/P&L/Balanță) built with __() around
  the text portion, emoji stays in code
- 4 period presets wrapped with __()
- P&L table Marjă/Marjă piese footer wrapped
- Expense::CATEGORIES values look up through __() in the expensesByCat
  loop so categories show translated (Salariu → Зарплата etc.)
- +25 translations covering all UI copy on /app/finance

306 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-17 06:28:53 +00:00
parent 5a2b97833a
commit 2b56bbc35b
4 changed files with 60 additions and 40 deletions
@@ -99,7 +99,7 @@
<table class="fn-tbl">
<tr><td>{{ __('Cost piese (achiziție)') }}</td><td class="fn-r fn-danger">{{ number_format($data['partsCost'], 2, '.', ' ') }}</td></tr>
@foreach ($data['expensesByCat'] as $row)
<tr><td>{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}</td><td class="fn-r fn-danger">{{ number_format((float) $row->total, 2, '.', ' ') }}</td></tr>
<tr><td>{{ __(\App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category) }}</td><td class="fn-r fn-danger">{{ number_format((float) $row->total, 2, '.', ' ') }}</td></tr>
@endforeach
<tr style="border-top:2px solid #e5e7eb;"><td class="fn-bold">{{ __('Total costuri') }}</td><td class="fn-r fn-bold fn-danger">{{ number_format($data['partsCost'] + $data['totalExpenses'], 2, '.', ' ') }}</td></tr>
</table>
@@ -108,8 +108,8 @@
<div class="fn-card" style="text-align:right;">
<div class="fn-stat-l">{{ __('Profit net') }}</div>
<div class="fn-stat-v {{ $data['netProfit'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['netProfit'], 2, '.', ' ') }} MDL</div>
<div style="font-size:12px;color:#6b7280;margin-top:4px;">Marjă: {{ $data['marginPct'] }}%</div>
<div style="font-size:11px;color:#9ca3af;margin-top:4px;">Marjă piese: {{ number_format($data['partsMargin'], 2, '.', ' ') }} MDL</div>
<div style="font-size:12px;color:#6b7280;margin-top:4px;">{{ __('Marjă:') }} {{ $data['marginPct'] }}%</div>
<div style="font-size:11px;color:#9ca3af;margin-top:4px;">{{ __('Marjă piese:') }} {{ number_format($data['partsMargin'], 2, '.', ' ') }} MDL</div>
</div>
@elseif ($tab === 'balance')