i18n(dates): use app locale for month names on MechanicKpi + PDF appointments

MechanicKpi getPeriodLabel() was hardcoded to ->locale('ro') which
forced Romanian month names ('iulie 2026') regardless of the app
locale. Same on PDF appointments day-label. Both now switch to
app()->getLocale() so RU shows «июль 2026», EN 'July 2026'.

SetLocale middleware already calls Carbon::setLocale on every
request, so translatedFormat() elsewhere already respects the app
locale — no other files needed patching.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 10:43:54 +00:00
parent 6b5ab02e68
commit 1f471cc1ea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
<div class="sub">Generat la {{ $generatedAt }} · {{ $appointments->flatten()->count() }} programări total</div>
@forelse ($appointments as $date => $dayAppts)
@php $dateLabel = \Carbon\Carbon::parse($date)->locale('ro')->isoFormat('dddd, D MMMM YYYY'); @endphp
@php $dateLabel = \Carbon\Carbon::parse($date)->locale(app()->getLocale())->isoFormat('dddd, D MMMM YYYY'); @endphp
<h2>{{ ucfirst($dateLabel) }} · {{ $dayAppts->count() }} programări</h2>
<table>
<thead>