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:
@@ -25,13 +25,13 @@ class LowStockTable extends BaseWidget
|
||||
->orderBy('qty')
|
||||
)
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('name')->label('Piesă')->wrap()->searchable(),
|
||||
Tables\Columns\TextColumn::make('article')->label('Cod')->placeholder('—'),
|
||||
Tables\Columns\TextColumn::make('qty')->label('Stoc')->alignRight()
|
||||
Tables\Columns\TextColumn::make('name')->label(__('Piesă'))->wrap()->searchable(),
|
||||
Tables\Columns\TextColumn::make('article')->label(__('Cod'))->placeholder('—'),
|
||||
Tables\Columns\TextColumn::make('qty')->label(__('Stoc'))->alignRight()
|
||||
->color(fn ($state) => $state <= 0 ? 'danger' : 'warning')
|
||||
->weight('bold'),
|
||||
Tables\Columns\TextColumn::make('min_qty')->label('Min.')->alignRight(),
|
||||
Tables\Columns\TextColumn::make('preferredSupplier.name')->label('Furnizor')->placeholder('—'),
|
||||
Tables\Columns\TextColumn::make('min_qty')->label(__('Min.'))->alignRight(),
|
||||
Tables\Columns\TextColumn::make('preferredSupplier.name')->label(__('Furnizor'))->placeholder('—'),
|
||||
])
|
||||
->paginated(false)
|
||||
->defaultSort('qty');
|
||||
|
||||
@@ -22,22 +22,22 @@ class StatsOverview extends BaseWidget
|
||||
|
||||
return [
|
||||
Stat::make('Clienți', Client::count())
|
||||
->description('Total în baza de date')
|
||||
->description(__('Total în baza de date'))
|
||||
->icon('heroicon-o-users')
|
||||
->color('primary'),
|
||||
|
||||
Stat::make('Mașini', Vehicle::count())
|
||||
->description('Total înregistrate')
|
||||
->description(__('Total înregistrate'))
|
||||
->icon('heroicon-o-truck')
|
||||
->color('info'),
|
||||
|
||||
Stat::make('Cereri noi', $newLeads)
|
||||
->description('De procesat')
|
||||
->description(__('De procesat'))
|
||||
->icon('heroicon-o-inbox-arrow-down')
|
||||
->color($newLeads > 0 ? 'warning' : 'success'),
|
||||
|
||||
Stat::make('Deal-uri active', $openDeals)
|
||||
->description('În pipeline')
|
||||
->description(__('În pipeline'))
|
||||
->icon('heroicon-o-funnel')
|
||||
->color('primary'),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user