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 -13
View File
@@ -46,22 +46,22 @@ class DealResource extends Resource
public static function form(Schema $schema): Schema
{
return $schema->components([
Schemas\Components\Section::make('Detalii')
Schemas\Components\Section::make(__('Detalii'))
->columns(2)
->schema([
Forms\Components\Select::make('client_id')
->label('Client')
->label(__('Client'))
->options(fn () => Client::pluck('name', 'id'))
->searchable()
->required(),
Forms\Components\Select::make('vehicle_id')
->label('Auto')
->label(__('Auto'))
->options(fn (Schemas\Components\Utilities\Get $get) => $get('client_id')
? Vehicle::where('client_id', $get('client_id'))->pluck('plate', 'id')
: [])
->searchable(),
Forms\Components\TextInput::make('name')->label('Subiect')->required()->maxLength(160),
Forms\Components\TextInput::make('price')->label('Valoare')->numeric()->default(0),
Forms\Components\TextInput::make('name')->label(__('Subiect'))->required()->maxLength(160),
Forms\Components\TextInput::make('price')->label(__('Valoare'))->numeric()->default(0),
Forms\Components\Select::make('stage')
->options(Deal::STAGES)
->default('new')
@@ -70,11 +70,11 @@ class DealResource extends Resource
->options(Lead::SOURCES)
->searchable(),
Forms\Components\Select::make('assigned_to')
->label('Responsabil')
->label(__('Responsabil'))
->options(fn () => User::pluck('name', 'id'))
->searchable(),
]),
Forms\Components\Textarea::make('note')->label('Notițe')->columnSpanFull()->rows(3),
Forms\Components\Textarea::make('note')->label(__('Notițe'))->columnSpanFull()->rows(3),
]);
}
@@ -83,9 +83,9 @@ class DealResource extends Resource
return $table
->columns([
Tables\Columns\TextColumn::make('id')->label('#')->sortable(),
Tables\Columns\TextColumn::make('name')->label('Subiect')->searchable()->limit(40),
Tables\Columns\TextColumn::make('client.name')->label('Client')->searchable(),
Tables\Columns\TextColumn::make('vehicle.plate')->label('Auto')->placeholder('—'),
Tables\Columns\TextColumn::make('name')->label(__('Subiect'))->searchable()->limit(40),
Tables\Columns\TextColumn::make('client.name')->label(__('Client'))->searchable(),
Tables\Columns\TextColumn::make('vehicle.plate')->label(__('Auto'))->placeholder('—'),
Tables\Columns\TextColumn::make('stage')
->formatStateUsing(fn ($state) => Deal::STAGES[$state] ?? $state)
->badge()
@@ -97,14 +97,14 @@ class DealResource extends Resource
'danger' => ['lost'],
]),
Tables\Columns\TextColumn::make('price')->money('MDL')->sortable(),
Tables\Columns\TextColumn::make('source')->label('Sursă')->formatStateUsing(fn ($state) => Lead::SOURCES[$state] ?? $state)->placeholder('—'),
Tables\Columns\TextColumn::make('assignedTo.name')->label('Responsabil')->placeholder('—'),
Tables\Columns\TextColumn::make('source')->label(__('Sursă'))->formatStateUsing(fn ($state) => Lead::SOURCES[$state] ?? $state)->placeholder('—'),
Tables\Columns\TextColumn::make('assignedTo.name')->label(__('Responsabil'))->placeholder('—'),
Tables\Columns\TextColumn::make('created_at')->date()->sortable(),
])
->filters([
Tables\Filters\SelectFilter::make('stage')->options(Deal::STAGES),
Tables\Filters\SelectFilter::make('assigned_to')
->label('Responsabil')
->label(__('Responsabil'))
->options(fn () => User::pluck('name', 'id')),
])
->actions([