feat(i18n): fix widgets, pipeline & mechanic boards + missing translations
Follow-up to previous i18n pass — user reported many visible RO strings on
EN/RU locales because auto-wrap missed:
- Stat::make() first-arg labels in StatsOverview, FinanceOverview, PlatformStats
- $heading static in LowStockTable (converted to getHeading() method)
- Pipeline board Blade view: 40+ literal strings wrapped with {{ __() }}
- Mechanic board Blade view: statuses, buttons, block modal
- PipelineBoard.php hardcoded tag labels, stage labels, notify strings
- MechanicBoard.php confirmBlock notification
Added human RU + EN translations for the visible strings shown in the
screenshots (dashboard widgets, Client/Vehicle list breadcrumbs & columns,
pipeline board topbar/stats/filters/cards/detail panel/quick actions,
mechanic board stats/statuses/block modal). All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,20 +30,20 @@ class FinanceOverview extends BaseWidget
|
||||
$debt = max(0, $debtTotal - $paidOnDebt);
|
||||
|
||||
return [
|
||||
Stat::make('Încasări (luna)', number_format($income, 2, '.', ' ') . ' MDL')
|
||||
Stat::make(__('Încasări (luna)'), number_format($income, 2, '.', ' ') . ' MDL')
|
||||
->icon('heroicon-o-arrow-trending-up')
|
||||
->color('success')
|
||||
->description(now()->translatedFormat('F Y')),
|
||||
|
||||
Stat::make('Cheltuieli (luna)', number_format($expenses, 2, '.', ' ') . ' MDL')
|
||||
Stat::make(__('Cheltuieli (luna)'), number_format($expenses, 2, '.', ' ') . ' MDL')
|
||||
->icon('heroicon-o-arrow-trending-down')
|
||||
->color('danger'),
|
||||
|
||||
Stat::make('Profit (luna)', number_format($profit, 2, '.', ' ') . ' MDL')
|
||||
Stat::make(__('Profit (luna)'), number_format($profit, 2, '.', ' ') . ' MDL')
|
||||
->icon('heroicon-o-banknotes')
|
||||
->color($profit >= 0 ? 'success' : 'danger'),
|
||||
|
||||
Stat::make('Datorii clienți', number_format($debt, 2, '.', ' ') . ' MDL')
|
||||
Stat::make(__('Datorii clienți'), number_format($debt, 2, '.', ' ') . ' MDL')
|
||||
->icon('heroicon-o-exclamation-circle')
|
||||
->color($debt > 0 ? 'warning' : 'success'),
|
||||
];
|
||||
|
||||
@@ -13,7 +13,12 @@ class LowStockTable extends BaseWidget
|
||||
|
||||
protected int|string|array $columnSpan = 'full';
|
||||
|
||||
protected static ?string $heading = '⚠️ Stoc minim atins';
|
||||
protected static ?string $heading = null;
|
||||
|
||||
public function getHeading(): string
|
||||
{
|
||||
return '⚠️ ' . __('Stoc minim atins');
|
||||
}
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
|
||||
@@ -21,27 +21,27 @@ class StatsOverview extends BaseWidget
|
||||
$todayAppointments = Appointment::whereDate('date', today())->count();
|
||||
|
||||
return [
|
||||
Stat::make('Clienți', Client::count())
|
||||
Stat::make(__('Clienți'), Client::count())
|
||||
->description(__('Total în baza de date'))
|
||||
->icon('heroicon-o-users')
|
||||
->color('primary'),
|
||||
|
||||
Stat::make('Mașini', Vehicle::count())
|
||||
Stat::make(__('Mașini'), Vehicle::count())
|
||||
->description(__('Total înregistrate'))
|
||||
->icon('heroicon-o-truck')
|
||||
->color('info'),
|
||||
|
||||
Stat::make('Cereri noi', $newLeads)
|
||||
Stat::make(__('Cereri noi'), $newLeads)
|
||||
->description(__('De procesat'))
|
||||
->icon('heroicon-o-inbox-arrow-down')
|
||||
->color($newLeads > 0 ? 'warning' : 'success'),
|
||||
|
||||
Stat::make('Deal-uri active', $openDeals)
|
||||
Stat::make(__('Deal-uri active'), $openDeals)
|
||||
->description(__('În pipeline'))
|
||||
->icon('heroicon-o-funnel')
|
||||
->color('primary'),
|
||||
|
||||
Stat::make('Programări azi', $todayAppointments)
|
||||
Stat::make(__('Programări azi'), $todayAppointments)
|
||||
->description(today()->format('d.m.Y'))
|
||||
->icon('heroicon-o-calendar')
|
||||
->color('success'),
|
||||
|
||||
Reference in New Issue
Block a user