From 8b77d8ae7ec69735b7c7e7352af8e5c5109bdc5d Mon Sep 17 00:00:00 2001 From: Vasyka Date: Sun, 26 Jul 2026 10:37:58 +0000 Subject: [PATCH] i18n(calendar-board): translate mechanic specialization tokens in matrix + legend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both the row-meta on the master matrix rows and the legend list at the bottom split specialization by '/' and translate each token via __(), matching the pattern already used on Reports.php. 'Suspensie / Frâne' → «Подвеска / Тормоза», 'Motor / Cutie viteze' → «Двигатель / КПП» etc. (all tokens already in the dict). Co-Authored-By: Claude Opus 4.7 (1M context) --- app/Filament/Tenant/Pages/CalendarBoard.php | 4 +++- resources/views/filament/tenant/pages/calendar.blade.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Filament/Tenant/Pages/CalendarBoard.php b/app/Filament/Tenant/Pages/CalendarBoard.php index d6968f9..e9dff6e 100644 --- a/app/Filament/Tenant/Pages/CalendarBoard.php +++ b/app/Filament/Tenant/Pages/CalendarBoard.php @@ -169,7 +169,9 @@ class CalendarBoard extends Page 'id' => $u->id, 'name' => $u->name, 'color' => $u->color ?: '#3b82f6', - 'meta' => $u->specialization ?: ('8' . __('h/zi')), + 'meta' => $u->specialization + ? implode(' / ', array_map(fn ($p) => __(trim($p)), explode('/', $u->specialization))) + : ('8' . __('h/zi')), 'capacity_hours' => 8.0, ])->all(); // Always include "Fără maistru" row at the bottom diff --git a/resources/views/filament/tenant/pages/calendar.blade.php b/resources/views/filament/tenant/pages/calendar.blade.php index 6729583..6341fbc 100644 --- a/resources/views/filament/tenant/pages/calendar.blade.php +++ b/resources/views/filament/tenant/pages/calendar.blade.php @@ -346,7 +346,7 @@ $color = $u?->color ?: '#94a3b8'; $spec = $u?->specialization ?: ''; @endphp -
{{ $name }} @if($spec)· {{ $spec }} @endif
+
{{ $name }} @if($spec)· {{ implode(' / ', array_map(fn($p) => __(trim($p)), explode('/', $spec))) }} @endif
@endforeach