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
@@ -93,6 +93,6 @@ class MechanicKpi extends Page
public function getPeriodLabel(): string
{
return Carbon::parse($this->period . '-01')->locale('ro')->isoFormat('MMMM YYYY');
return Carbon::parse($this->period . '-01')->locale(app()->getLocale())->isoFormat('MMMM YYYY');
}
}