Skip to content

Commit 4533420

Browse files
committed
fix: address CodeRabbit review feedback on translation keys and JSX wrapping
1 parent 9c8c370 commit 4533420

7 files changed

Lines changed: 18 additions & 15 deletions

File tree

backend/lang/vi.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"accept_with_deviation": "Chấp nhận có sai lệch",
9999
"ACCEPTED": "ĐƯỢC CHẤP NHẬN",
100100
"Accepted": "Đã chấp nhận",
101+
"accepted": "đã chấp nhận",
101102
"Account Information": "Thông tin tài khoản",
102103
"Account Type": "Loại tài khoản",
103104
"ACCOUNTS": "TÀI KHOẢN",
@@ -1417,6 +1418,7 @@
14171418
"In the meantime, you can install modules manually:": "Trong thời gian chờ đợi, bạn có thể cài đặt mô-đun theo cách thủ công:",
14181419
"In Use": "Đang sử dụng",
14191420
"IN_PROGRESS": "Đang tiến hành",
1421+
"in_progress": "đang tiến hành",
14201422
"INACTIVE": "KHÔNG HOẠT ĐỘNG",
14211423
"Inactive": "Không hoạt động",
14221424
"inactive": "không hoạt động",
@@ -2653,6 +2655,7 @@
26532655
"Reject work order :order?": "Từ chối lệnh sản xuất :order?",
26542656
"REJECTED": "BỊ TỪ CHỐI",
26552657
"Rejected": "Bị từ chối",
2658+
"rejected": "đã từ chối",
26562659
"Release Batch": "Phát hành hàng loạt",
26572660
"Release failed": "Phát hành không thành công",
26582661
"Release this batch?": "Phát hành đợt này?",

backend/resources/js/Pages/admin/crew-break-windows/Index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ export default function CrewBreakWindowsIndex() {
1212
const columns = [
1313
{
1414
key: 'crew',
15-
label: __('Crew'),
15+
label: 'Crew',
1616
className: 'font-medium text-gray-800',
1717
render: (r) => crewNames[r.crew_id] ?? `#${r.crew_id}`,
1818
},
19-
{ key: 'name', label: __('Name') },
19+
{ key: 'name', label: 'Name' },
2020
{
2121
key: 'time',
22-
label: __('Time'),
22+
label: 'Time',
2323
render: (r) => `${time(r.start_time)}${time(r.end_time)}`,
2424
},
2525
{
2626
key: 'days',
27-
label: __('Days'),
27+
label: 'Days',
2828
className: 'text-gray-600',
2929
render: (r) => formatDays(r.days_of_week ?? []),
3030
},
3131
{
3232
key: 'is_active',
33-
label: __('Status'),
33+
label: 'Status',
3434
render: (r) => (
3535
<span className={`px-2 py-0.5 rounded text-xs ${r.is_active ? 'bg-green-100 text-green-700' : 'bg-gray-100 text-gray-600'}`}>
3636
{r.is_active ? __('Active') : __('Inactive')}

backend/resources/js/Pages/admin/dashboard-widgets/Index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@ export default function DashboardWidgetsIndex() {
107107
{/* Info */}
108108
<div className="flex-1 min-w-0">
109109
<div className="flex items-center gap-2 flex-wrap">
110-
<h3 className="text-sm font-bold text-gray-800 dark:text-gray-200">{__(widget.name)}</h3>
110+
<h3 className="text-sm font-bold text-gray-800 dark:text-gray-200">{widget.name}</h3>
111111
<span
112112
className={`px-2 py-0.5 rounded-full text-xs ${widget.source === 'builtin'
113113
? 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300'
114114
: 'bg-purple-100 text-purple-700 dark:bg-purple-900 dark:text-purple-300'}`}
115115
>
116-
{widget.source === 'builtin' ? __('Built-in') : __(widget.module_name)}
116+
{widget.source === 'builtin' ? __('Built-in') : widget.module_name}
117117
</span>
118118
<span className="px-2 py-0.5 rounded-full text-xs bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400">
119-
{__(widget.zone)}
119+
{widget.zone}
120120
</span>
121121
</div>
122122
{widget.description && (
123-
<p className="text-xs text-gray-500 dark:text-gray-400 mt-0.5">{__(widget.description)}</p>
123+
<p className="text-xs text-gray-500 dark:text-gray-400 mt-0.5">{widget.description}</p>
124124
)}
125125
</div>
126126

backend/resources/js/Pages/admin/work-orders/Show.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function BatchRow({ batch }) {
5050
<div className="flex items-center gap-3">
5151
<span className="font-semibold text-gray-700">Batch #{batch.batch_number}</span>
5252
<span className={`px-2 py-0.5 rounded text-xs font-medium ${batchStyle}`}>
53-
{__(batch.status.replace('_', ' '))}
53+
{__(batch.status)}
5454
</span>
5555
<span className="text-sm text-gray-500">
5656
{fmtQty(batch.produced_qty)} / {fmtQty(batch.target_qty)}
@@ -78,7 +78,7 @@ function BatchRow({ batch }) {
7878
{step.step_number}
7979
</span>
8080
<span className="flex-1 text-gray-700">{step.name}</span>
81-
<span className="text-xs text-gray-400">{__(step.status.replace('_', ' '))}</span>
81+
<span className="text-xs text-gray-400">{__(step.status)}</span>
8282
{step.duration_minutes != null ? (
8383
<span className={`text-xs font-medium ${overTime ? 'text-red-500' : 'text-green-600'}`}>
8484
{step.duration_minutes}min{estimated ? ` / est. ${estimated}min` : ''}

backend/resources/js/Pages/inspections/Index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default function InspectionsIndex() {
186186
</td>
187187
<td className="px-3 py-2 text-center">
188188
<span className={`inline-block px-2 py-0.5 rounded text-xs font-semibold capitalize ${dispositionBadge(insp.disposition ?? 'pending')}`}>
189-
{__(insp.disposition ?? 'pending')}
189+
{__(DISPOSITION_LABELS[insp.disposition ?? 'pending'] ?? (insp.disposition ?? 'pending'))}
190190
</span>
191191
</td>
192192
<td className="px-3 py-2 text-right">

backend/resources/js/Pages/packaging/Admin.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function StatusBadge({ item }) {
2525
if (item.status === 'DONE') {
2626
return (
2727
<span className="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">
28-
{__('In progress')}
28+
{__('Done')}
2929
</span>
3030
);
3131
}

backend/resources/js/Pages/supervisor/work-orders/Show.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function BatchRow({ batch, processSnapshot }) {
6464
<div className="flex items-center gap-3">
6565
<span className="font-semibold text-gray-700">Batch #{batch.batch_number}</span>
6666
<span className={`px-2 py-0.5 rounded text-xs font-medium ${batchStyle}`}>
67-
{__(batch.status.replace('_', ' '))}
67+
{__(batch.status)}
6868
</span>
6969
<span className="text-sm text-gray-500">
7070
{fmtQty(batch.produced_qty)} / {fmtQty(batch.target_qty)}
@@ -90,7 +90,7 @@ function BatchRow({ batch, processSnapshot }) {
9090
{step.step_number}
9191
</span>
9292
<span className="flex-1 text-gray-700">{step.name}</span>
93-
<span className="text-xs text-gray-400">{__(step.status.replace('_', ' '))}</span>
93+
<span className="text-xs text-gray-400">{__(step.status)}</span>
9494
{step.duration_minutes != null ? (
9595
<span className={`text-xs font-medium ${overTime ? 'text-red-500' : 'text-green-600'}`}>
9696
{step.duration_minutes}min{estimated ? ` / est. ${estimated}min` : ''}

0 commit comments

Comments
 (0)