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
+11 -6
View File
@@ -28,7 +28,12 @@ class MechanicBoard extends Page
protected static ?int $navigationSort = 25;
protected static ?string $title = 'Atelierul meu';
protected static ?string $title = null;
public function getTitle(): string
{
return __('Atelierul meu');
}
protected string $view = 'filament.tenant.pages.mechanic-board';
@@ -46,25 +51,25 @@ class MechanicBoard extends Page
return [
[
'key' => 'in_work',
'label' => 'În lucru',
'label' => __('În lucru'),
'color' => '#f59e0b',
'items' => $all->where('status', 'in_work')->values(),
],
[
'key' => 'awaiting_parts',
'label' => 'Așteaptă piese',
'label' => __('Așteaptă piese'),
'color' => '#8b5cf6',
'items' => $all->whereIn('status', ['awaiting_parts'])->values(),
],
[
'key' => 'ready',
'label' => 'Gata',
'label' => __('Gata'),
'color' => '#10b981',
'items' => $all->where('status', 'ready')->values(),
],
[
'key' => 'recent',
'label' => 'Recente / restul',
'label' => __('Recente / restul'),
'color' => '#64748b',
'items' => $all->whereIn('status', ['done', 'approved', 'diagnosis'])
->take(20)
@@ -119,7 +124,7 @@ class MechanicBoard extends Page
return;
}
$work->block($this->blockReason, trim($this->blockNote) ?: null);
Notification::make()->title('Lucrare blocată')->body($work->name . ' · ' . WorkOrderWork::BLOCK_REASONS[$this->blockReason])->warning()->send();
Notification::make()->title(__('Lucrare blocată'))->body($work->name . ' · ' . WorkOrderWork::BLOCK_REASONS[$this->blockReason])->warning()->send();
$this->blockingWorkId = null;
}