Skip to content

Commit d1c7b51

Browse files
Merge pull request #43 from rriaz6601/fix/packaging-hardcoded-language
fix(packaging): replace hardcoded Polish strings with __() translations
2 parents 66a8e7d + 7107341 commit d1c7b51

5 files changed

Lines changed: 159 additions & 79 deletions

File tree

backend/lang/en.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,5 +1251,45 @@
12511251
"— Select factory —": "— Select factory —",
12521252
"— Select type —": "— Select type —",
12531253
"— Unassigned —": "— Unassigned —",
1254-
"← Back": "← Back"
1254+
"← Back": "← Back",
1255+
"← Packaging overview": "← Packaging overview",
1256+
"Add EAN": "Add EAN",
1257+
"Add EAN code": "Add EAN code",
1258+
"Assign barcodes to production work orders": "Assign barcodes to production work orders",
1259+
"Current shift:": "Current shift:",
1260+
"Delete EAN code :ean?": "Delete EAN code :ean?",
1261+
"EAN Codes": "EAN Codes",
1262+
"EAN Codes — Management": "EAN Codes — Management",
1263+
"EAN Code Management": "EAN Code Management",
1264+
"EAN code": "EAN code",
1265+
"Error": "Error",
1266+
"Last scan": "Last scan",
1267+
"Logged in:": "Logged in:",
1268+
"Manage EAN": "Manage EAN",
1269+
"No EAN": "No EAN",
1270+
"No results": "No results",
1271+
"No scans in this shift": "No scans in this shift",
1272+
"No work orders with assigned EAN codes": "No work orders with assigned EAN codes",
1273+
"Open station": "Open station",
1274+
"Packed": "Packed",
1275+
"Packed (shift)": "Packed (shift)",
1276+
"Packed / Plan": "Packed / Plan",
1277+
"Packaging": "Packaging",
1278+
"Packaging — Overview": "Packaging — Overview",
1279+
"Packaging Station": "Packaging Station",
1280+
"Plan": "Plan",
1281+
"Production work order": "Production work order",
1282+
"Scan EAN code…": "Scan EAN code…",
1283+
"Scan error": "Scan error",
1284+
"Scan history (shift)": "Scan history (shift)",
1285+
"Scanned!": "Scanned!",
1286+
"Scanning active": "Scanning active",
1287+
"Search by order number…": "Search by order number…",
1288+
"Shift:": "Shift:",
1289+
"Total plan": "Total plan",
1290+
"Waiting for scan…": "Waiting for scan…",
1291+
"Work orders to pack": "Work orders to pack",
1292+
"e.g. 5901234123457": "e.g. 5901234123457",
1293+
"pcs.": "pcs.",
1294+
"— select work order —": "— select work order —"
12551295
}

backend/lang/pl.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,5 +1284,45 @@
12841284
"EAN code removed.": "Kod EAN został usunięty.",
12851285
"You do not have access to this line.": "Nie masz dostępu do tej linii.",
12861286
"Forbidden": "Brak dostępu",
1287-
"Reset packed_qty counters on work_orders for new shift start": "Zresetuj liczniki packed_qty dla zleceń produkcyjnych na początek nowej zmiany"
1287+
"Reset packed_qty counters on work_orders for new shift start": "Zresetuj liczniki packed_qty dla zleceń produkcyjnych na początek nowej zmiany",
1288+
"← Packaging overview": "← Przegląd pakowania",
1289+
"Add EAN": "Dodaj EAN",
1290+
"Add EAN code": "Dodaj kod EAN",
1291+
"Assign barcodes to production work orders": "Przypisuj kody kreskowe do zleceń produkcyjnych",
1292+
"Current shift:": "Bieżąca zmiana:",
1293+
"Delete EAN code :ean?": "Usunąć kod EAN :ean?",
1294+
"EAN Codes": "Kody EAN",
1295+
"EAN Codes — Management": "Kody EAN — Zarządzanie",
1296+
"EAN Code Management": "Zarządzanie kodami EAN",
1297+
"EAN code": "Kod EAN",
1298+
"Error": "Błąd",
1299+
"Last scan": "Ostatnie skanowanie",
1300+
"Logged in:": "Zalogowany:",
1301+
"Manage EAN": "Zarządzaj EAN",
1302+
"No EAN": "Brak EAN",
1303+
"No results": "Brak wyników",
1304+
"No scans in this shift": "Brak skanowań w tej zmianie",
1305+
"No work orders with assigned EAN codes": "Brak zleceń z przypisanymi kodami EAN",
1306+
"Open station": "Otwórz stanowisko",
1307+
"Packed": "Spakowane",
1308+
"Packed (shift)": "Spakowano (zmiana)",
1309+
"Packed / Plan": "Spakowano / Plan",
1310+
"Packaging": "Pakowanie",
1311+
"Packaging — Overview": "Pakowanie — Przegląd",
1312+
"Packaging Station": "Stanowisko pakowania",
1313+
"Plan": "Plan",
1314+
"Production work order": "Zlecenie produkcyjne",
1315+
"Scan EAN code…": "Skanuj kod EAN…",
1316+
"Scan error": "Błąd skanowania",
1317+
"Scan history (shift)": "Historia skanowań (zmiana)",
1318+
"Scanned!": "Zeskanowano!",
1319+
"Scanning active": "Skanowanie aktywne",
1320+
"Search by order number…": "Szukaj po numerze zlecenia…",
1321+
"Shift:": "Zmiana:",
1322+
"Total plan": "Plan łącznie",
1323+
"Waiting for scan…": "Oczekiwanie na skanowanie…",
1324+
"Work orders to pack": "Zlecenia do spakowania",
1325+
"e.g. 5901234123457": "np. 5901234123457",
1326+
"pcs.": "szt.",
1327+
"— select work order —": "— wybierz zlecenie —"
12881328
}

backend/resources/views/packaging/admin.blade.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
@extends('layouts.app')
22

3-
@section('title', 'PakowaniePrzegląd')
3+
@section('title', __('PackagingOverview'))
44

55
@section('content')
66
<div class="max-w-7xl mx-auto">
77
<x-breadcrumbs :items="[
88
['label' => 'Dashboard', 'url' => route('admin.dashboard')],
9-
['label' => 'Pakowanie', 'url' => null],
9+
['label' => __('Packaging'), 'url' => null],
1010
]" />
1111

1212
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mb-6">
1313
<div>
14-
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">Pakowanie — Przegląd</h1>
15-
<p class="text-sm text-gray-500 mt-1">Bieżąca zmiana: {{ (now()->hour >= 6 && now()->hour < 18) ? '06:00 – 18:00' : '18:00 – 06:00' }}</p>
14+
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">{{ __('Packaging — Overview') }}</h1>
15+
<p class="text-sm text-gray-500 mt-1">{{ __('Current shift:') }} {{ (now()->hour >= 6 && now()->hour < 18) ? '06:00 – 18:00' : '18:00 – 06:00' }}</p>
1616
</div>
1717
<div class="flex gap-2">
1818
<a href="{{ route('packaging.station') }}" class="btn-touch btn-primary">
19-
Otwórz stanowisko
19+
{{ __('Open station') }}
2020
</a>
2121
<a href="{{ route('packaging.eans.index') }}" class="btn-touch btn-secondary">
22-
Zarządzaj EAN
22+
{{ __('Manage EAN') }}
2323
</a>
2424
</div>
2525
</div>
@@ -28,17 +28,17 @@
2828
<div class="grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6">
2929
<div class="card text-center">
3030
<p class="text-3xl font-extrabold text-indigo-600 dark:text-indigo-400">{{ number_format($stats['today_packed']) }}</p>
31-
<p class="text-xs text-gray-500 mt-1">Spakowano (zmiana)</p>
31+
<p class="text-xs text-gray-500 mt-1">{{ __('Packed (shift)') }}</p>
3232
</div>
3333
<div class="card text-center">
3434
<p class="text-3xl font-extrabold text-gray-700 dark:text-gray-200">{{ number_format($stats['plan']) }}</p>
35-
<p class="text-xs text-gray-500 mt-1">Plan łącznie</p>
35+
<p class="text-xs text-gray-500 mt-1">{{ __('Total plan') }}</p>
3636
</div>
3737
<div class="card text-center">
3838
<p class="text-3xl font-extrabold {{ $stats['backlog'] > 0 ? 'text-red-600 dark:text-red-400' : 'text-green-600 dark:text-green-400' }}">
3939
{{ number_format($stats['backlog']) }}
4040
</p>
41-
<p class="text-xs text-gray-500 mt-1">Backlog</p>
41+
<p class="text-xs text-gray-500 mt-1">{{ __('Backlog') }}</p>
4242
</div>
4343
@php
4444
$realizacja = $stats['plan'] > 0 ? min(100, round($stats['total_packed'] / $stats['plan'] * 100)) : 0;
@@ -47,7 +47,7 @@
4747
<p class="text-3xl font-extrabold {{ $realizacja >= 100 ? 'text-green-600' : ($realizacja >= 50 ? 'text-yellow-600' : 'text-red-600') }}">
4848
{{ $realizacja }}%
4949
</p>
50-
<p class="text-xs text-gray-500 mt-1">Realizacja</p>
50+
<p class="text-xs text-gray-500 mt-1">{{ __('Completion') }}</p>
5151
<div class="w-full bg-gray-200 dark:bg-gray-700 rounded-full h-1.5 mt-2">
5252
<div class="h-1.5 rounded-full {{ $realizacja >= 100 ? 'bg-green-500' : ($realizacja >= 50 ? 'bg-yellow-500' : 'bg-red-500') }}"
5353
style="width: {{ $realizacja }}%"></div>
@@ -59,21 +59,21 @@
5959
<div class="card overflow-hidden p-0">
6060
<div class="px-4 py-3 border-b border-gray-200 dark:border-gray-700">
6161
<h2 class="font-semibold text-gray-700 dark:text-gray-200 text-sm uppercase tracking-wide">
62-
Zlecenia do spakowania ({{ count($items) }})
62+
{{ __('Work orders to pack') }} ({{ count($items) }})
6363
</h2>
6464
</div>
6565
<div class="overflow-x-auto">
6666
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
6767
<thead class="bg-gray-50 dark:bg-gray-800">
6868
<tr>
69-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Zlecenie</th>
70-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Produkt</th>
71-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Linia</th>
69+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Work Order') }}</th>
70+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Product') }}</th>
71+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Line') }}</th>
7272
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">EAN</th>
73-
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">Spakowano</th>
74-
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">Plan</th>
75-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase w-32">Postęp</th>
76-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Status</th>
73+
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">{{ __('Packed') }}</th>
74+
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">{{ __('Plan') }}</th>
75+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase w-32">{{ __('Progress') }}</th>
76+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Status') }}</th>
7777
</tr>
7878
</thead>
7979
<tbody class="divide-y divide-gray-100 dark:divide-gray-700/50">
@@ -101,11 +101,11 @@
101101
<td class="px-4 py-3">
102102
@if($item['done'])
103103
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300">
104-
Spakowane
104+
{{ __('Packed') }}
105105
</span>
106106
@elseif($item['status'] === 'DONE')
107107
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300">
108-
W trakcie
108+
{{ __('In Progress') }}
109109
</span>
110110
@else
111111
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300">
@@ -117,7 +117,7 @@
117117
@empty
118118
<tr>
119119
<td colspan="8" class="px-4 py-10 text-center text-gray-400 text-sm">
120-
Brak zleceń z przypisanymi kodami EAN
120+
{{ __('No work orders with assigned EAN codes') }}
121121
</td>
122122
</tr>
123123
@endforelse

backend/resources/views/packaging/eans/index.blade.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@extends('layouts.app')
22

3-
@section('title', 'Zarządzanie kodami EAN')
3+
@section('title', __('EAN Code Management'))
44

55
@section('content')
66
<div class="max-w-7xl mx-auto">
77
<x-breadcrumbs :items="[
88
['label' => 'Dashboard', 'url' => route('admin.dashboard')],
9-
['label' => 'Pakowanie', 'url' => route('packaging.overview')],
10-
['label' => 'Kody EAN', 'url' => null],
9+
['label' => __('Packaging'), 'url' => route('packaging.overview')],
10+
['label' => __('EAN Codes'), 'url' => null],
1111
]" />
1212

1313
<div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mb-6">
1414
<div>
15-
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">Kody EAN — Zarządzanie</h1>
16-
<p class="text-sm text-gray-500 mt-1">Przypisuj kody kreskowe do zleceń produkcyjnych</p>
15+
<h1 class="text-2xl font-bold text-gray-800 dark:text-white">{{ __('EAN Codes — Management') }}</h1>
16+
<p class="text-sm text-gray-500 mt-1">{{ __('Assign barcodes to production work orders') }}</p>
1717
</div>
18-
<a href="{{ route('packaging.overview') }}" class="btn-touch btn-secondary">← Przegląd pakowania</a>
18+
<a href="{{ route('packaging.overview') }}" class="btn-touch btn-secondary">{{ __('← Packaging overview') }}</a>
1919
</div>
2020

2121
@if(session('success'))
@@ -26,13 +26,13 @@
2626

2727
{{-- Add EAN form ─────────────────────────────────────────────────────── --}}
2828
<div class="card mb-6" x-data="{ workOrderId: '' }">
29-
<h2 class="text-sm font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide mb-4">Dodaj kod EAN</h2>
29+
<h2 class="text-sm font-semibold text-gray-700 dark:text-gray-300 uppercase tracking-wide mb-4">{{ __('Add EAN code') }}</h2>
3030
<form method="POST" action="{{ route('packaging.eans.store') }}" class="grid grid-cols-1 sm:grid-cols-3 gap-4">
3131
@csrf
3232
<div>
33-
<label class="form-label">Zlecenie produkcyjne</label>
33+
<label class="form-label">{{ __('Production work order') }}</label>
3434
<select name="work_order_id" class="form-input w-full" required>
35-
<option value="">— wybierz zlecenie —</option>
35+
<option value="">{{ __('— select work order —') }}</option>
3636
@foreach($workOrders as $wo)
3737
<option value="{{ $wo->id }}" @selected(old('work_order_id') == $wo->id)>
3838
{{ $wo->order_no }}{{ $wo->productType ? '' . $wo->productType->name : '' }}
@@ -44,15 +44,15 @@
4444
@enderror
4545
</div>
4646
<div>
47-
<label class="form-label">Kod EAN</label>
47+
<label class="form-label">{{ __('EAN code') }}</label>
4848
<input type="text" name="ean" value="{{ old('ean') }}" class="form-input w-full font-mono"
49-
placeholder="np. 5901234123457" required maxlength="100">
49+
placeholder="{{ __('e.g. 5901234123457') }}" required maxlength="100">
5050
@error('ean')
5151
<p class="text-xs text-red-600 mt-1">{{ $message }}</p>
5252
@enderror
5353
</div>
5454
<div class="flex items-end">
55-
<button type="submit" class="btn-touch btn-primary w-full sm:w-auto">Dodaj EAN</button>
55+
<button type="submit" class="btn-touch btn-primary w-full sm:w-auto">{{ __('Add EAN') }}</button>
5656
</div>
5757
</form>
5858
</div>
@@ -61,10 +61,10 @@
6161
<form method="GET" action="{{ route('packaging.eans.index') }}" class="card mb-4 py-3">
6262
<div class="flex gap-3">
6363
<input type="text" name="search" value="{{ request('search') }}"
64-
class="form-input flex-1" placeholder="Szukaj po numerze zlecenia…">
65-
<button type="submit" class="btn-touch btn-secondary text-sm">Szukaj</button>
64+
class="form-input flex-1" placeholder="{{ __('Search by order number…') }}">
65+
<button type="submit" class="btn-touch btn-secondary text-sm">{{ __('Search') }}</button>
6666
@if(request('search'))
67-
<a href="{{ route('packaging.eans.index') }}" class="btn-touch btn-secondary text-sm">Wyczyść</a>
67+
<a href="{{ route('packaging.eans.index') }}" class="btn-touch btn-secondary text-sm">{{ __('Clear') }}</a>
6868
@endif
6969
</div>
7070
</form>
@@ -75,11 +75,11 @@ class="form-input flex-1" placeholder="Szukaj po numerze zlecenia…">
7575
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700 text-sm">
7676
<thead class="bg-gray-50 dark:bg-gray-800">
7777
<tr>
78-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Zlecenie</th>
79-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Produkt</th>
80-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Status</th>
81-
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">Kody EAN</th>
82-
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">Spakowano / Plan</th>
78+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Work Order') }}</th>
79+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Product') }}</th>
80+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('Status') }}</th>
81+
<th class="px-4 py-2.5 text-left text-xs font-semibold text-gray-500 uppercase">{{ __('EAN Codes') }}</th>
82+
<th class="px-4 py-2.5 text-right text-xs font-semibold text-gray-500 uppercase">{{ __('Packed / Plan') }}</th>
8383
</tr>
8484
</thead>
8585
<tbody class="divide-y divide-gray-100 dark:divide-gray-700/50">
@@ -102,13 +102,13 @@ class="form-input flex-1" placeholder="Szukaj po numerze zlecenia…">
102102
@forelse($wo->eans as $ean)
103103
<div class="flex items-center gap-2 mb-1">
104104
<span class="font-mono text-xs bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 px-2 py-0.5 rounded">{{ $ean->ean }}</span>
105-
<form method="POST" action="{{ route('packaging.eans.destroy', $ean) }}" onsubmit="return confirm('Usunąć kod EAN {{ $ean->ean }}?')">
105+
<form method="POST" action="{{ route('packaging.eans.destroy', $ean) }}" onsubmit="return confirm('{{ __('Delete EAN code :ean?', ['ean' => $ean->ean]) }}')">
106106
@csrf @method('DELETE')
107-
<button type="submit" class="text-xs text-red-500 hover:text-red-700 transition-colors">Usuń</button>
107+
<button type="submit" class="text-xs text-red-500 hover:text-red-700 transition-colors">{{ __('Delete') }}</button>
108108
</form>
109109
</div>
110110
@empty
111-
<span class="text-xs text-gray-400">Brak EAN</span>
111+
<span class="text-xs text-gray-400">{{ __('No EAN') }}</span>
112112
@endforelse
113113
</td>
114114
<td class="px-4 py-3 text-right font-medium text-gray-700 dark:text-gray-300">
@@ -118,7 +118,7 @@ class="form-input flex-1" placeholder="Szukaj po numerze zlecenia…">
118118
</tr>
119119
@empty
120120
<tr>
121-
<td colspan="5" class="px-4 py-10 text-center text-gray-400 text-sm">Brak wyników</td>
121+
<td colspan="5" class="px-4 py-10 text-center text-gray-400 text-sm">{{ __('No results') }}</td>
122122
</tr>
123123
@endforelse
124124
</tbody>

0 commit comments

Comments
 (0)