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
+13 -8
View File
@@ -27,7 +27,12 @@ class CalendarBoard extends Page
protected static ?int $navigationSort = 8;
protected static ?string $title = 'Calendar vizual';
protected static ?string $title = null;
public function getTitle(): string
{
return __('Calendar vizual');
}
protected string $view = 'filament.tenant.pages.calendar';
@@ -290,7 +295,7 @@ class CalendarBoard extends Page
}
$a->date = $toDate;
$a->save();
Notification::make()->title('Programare mutată')->body($a->title . ' → ' . $toDate)->success()->send();
Notification::make()->title(__('Programare mutată'))->body($a->title . ' → ' . $toDate)->success()->send();
}
public function openEvent(int $id): void
@@ -330,7 +335,7 @@ class CalendarBoard extends Page
{
Appointment::where('id', $id)->delete();
$this->openEventId = null;
Notification::make()->title('Programare ștearsă')->success()->send();
Notification::make()->title(__('Programare ștearsă'))->success()->send();
}
public function openNewForm(int $rowId = 0, string $date = ''): void
@@ -372,7 +377,7 @@ class CalendarBoard extends Page
{
$name = trim($this->newPost['name'] ?? '');
if ($name === '') {
Notification::make()->title('Numele este obligatoriu')->danger()->send();
Notification::make()->title(__('Numele este obligatoriu'))->danger()->send();
return;
}
Post::create([
@@ -384,7 +389,7 @@ class CalendarBoard extends Page
'sort_order' => 100,
]);
$this->showNewPostForm = false;
Notification::make()->title('Spațiu de lucru adăugat')->success()->send();
Notification::make()->title(__('Spațiu de lucru adăugat'))->success()->send();
}
/** Inline rename + reassign default master from row label click. */
@@ -409,7 +414,7 @@ class CalendarBoard extends Page
'default_master_id' => $this->renamingPostMasterId ?: null,
]);
$this->renamingPostId = null;
Notification::make()->title('Post actualizat')->success()->send();
Notification::make()->title(__('Post actualizat'))->success()->send();
}
/** Generate PDF for all appointments in the visible period. */
@@ -467,7 +472,7 @@ class CalendarBoard extends Page
{
$d = $this->newAppt;
if (empty($d['title']) || empty($d['date'])) {
Notification::make()->title('Subiect și data sunt obligatorii')->danger()->send();
Notification::make()->title(__('Subiect și data sunt obligatorii'))->danger()->send();
return;
}
Appointment::create([
@@ -483,7 +488,7 @@ class CalendarBoard extends Page
'status' => 'scheduled',
]);
$this->showNewForm = false;
Notification::make()->title('Programare adăugată')->success()->send();
Notification::make()->title(__('Programare adăugată'))->success()->send();
}
public function getMasterOptions(): array