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
+4 -4
View File
@@ -25,7 +25,7 @@ class OcrInvoiceService
public function extract(string $absPath, ?string $mime = null): array
{
if (! is_file($absPath)) {
return ['ok' => false, 'error' => 'Fișierul nu există.'];
return ['ok' => false, 'error' => __('Fișierul nu există.')];
}
$mime ??= mime_content_type($absPath) ?: 'image/jpeg';
@@ -49,7 +49,7 @@ class OcrInvoiceService
$key = data_get($company->settings, 'ai.claude_key');
if (! $key) {
return ['ok' => false, 'error' => '⚠️ Lipsește cheia Claude în Setări → AI.'];
return ['ok' => false, 'error' => __('⚠️ Lipsește cheia Claude în Setări → AI.')];
}
$b64 = base64_encode(file_get_contents($absPath));
@@ -70,7 +70,7 @@ class OcrInvoiceService
['type' => 'image', 'source' => [
'type' => 'base64', 'media_type' => $mime, 'data' => $b64,
]],
['type' => 'text', 'text' => 'Extrage datele din această factură. Răspunde DOAR cu obiectul JSON, fără text suplimentar și fără ```.'],
['type' => 'text', 'text' => __('Extrage datele din această factură. Răspunde DOAR cu obiectul JSON, fără text suplimentar și fără ```.')],
],
]],
]);
@@ -87,7 +87,7 @@ class OcrInvoiceService
$data = $this->parseJson($text);
if ($data === null) {
return ['ok' => false, 'error' => 'Răspuns AI ne-parsabil ca JSON.', 'raw' => $text];
return ['ok' => false, 'error' => __('Răspuns AI ne-parsabil ca JSON.'), 'raw' => $text];
}
return [
+1 -1
View File
@@ -131,7 +131,7 @@ class ExcelInvoiceImportService
'order_date' => today(),
'status' => 'ordered',
'total' => 0,
'notes' => 'Auto-import Excel/CSV',
'notes' => __('Auto-import Excel/CSV'),
]);
$total = 0;
foreach ($rows as $row) {
+1 -1
View File
@@ -107,7 +107,7 @@ class NotificationDispatcher
fn () => Mail::to($client->email)->send(new ServiceReminderMail(
$set->vehicle,
'tire_swap',
'E timpul să schimbi anvelopele ' . ($set->season === 'winter' ? 'de iarnă' : 'de vară') .
__('E timpul să schimbi anvelopele ') . ($set->season === 'winter' ? 'de iarnă' : 'de vară') .
' (' . $set->sizeLabel() . ').',
$company
)),
@@ -65,7 +65,7 @@ class TelegramService
public function setWebhook(Company $company): array
{
$token = $this->tokenFor($company);
if (! $token) return ['ok' => false, 'error' => 'Lipsește bot token în setări.'];
if (! $token) return ['ok' => false, 'error' => __('Lipsește bot token în setări.')];
$secret = $this->webhookSecretFor($company);
if (! $secret) {
+1 -1
View File
@@ -36,7 +36,7 @@ class VinDecoder
{
$vin = strtoupper(trim($vin));
if (strlen($vin) < 11) {
return ['valid' => false, 'error' => 'VIN trebuie să aibă cel puțin 11 caractere.'];
return ['valid' => false, 'error' => __('VIN trebuie să aibă cel puțin 11 caractere.')];
}
$wmi = substr($vin, 0, 3);