i18n(calendar-board): translate mechanic specialization tokens in matrix + legend
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) <noreply@anthropic.com>
This commit is contained in:
@@ -169,7 +169,9 @@ class CalendarBoard extends Page
|
|||||||
'id' => $u->id,
|
'id' => $u->id,
|
||||||
'name' => $u->name,
|
'name' => $u->name,
|
||||||
'color' => $u->color ?: '#3b82f6',
|
'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,
|
'capacity_hours' => 8.0,
|
||||||
])->all();
|
])->all();
|
||||||
// Always include "Fără maistru" row at the bottom
|
// Always include "Fără maistru" row at the bottom
|
||||||
|
|||||||
@@ -346,7 +346,7 @@
|
|||||||
$color = $u?->color ?: '#94a3b8';
|
$color = $u?->color ?: '#94a3b8';
|
||||||
$spec = $u?->specialization ?: '';
|
$spec = $u?->specialization ?: '';
|
||||||
@endphp
|
@endphp
|
||||||
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:{{ $color }}"></span> {{ $name }} @if($spec)· {{ $spec }} @endif</div>
|
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:{{ $color }}"></span> {{ $name }} @if($spec)· {{ implode(' / ', array_map(fn($p) => __(trim($p)), explode('/', $spec))) }} @endif</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user