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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
];
|
||||
|
||||
@@ -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'],
|
||||
],
|
||||
|
||||
@@ -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')),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user