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
@@ -23,7 +23,12 @@ class ApiTokens extends Page
protected static ?int $navigationSort = 95;
protected static ?string $title = 'API Tokens';
protected static ?string $title = null;
public function getTitle(): string
{
return __('API Tokens');
}
protected string $view = 'filament.tenant.pages.api-tokens';
@@ -46,13 +51,13 @@ class ApiTokens extends Page
{
return [
Actions\Action::make('create')
->label('Generează token')
->label(__('Generează token'))
->icon('heroicon-m-plus')
->schema([
Forms\Components\TextInput::make('name')
->label('Nume (descriere)')
->label(__('Nume (descriere)'))
->required()
->placeholder('ex: app-mobil, integrare-erp'),
->placeholder(__('ex: app-mobil, integrare-erp')),
])
->action(function (array $data) {
$u = auth()->user();
@@ -60,8 +65,8 @@ class ApiTokens extends Page
$token = $u->createToken($data['name']);
$this->newToken = $token->plainTextToken;
Notification::make()
->title('Token generat!')
->body('Copiază token-ul ACUM — nu va mai fi afișat.')
->title(__('Token generat!'))
->body(__('Copiază token-ul ACUM — nu va mai fi afișat.'))
->success()
->persistent()
->send();