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
@@ -17,7 +17,7 @@ class PendingPayments extends BaseWidget
public function table(Table $table): Table
{
return $table
->heading('Facturi pending / overdue')
->heading(__('Facturi pending / overdue'))
->query(
Subscription::query()
->whereIn('status', ['pending', 'overdue'])
@@ -27,10 +27,10 @@ class PendingPayments extends BaseWidget
)
->columns([
Tables\Columns\TextColumn::make('invoice_number')
->label('Factură')
->label(__('Factură'))
->copyable()
->url(fn ($record) => SubscriptionResource::getUrl('edit', ['record' => $record])),
Tables\Columns\TextColumn::make('company.name')->label('Companie'),
Tables\Columns\TextColumn::make('company.name')->label(__('Companie')),
Tables\Columns\TextColumn::make('plan.name')->placeholder('—'),
Tables\Columns\TextColumn::make('amount')->money(fn ($record) => $record->currency)->weight('bold'),
Tables\Columns\TextColumn::make('status')
@@ -38,11 +38,11 @@ class PendingPayments extends BaseWidget
->color(fn ($s) => $s === 'overdue' ? 'danger' : 'warning')
->formatStateUsing(fn ($s) => Subscription::STATUSES[$s] ?? $s),
Tables\Columns\TextColumn::make('due_at')
->label('Scadent')
->label(__('Scadent'))
->dateTime()
->color(fn ($record) => $record->due_at && $record->due_at->isPast() ? 'danger' : null),
])
->emptyStateHeading('🎉 Toate facturile sunt plătite')
->emptyStateHeading(__('🎉 Toate facturile sunt plătite'))
->paginated(false);
}
}
@@ -39,7 +39,7 @@ class PlatformStats extends BaseWidget
->color('primary')
->url(\App\Filament\Central\Resources\CompanyResource::getUrl('index')),
Stat::make('Active', $active)
->description("✓ Pe abonament plătit")
->description(__("✓ Pe abonament plătit"))
->descriptionIcon('heroicon-m-check-circle')
->color('success'),
Stat::make('În trial', $trial)
@@ -51,7 +51,7 @@ class PlatformStats extends BaseWidget
->descriptionIcon('heroicon-m-exclamation-triangle')
->color($expiring > 0 ? 'danger' : 'success'),
Stat::make('Venit luna curentă', number_format($mrr, 0, ',', ' ') . ' MDL')
->description('MRR realizat')
->description(__('MRR realizat'))
->descriptionIcon('heroicon-m-banknotes')
->color('success'),
Stat::make('Facturi neplătite', $overdue)
@@ -17,7 +17,7 @@ class RecentTenants extends BaseWidget
public function table(Table $table): Table
{
return $table
->heading('Tenants recenți')
->heading(__('Tenants recenți'))
->query(Company::query()->latest()->limit(8))
->columns([
Tables\Columns\TextColumn::make('slug')
@@ -33,8 +33,8 @@ class RecentTenants extends BaseWidget
default => 'gray',
}),
Tables\Columns\TextColumn::make('plan.name')->placeholder('—'),
Tables\Columns\TextColumn::make('users_count')->counts('users')->label('Useri'),
Tables\Columns\TextColumn::make('created_at')->label('Creat')->since(),
Tables\Columns\TextColumn::make('users_count')->counts('users')->label(__('Useri')),
Tables\Columns\TextColumn::make('created_at')->label(__('Creat'))->since(),
])
->paginated(false);
}