i18n(work-order works): translate labor Select category + h suffix + modal titles
- Labor Select options now build '[__(category)] name_ro (hours __(h))'
so category chip and hour suffix translate on RU/EN. Labor name stays
as name_ro (user data — separate long-term concern).
- CreateAction gets explicit label + modalHeading (was 'Create Work
Order Work' auto-generated).
- Notification 'Piese implicite adăugate (N)' rewritten with __(':n')
placeholder.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -31,7 +31,7 @@ class WorksRelationManager extends RelationManager
|
||||
->label(__('Catalog manoperă'))
|
||||
->options(fn () => Labor::where('is_active', true)
|
||||
->get()
|
||||
->mapWithKeys(fn ($l) => [$l->id => "[{$l->category}] {$l->name_ro} ({$l->hours}h)"])
|
||||
->mapWithKeys(fn ($l) => [$l->id => '[' . __($l->category) . '] ' . $l->name_ro . ' (' . $l->hours . __('h') . ')'])
|
||||
->toArray())
|
||||
->searchable()
|
||||
->live()
|
||||
@@ -95,6 +95,8 @@ class WorksRelationManager extends RelationManager
|
||||
])
|
||||
->headerActions([
|
||||
Actions\CreateAction::make()
|
||||
->label(__('Adaugă manoperă'))
|
||||
->modalHeading(__('Adaugă manoperă în fișă'))
|
||||
->after(function (WorkOrderWork $record) {
|
||||
// Auto-add the labor's default parts to the parent WO.
|
||||
if (! $record->labor_id) return;
|
||||
@@ -108,7 +110,7 @@ class WorksRelationManager extends RelationManager
|
||||
}
|
||||
}
|
||||
\Filament\Notifications\Notification::make()
|
||||
->title('Piese implicite adăugate (' . $labor->laborParts->count() . ')')
|
||||
->title(__('Piese implicite adăugate (:n)', ['n' => $labor->laborParts->count()]))
|
||||
->success()->send();
|
||||
}),
|
||||
])
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
"Adaugă header": "Add header",
|
||||
"Adaugă imagine": "Add image",
|
||||
"Adaugă manopere și piese care se aplică împreună când selectezi acest șablon pe o fișă.": "Add labors and parts applied together when selecting this template on an order.",
|
||||
"Adaugă manoperă": "Add labor",
|
||||
"Adaugă manoperă în fișă": "Add labor to order",
|
||||
"Adaugă mașini manual sau importă din CSV. Folosește VIN-căutare pentru decoder rapid și completare automată brand/model/an.": "Add vehicles manually or import from CSV. Use VIN search for quick decode and auto-fill of brand/model/year.",
|
||||
"Adaugă mașină": "Add vehicle",
|
||||
"Adaugă notă": "Add note",
|
||||
@@ -1418,6 +1420,7 @@
|
||||
"Piese (vânzare)": "Parts (sales)",
|
||||
"Piese impl.": "Default parts",
|
||||
"Piese implicite": "Default parts",
|
||||
"Piese implicite adăugate (:n)": "Default parts added (:n)",
|
||||
"Piese în stoc": "Piese în stoc",
|
||||
"Piesă": "Part",
|
||||
"Piesă din catalog": "Part from catalog",
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
"Adaugă header": "Добавить заголовок",
|
||||
"Adaugă imagine": "Добавить изображение",
|
||||
"Adaugă manopere și piese care se aplică împreună când selectezi acest șablon pe o fișă.": "Добавьте работы и запчасти, которые применяются вместе при выборе этого шаблона в наряде.",
|
||||
"Adaugă manoperă": "Добавить работу",
|
||||
"Adaugă manoperă în fișă": "Добавить работу в наряд",
|
||||
"Adaugă mașini manual sau importă din CSV. Folosește VIN-căutare pentru decoder rapid și completare automată brand/model/an.": "Добавляйте авто вручную или импортируйте из CSV. Используйте поиск VIN для быстрого декодера и авто-заполнения марка/модель/год.",
|
||||
"Adaugă mașină": "Добавить авто",
|
||||
"Adaugă notă": "Добавить заметку",
|
||||
@@ -1418,6 +1420,7 @@
|
||||
"Piese (vânzare)": "Запчасти (продажа)",
|
||||
"Piese impl.": "Запчасти",
|
||||
"Piese implicite": "Запчасти по умолчанию",
|
||||
"Piese implicite adăugate (:n)": "Добавлены запчасти по умолчанию (:n)",
|
||||
"Piese în stoc": "Piese în stoc",
|
||||
"Piesă": "Запчасть",
|
||||
"Piesă din catalog": "Запчасть из каталога",
|
||||
|
||||
Reference in New Issue
Block a user