feat(i18n): mega-wrap 494 raw RO strings + 269 lang entries + 161 human RU/163 EN

Broad sweep across the whole codebase:
- Blade views (39 files, 315 wraps): tag-text and title/placeholder/alt
  attributes wrapped with {{ __() }}. Excludes scripts, styles, @php,
  @verbatim, {{ }}, {!! !!}, comments to avoid touching interpolations.
- PHP (54 files, 179 wraps): array 'key' => 'RO value' patterns and
  list items with diacritics wrapped with __(). Reverted __() inside
  const arrays (PHP disallows non-constant expressions).
- Added 269 new keys to lang/{ru,en}.json (identity fallback for
  unknowns → 161 human RU + 163 EN translations added for the most
  common enums, stages, roles, statuses, payment methods, vehicle
  categories, warehouse, portal, form actions.

Missing translations fall back to RO so the UI never breaks. All 306
tests pass; view cache compiles cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 05:53:22 +00:00
parent 2d447e6294
commit 3911012c65
68 changed files with 1211 additions and 429 deletions
@@ -71,7 +71,7 @@ class CompanyResource extends Resource
Forms\Components\Select::make('status')
->options([
'trial' => 'Trial',
'active' => 'Activ',
'active' => __('Activ'),
'expired' => 'Expirat',
'suspended' => 'Suspendat',
'archived' => 'Arhivat',
@@ -136,7 +136,7 @@ class CompanyResource extends Resource
])
->filters([
Tables\Filters\SelectFilter::make('status')->options([
'trial' => 'Trial', 'active' => 'Activ', 'expired' => 'Expirat',
'trial' => 'Trial', 'active' => __('Activ'), 'expired' => 'Expirat',
'suspended' => 'Suspendat', 'archived' => 'Arhivat',
]),
])
@@ -81,7 +81,7 @@ class SuperAdminResource extends Resource
'owner' => 'Proprietar',
'admin' => 'Administrator',
'support' => 'Suport',
'sales' => 'Vânzări',
'sales' => __('Vânzări'),
'finance' => 'Financiar',
default => $s,
})
+2 -2
View File
@@ -51,7 +51,7 @@ class AiAssistant extends Page
$chat = AiChat::create([
'company_id' => $companyId,
'user_id' => $userId,
'title' => 'Conversație nouă',
'title' => __('Conversație nouă'),
'provider' => $this->defaultProvider(),
]);
}
@@ -81,7 +81,7 @@ class AiAssistant extends Page
$chat = AiChat::create([
'company_id' => app(TenantManager::class)->currentId(),
'user_id' => auth()->id(),
'title' => 'Conversație nouă',
'title' => __('Conversație nouă'),
'provider' => $this->defaultProvider(),
]);
$this->chatId = $chat->id;
+2 -2
View File
@@ -118,7 +118,7 @@ class CalendarBoard extends Page
public function getDays(): array
{
$today = Carbon::today()->toDateString();
$names = ['Luni', 'Marți', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă', 'Duminică'];
$names = ['Luni', __('Marți'), 'Miercuri', 'Joi', 'Vineri', __('Sâmbătă'), __('Duminică')];
$start = Carbon::parse($this->weekStart);
$count = match ($this->viewMode) {
@@ -173,7 +173,7 @@ class CalendarBoard extends Page
'capacity_hours' => 8.0,
])->all();
// Always include "Fără maistru" row at the bottom
$rows[] = ['kind' => 'master', 'id' => 0, 'name' => 'Fără maistru', 'color' => '#94a3b8', 'meta' => '—', 'capacity_hours' => 0];
$rows[] = ['kind' => 'master', 'id' => 0, 'name' => __('Fără maistru'), 'color' => '#94a3b8', 'meta' => '—', 'capacity_hours' => 0];
return $rows;
}
+3 -3
View File
@@ -48,15 +48,15 @@ class Finance extends Page
'overview' => '📊 Overview',
'cashflow' => '💸 Cashflow',
'pnl' => '📈 P&L',
'balance' => '⚖️ Balanță',
'balance' => __('⚖️ Balanță'),
];
}
public function periods(): array
{
return [
'this_month' => 'Luna curentă',
'last_month' => 'Luna trecută',
'this_month' => __('Luna curentă'),
'last_month' => __('Luna trecută'),
'this_year' => 'Anul curent',
'last_30' => 'Ultimele 30 zile',
];
+6 -6
View File
@@ -69,7 +69,7 @@ class Integrations extends Page
'name' => 'Telegram Bot',
'icon' => '✈️',
'color' => '#229ED9',
'description' => 'Primește cereri din canalul Telegram + trimite confirmări automate.',
'description' => __('Primește cereri din canalul Telegram + trimite confirmări automate.'),
'fields' => [
'bot_token' => ['label' => 'Bot Token', 'type' => 'password', 'placeholder' => 'din @BotFather'],
'chat_id' => ['label' => 'Channel/Chat ID', 'type' => 'text', 'placeholder' => '@psauto_md'],
@@ -79,7 +79,7 @@ class Integrations extends Page
'name' => 'WhatsApp Business',
'icon' => '💬',
'color' => '#25D366',
'description' => 'Trimite mesaje template către clienți (programări, confirmări).',
'description' => __('Trimite mesaje template către clienți (programări, confirmări).'),
'fields' => [
'phone_id' => ['label' => 'Phone Number ID', 'type' => 'text'],
'token' => ['label' => 'Permanent Access Token', 'type' => 'password'],
@@ -99,7 +99,7 @@ class Integrations extends Page
'name' => 'Facebook / Instagram Lead Ads',
'icon' => '📘',
'color' => '#1877F2',
'description' => 'Importă lead-uri direct din Lead Ads forms.',
'description' => __('Importă lead-uri direct din Lead Ads forms.'),
'fields' => [
'page_id' => ['label' => 'Page ID', 'type' => 'text'],
'access_token' => ['label' => 'Access Token', 'type' => 'password'],
@@ -109,7 +109,7 @@ class Integrations extends Page
'name' => 'SMS Gateway',
'icon' => '📱',
'color' => '#6366F1',
'description' => 'Trimite SMS-uri prin gateway local (Moldcell/Orange API).',
'description' => __('Trimite SMS-uri prin gateway local (Moldcell/Orange API).'),
'fields' => [
'provider' => ['label' => 'Provider', 'type' => 'text', 'placeholder' => 'moldcell / orange / twilio'],
'api_key' => ['label' => 'API Key', 'type' => 'password'],
@@ -117,10 +117,10 @@ class Integrations extends Page
],
],
'webhook_in' => [
'name' => 'Webhook intrări (formulare site)',
'name' => __('Webhook intrări (formulare site)'),
'icon' => '🪝',
'color' => '#8B5CF6',
'description' => 'URL secret pentru POST direct cu lead-uri din site-ul tău.',
'description' => __('URL secret pentru POST direct cu lead-uri din site-ul tău.'),
'fields' => [
'secret' => ['label' => 'Secret token', 'type' => 'text', 'placeholder' => 'random string'],
],
+3 -3
View File
@@ -75,9 +75,9 @@ class Onboarding extends Page
'MDL' => 'MDL — Leu moldovenesc',
'EUR' => 'EUR — Euro',
'USD' => 'USD — US Dollar',
'RON' => 'RON — Leu românesc',
'RON' => __('RON — Leu românesc'),
'UAH' => 'UAH — Hryvnia',
'RUB' => 'RUB — Rublă',
'RUB' => __('RUB — Rublă'),
])
->default('MDL')
->required()
@@ -89,7 +89,7 @@ class Onboarding extends Page
->schema([
Forms\Components\Select::make('language')
->label(__('Limbă'))
->options(['ro' => 'Română', 'ru' => 'Русский', 'en' => 'English'])
->options(['ro' => __('Română'), 'ru' => 'Русский', 'en' => 'English'])
->required(),
Forms\Components\ColorPicker::make('theme_color')
->label(__('Culoare brand')),
+4 -4
View File
@@ -624,7 +624,7 @@ class PipelineBoard extends Page
'Telefon' => $lead->phone,
'Email' => $lead->email,
'Automobil' => trim(($lead->car ?: '') . ' ' . ($lead->model ?: '')),
'Sursă' => Lead::SOURCES[$lead->source] ?? $lead->source,
__('Sursă') => Lead::SOURCES[$lead->source] ?? $lead->source,
'Buget estimat' => $lead->budget ? number_format($lead->budget, 0, '.', ' ') . ' MDL' : null,
],
'note' => $lead->message ?? $lead->notes,
@@ -651,9 +651,9 @@ class PipelineBoard extends Page
'Client' => $deal->client?->name,
'Telefon' => $deal->client?->phone,
'Automobil' => trim(($deal->vehicle?->make ?? '') . ' ' . ($deal->vehicle?->model ?? '') . ' · ' . ($deal->vehicle?->plate ?? '')),
'Sursă' => $deal->source ? (Lead::SOURCES[$deal->source] ?? $deal->source) : null,
__('Sursă') => $deal->source ? (Lead::SOURCES[$deal->source] ?? $deal->source) : null,
'Responsabil' => $deal->assignedTo?->name,
'Sumă' => number_format($deal->price, 0, '.', ' ') . ' MDL',
__('Sumă') => number_format($deal->price, 0, '.', ' ') . ' MDL',
],
'note' => $deal->note,
'activity' => $this->loadActivity($deal),
@@ -682,7 +682,7 @@ class PipelineBoard extends Page
'Telefon' => $wo->client?->phone,
'Automobil' => trim(($wo->vehicle?->make ?? '') . ' · ' . ($wo->vehicle?->plate ?? '')),
'Responsabil' => $wo->master?->name,
'Sumă' => number_format($wo->total, 0, '.', ' ') . ' MDL',
__('Sumă') => number_format($wo->total, 0, '.', ' ') . ' MDL',
'De achitat' => number_format(max(0, $balanceDue), 0, '.', ' ') . ' MDL',
],
'note' => $wo->diagnosis ?: $wo->complaint,
+7 -7
View File
@@ -58,10 +58,10 @@ class Reports extends Page
public function periods(): array
{
return [
'today' => 'Astăzi',
'this_week' => 'Săptămâna curentă',
'this_month' => 'Luna curentă',
'last_month' => 'Luna trecută',
'today' => __('Astăzi'),
'this_week' => __('Săptămâna curentă'),
'this_month' => __('Luna curentă'),
'last_month' => __('Luna trecută'),
'this_year' => 'Anul curent',
];
}
@@ -69,12 +69,12 @@ class Reports extends Page
public function tabs(): array
{
return [
'finance' => '💰 Finanțe',
'workload' => '📊 Încărcare',
'finance' => __('💰 Finanțe'),
'workload' => __('📊 Încărcare'),
'masters' => '👨‍🔧 Mecanici',
'works' => '🔧 Manopere top',
'parts' => '📦 Piese',
'clients' => '👥 Clienți',
'clients' => __('👥 Clienți'),
];
}
+4 -4
View File
@@ -99,7 +99,7 @@ class Settings extends Page
->schema([
Forms\Components\Select::make('language')
->label(__('Limbă default'))
->options(['ro' => 'Română', 'ru' => 'Русский', 'en' => 'English'])
->options(['ro' => __('Română'), 'ru' => 'Русский', 'en' => 'English'])
->required(),
Forms\Components\Select::make('currency')
->label(__('Monedă'))
@@ -107,9 +107,9 @@ class Settings extends Page
'MDL' => 'MDL — Leu moldovenesc',
'EUR' => 'EUR — Euro',
'USD' => 'USD — US Dollar',
'RON' => 'RON — Leu românesc',
'RON' => __('RON — Leu românesc'),
'UAH' => 'UAH — Hryvnia',
'RUB' => 'RUB — Rublă',
'RUB' => __('RUB — Rublă'),
])
->required()
->searchable(),
@@ -339,7 +339,7 @@ class Settings extends Page
$r = $svc->sendToUser(
(int) auth()->id(),
'Test AutoCRM',
'Notificările push funcționează ✅',
__('Notificările push funcționează ✅'),
'/app',
);
Notification::make()
+1 -1
View File
@@ -81,7 +81,7 @@ class Workload extends Page
// Same for appointments without post (drop them on a virtual "—" row).
$unposted = $appts->keys()->filter(fn ($k) => str_starts_with($k, '|'));
if ($unposted->isNotEmpty()) {
$matrix[0] = ['post' => (object) ['id' => 0, 'name' => '— fără pod —', 'color' => '#9ca3af'], 'days' => []];
$matrix[0] = ['post' => (object) ['id' => 0, 'name' => __('— fără pod —'), 'color' => '#9ca3af'], 'days' => []];
foreach ($days as $d) {
$key = '|' . $d->format('Y-m-d');
$items = $appts->get($key, collect());
@@ -53,7 +53,7 @@ class ActivityResource extends Resource
->colors([
'success' => ['creat'],
'info' => ['modificat'],
'danger' => ['șters'],
'danger' => [__('șters')],
'warning' => ['restaurat'],
]),
Tables\Columns\TextColumn::make('subject_type')
@@ -76,7 +76,7 @@ class ActivityResource extends Resource
->filters([
Tables\Filters\SelectFilter::make('description')
->label(__('Acțiune'))
->options(['creat' => 'creat', 'modificat' => 'modificat', 'șters' => 'șters']),
->options(['creat' => 'creat', 'modificat' => 'modificat', __('șters') => __('șters')]),
Tables\Filters\Filter::make('today')
->label(__('Astăzi'))
->query(fn ($q) => $q->whereDate('created_at', today())),
@@ -57,7 +57,7 @@ class ClientResource extends Resource
->schema([
Forms\Components\Select::make('type')
->label(__('Tip'))
->options(['individual' => 'Persoană fizică', 'company' => 'Persoană juridică'])
->options(['individual' => __('Persoană fizică'), 'company' => __('Persoană juridică')])
->default('individual')
->required()
->live(),
@@ -68,8 +68,8 @@ class ClientResource extends Resource
->maxLength(160),
Forms\Components\Select::make('status')
->options([
'new' => 'Nou', 'active' => 'Activ', 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => 'Blocat', 'lost' => 'Pierdut',
'new' => __('Nou'), 'active' => __('Activ'), 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => __('Blocat'), 'lost' => 'Pierdut',
])
->default('active')
->required(),
@@ -133,8 +133,8 @@ class ClientResource extends Resource
])
->filters([
Tables\Filters\SelectFilter::make('status')->options([
'new' => 'Nou', 'active' => 'Activ', 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => 'Blocat', 'lost' => 'Pierdut',
'new' => __('Nou'), 'active' => __('Activ'), 'vip' => 'VIP',
'debtor' => 'Datornic', 'blocked' => __('Blocat'), 'lost' => 'Pierdut',
]),
])
->actions([
@@ -54,7 +54,7 @@ class MasterResource extends Resource
Forms\Components\TextInput::make('phone')->label(__('Telefon'))->tel()->maxLength(40),
Forms\Components\TextInput::make('email')->label(__('Email'))->email()->maxLength(120),
Forms\Components\Select::make('status')
->options(['active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat'])
->options(['active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat')])
->default('active')
->required(),
]),
@@ -50,7 +50,7 @@ class PartResource extends Resource
{
return [
'Stoc' => (int) $record->stock . ' ' . ($record->unit ?? 'buc'),
'Preț' => number_format((float) $record->sell_price, 2),
__('Preț') => number_format((float) $record->sell_price, 2),
];
}
@@ -77,7 +77,7 @@ class TireSetResource extends Resource
Forms\Components\TextInput::make('model')->maxLength(64),
Forms\Components\TextInput::make('dot_year')->label(__('DOT'))->maxLength(8)->placeholder('3621'),
Forms\Components\Toggle::make('has_rims')->label(__('Cu jante')),
Forms\Components\Select::make('rim_type')->label(__('Tip jante'))->options(['steel' => 'Tablă', 'alloy' => 'Aliaj']),
Forms\Components\Select::make('rim_type')->label(__('Tip jante'))->options(['steel' => __('Tablă'), 'alloy' => 'Aliaj']),
Forms\Components\Select::make('condition')->label(__('Stare'))->options(TireSet::CONDITIONS),
]),
Schemas\Components\Section::make(__('Uzură (mm) per poziție'))
@@ -61,7 +61,7 @@ class UserResource extends Resource
Forms\Components\TextInput::make('email')->email()->required()->maxLength(120),
Forms\Components\TextInput::make('phone')->tel()->maxLength(40),
Forms\Components\Select::make('locale')
->options(['ro' => 'Română', 'ru' => 'Русский', 'en' => 'English'])
->options(['ro' => __('Română'), 'ru' => 'Русский', 'en' => 'English'])
->default('ro'),
]),
Schemas\Components\Section::make(__('Acces'))
@@ -74,7 +74,7 @@ class UserResource extends Resource
->default('mechanic')
->helperText(__('Rolul principal — sincronizat automat cu drepturile RBAC.')),
Forms\Components\Select::make('status')
->options(['active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat'])
->options(['active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat')])
->default('active')
->required(),
Forms\Components\TextInput::make('password')
@@ -170,11 +170,11 @@ class UserResource extends Resource
])
->filters([
Tables\Filters\SelectFilter::make('role')->options([
'admin' => 'Admin', 'manager' => 'Manager', 'receptionist' => 'Recepție',
'admin' => 'Admin', 'manager' => 'Manager', 'receptionist' => __('Recepție'),
'mechanic' => 'Mecanic', 'parts_manager' => 'Magazie', 'accountant' => 'Contabil', 'marketer' => 'Marketing',
]),
Tables\Filters\SelectFilter::make('status')->options([
'active' => 'Activ', 'inactive' => 'Inactiv', 'blocked' => 'Blocat',
'active' => __('Activ'), 'inactive' => __('Inactiv'), 'blocked' => __('Blocat'),
]),
])
->actions([
@@ -39,7 +39,7 @@ class PermissionOverridesRelationManager extends RelationManager
->columnSpanFull(),
Forms\Components\Select::make('mode')
->required()
->options(['grant' => 'GRANT — adaugă dreptul', 'deny' => 'DENY — interzice dreptul'])
->options(['grant' => __('GRANT — adaugă dreptul'), 'deny' => 'DENY — interzice dreptul'])
->default('grant'),
Forms\Components\DatePicker::make('expires_at')
->label(__('Expiră la (opțional)'))
@@ -82,7 +82,7 @@ class VehicleResource extends Resource
Forms\Components\TextInput::make('gearbox')->maxLength(60),
Forms\Components\Select::make('fuel')
->options([
'Benzină' => 'Benzină', 'Diesel' => 'Diesel', 'Hybrid' => 'Hybrid',
__('Benzină') => __('Benzină'), 'Diesel' => 'Diesel', 'Hybrid' => 'Hybrid',
'EV' => 'Electric', 'GPL' => 'GPL', 'GNC' => 'GNC',
]),
Forms\Components\Select::make('vehicle_class')