i18n(calendar): translate 'h/zi', matrix howto, load legend, day-count word
- Post/mechanic meta 'h/zi' → __('h/zi') so RU shows 'ч/день', EN 'h/day'
- Wrap the 3 load-legend labels (0–5h/10, 5–8.5h/10, ≥9h/10) so 'h' → 'ч' on RU
- Split the long howto sentence so 'Pod'/'Mecanic' + 'Zile' translate
- Default fallback 'Pod 1 (default)' now uses __('Pod') + __('implicit')
Adds 5 new translations. Post NAMES themselves are DB rows (user data)
and are shown as-is — they're not translated by the app.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -169,7 +169,7 @@ class CalendarBoard extends Page
|
||||
'id' => $u->id,
|
||||
'name' => $u->name,
|
||||
'color' => $u->color ?: '#3b82f6',
|
||||
'meta' => $u->specialization ?: '8h/zi',
|
||||
'meta' => $u->specialization ?: ('8' . __('h/zi')),
|
||||
'capacity_hours' => 8.0,
|
||||
])->all();
|
||||
// Always include "Fără maistru" row at the bottom
|
||||
@@ -181,7 +181,7 @@ class CalendarBoard extends Page
|
||||
// Fallback: synthesize a default post if none configured yet
|
||||
if ($posts->isEmpty()) {
|
||||
return [
|
||||
['kind' => 'post', 'id' => 0, 'name' => 'Pod 1 (default)', 'color' => '#3b82f6', 'meta' => '10h/zi', 'capacity_hours' => 10.0],
|
||||
['kind' => 'post', 'id' => 0, 'name' => __('Pod') . ' 1 (' . __('implicit') . ')', 'color' => '#3b82f6', 'meta' => '10' . __('h/zi'), 'capacity_hours' => 10.0],
|
||||
];
|
||||
}
|
||||
return $posts->map(fn ($p) => [
|
||||
@@ -189,7 +189,7 @@ class CalendarBoard extends Page
|
||||
'id' => $p->id,
|
||||
'name' => $p->name,
|
||||
'color' => $p->color ?: '#3b82f6',
|
||||
'meta' => ($p->hours_per_day ? $p->hours_per_day . 'h/zi' : '10h/zi') . ($p->description ? ' · ' . $p->description : ''),
|
||||
'meta' => ($p->hours_per_day ? $p->hours_per_day . __('h/zi') : '10' . __('h/zi')) . ($p->description ? ' · ' . $p->description : ''),
|
||||
'capacity_hours' => (float) ($p->hours_per_day ?: 10),
|
||||
])->all();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
"/api/v1/vehicles": "/api/v1/vehicles",
|
||||
"/api/v1/work-orders": "/api/v1/work-orders",
|
||||
"0 = dezactivat": "0 = dezactivat",
|
||||
"0–5h/10": "0–5h/10",
|
||||
"1.15 = +15% peste prețul de bază. 0.95 = -5%.": "1.15 = +15% over base price. 0.95 = -5%.",
|
||||
"123456:ABC-XYZ...": "123456:ABC-XYZ...",
|
||||
"2FA": "2FA",
|
||||
"2FA dezactivat.": "2FA dezactivat.",
|
||||
"2FA resetat": "2FA resetat",
|
||||
"5–8.5h/10": "5–8.5h/10",
|
||||
"> 0 calculează automat prețul client.": "> 0 auto-calculates client price.",
|
||||
"A1-03": "A1-03",
|
||||
"AGRNMD2X": "AGRNMD2X",
|
||||
@@ -599,6 +601,7 @@
|
||||
"Done": "Done",
|
||||
"Downgrade": "Downgrade",
|
||||
"Draft": "Draft",
|
||||
"Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.": "Drag-and-drop between cells to reschedule. Load indicator per cell (scheduled hours / capacity). Click empty cell → quick appointment. Click event → details.",
|
||||
"Drept": "Permission",
|
||||
"Drepturi": "Permissions",
|
||||
"Due at": "Due date",
|
||||
@@ -1969,6 +1972,8 @@
|
||||
"google": "Google",
|
||||
"h norm": "h norm",
|
||||
"h real": "h real",
|
||||
"h/zi": "h/day",
|
||||
"implicit": "default",
|
||||
"instagram": "Instagram",
|
||||
"jurnal": "log",
|
||||
"la fiecare request": "la fiecare request",
|
||||
|
||||
@@ -21,11 +21,13 @@
|
||||
"/api/v1/vehicles": "/api/v1/vehicles",
|
||||
"/api/v1/work-orders": "/api/v1/work-orders",
|
||||
"0 = dezactivat": "0 = dezactivat",
|
||||
"0–5h/10": "0–5ч/10",
|
||||
"1.15 = +15% peste prețul de bază. 0.95 = -5%.": "1.15 = +15% к базовой цене. 0.95 = −5%.",
|
||||
"123456:ABC-XYZ...": "123456:ABC-XYZ...",
|
||||
"2FA": "2FA",
|
||||
"2FA dezactivat.": "2FA dezactivat.",
|
||||
"2FA resetat": "2FA resetat",
|
||||
"5–8.5h/10": "5–8.5ч/10",
|
||||
"> 0 calculează automat prețul client.": "> 0 автоматически рассчитывает цену клиента.",
|
||||
"A1-03": "A1-03",
|
||||
"AGRNMD2X": "AGRNMD2X",
|
||||
@@ -599,6 +601,7 @@
|
||||
"Done": "Готово",
|
||||
"Downgrade": "Понижение",
|
||||
"Draft": "Черновик",
|
||||
"Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.": "Drag-and-drop между ячейками для перепланирования. Индикатор загрузки в каждой ячейке (запланированные часы / загрузка). Клик на пустую ячейку → быстрая запись. Клик на событие → детали.",
|
||||
"Drept": "Право",
|
||||
"Drepturi": "Права",
|
||||
"Due at": "Срок",
|
||||
@@ -1969,6 +1972,8 @@
|
||||
"google": "Google",
|
||||
"h norm": " ч норм",
|
||||
"h real": " ч факт",
|
||||
"h/zi": "ч/день",
|
||||
"implicit": "по умолчанию",
|
||||
"instagram": "Instagram",
|
||||
"jurnal": "журнал",
|
||||
"la fiecare request": "la fiecare request",
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
|
||||
<div class="cv-notes">
|
||||
<strong>{{ __('⚙ Cum funcționează:') }}</strong>
|
||||
{{ __('Matricea') }} <strong>{{ $groupBy === 'post' ? 'Pod' : 'Mecanic' }} × Zile</strong>{{ __('. Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore_planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.') }}
|
||||
{{ __('Matricea') }} <strong>{{ $groupBy === 'post' ? __('Pod') : __('Mecanic') }} × {{ __('Zile') }}</strong>. {{ __('Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.') }}
|
||||
</div>
|
||||
|
||||
@if ($viewMode === 'list')
|
||||
@@ -353,8 +353,8 @@
|
||||
<div>
|
||||
<div class="cv-legend-col">{{ __('Încărcare celulă') }}</div>
|
||||
<div class="cv-legend-items">
|
||||
<div class="cv-legend-item"><span class="cv-load" style="position:static;">0–5h/10</span> {{ __('liber/ușor') }}</div>
|
||||
<div class="cv-legend-item"><span class="cv-load warn" style="position:static;">5–8.5h/10</span> {{ __('mediu') }}</div>
|
||||
<div class="cv-legend-item"><span class="cv-load" style="position:static;">{{ __('0–5h/10') }}</span> {{ __('liber/ușor') }}</div>
|
||||
<div class="cv-legend-item"><span class="cv-load warn" style="position:static;">{{ __('5–8.5h/10') }}</span> {{ __('mediu') }}</div>
|
||||
<div class="cv-legend-item"><span class="cv-load full" style="position:static;">{{ __('≥9h/10') }}</span> {{ __('plin') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user