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:
+12
-7
@@ -10,26 +10,31 @@ class PriceHistoryRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'priceHistory';
|
||||
|
||||
protected static ?string $title = 'Istoric prețuri furnizori';
|
||||
protected static ?string $title = null;
|
||||
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __('Istoric prețuri furnizori');
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('observed_at')
|
||||
->label('Data')
|
||||
->label(__('Data'))
|
||||
->dateTime('d.m.Y H:i')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('supplier.name')->label('Furnizor')->searchable(),
|
||||
Tables\Columns\TextColumn::make('purchase.number')->label('PO')->placeholder('—'),
|
||||
Tables\Columns\TextColumn::make('supplier.name')->label(__('Furnizor'))->searchable(),
|
||||
Tables\Columns\TextColumn::make('purchase.number')->label(__('PO'))->placeholder('—'),
|
||||
Tables\Columns\TextColumn::make('price')
|
||||
->money('MDL')
|
||||
->alignRight()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('currency')->label('Val.'),
|
||||
Tables\Columns\TextColumn::make('currency')->label(__('Val.')),
|
||||
])
|
||||
->defaultSort('observed_at', 'desc')
|
||||
->emptyStateHeading('Niciun preț înregistrat')
|
||||
->emptyStateDescription('Prețurile se înregistrează automat la fiecare recepție de PO.');
|
||||
->emptyStateHeading(__('Niciun preț înregistrat'))
|
||||
->emptyStateDescription(__('Prețurile se înregistrează automat la fiecare recepție de PO.'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user