feat(i18n): wrap 1103 hardcoded UI strings across Filament with __()

- Convert static $modelLabel/$pluralModelLabel/$title to getter methods
- Wrap ->label()/->placeholder()/->helperText()/->description()/->title()/->body() args
- Wrap Section::make()/Fieldset::make()/Notification::make()->title() args
- Fix RelationManagers::getTitle() signature to match parent (Model, string)
- Fix Pages::getTitle() to instance method (BasePage::getTitle is non-static)
- Extend lang/ru.json + lang/en.json with 700+ common terms; identity fallback for the rest
- Remove duplicate getters in 5 resources that had manual getModelLabel already

All 306 tests pass. Missing translations fall back to the RO key so the UI never breaks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 05:04:24 +00:00
parent 78ff8d4b43
commit f7fc69077b
83 changed files with 4212 additions and 1251 deletions
@@ -33,12 +33,12 @@ class EditWorkOrder extends EditRecord
{
return [
Actions\Action::make('apply_template')
->label('Aplică șablon')
->label(__('Aplică șablon'))
->icon('heroicon-m-clipboard-document-list')
->color('gray')
->schema([
\Filament\Forms\Components\Select::make('template_id')
->label('Șablon serviciu')
->label(__('Șablon serviciu'))
->options(fn () => \App\Models\Tenant\ServiceTemplate::where('is_active', true)->pluck('name', 'id'))
->searchable()
->required(),
@@ -53,11 +53,11 @@ class EditWorkOrder extends EditRecord
->success()->send();
}),
Actions\Action::make('ai_diagnose')
->label('AI: sugerează diagnostic')
->label(__('AI: sugerează diagnostic'))
->icon('heroicon-m-sparkles')
->color('primary')
->visible(fn () => ! empty($this->record->complaint))
->modalHeading('Diagnostic AI bazat pe plângerea clientului')
->modalHeading(__('Diagnostic AI bazat pe plângerea clientului'))
->modalSubmitAction(false)
->modalCancelActionLabel('Închide')
->modalContent(function () {
@@ -66,7 +66,7 @@ class EditWorkOrder extends EditRecord
return view('filament.tenant.ai-reply', ['reply' => $reply, 'meta' => $meta]);
}),
Actions\Action::make('tracking')
->label('Link client (QR)')
->label(__('Link client (QR)'))
->icon('heroicon-m-qr-code')
->color('primary')
->modalHeading(fn () => 'Tracking client — WO #' . $this->record->number)
@@ -76,7 +76,7 @@ class EditWorkOrder extends EditRecord
'wo' => $this->record,
])),
Actions\Action::make('pdf')
->label('Descarcă PDF')
->label(__('Descarcă PDF'))
->icon('heroicon-m-document-arrow-down')
->color('gray')
->action(function () {