From a9833d424ad1d3d4cc6f8a9d68352dcafd7eae5a Mon Sep 17 00:00:00 2001 From: "Tommy\\2Fi-Staff" Date: Mon, 23 Feb 2026 17:48:57 +0800 Subject: [PATCH] translation & alignment --- src/components/Breadcrumb/Breadcrumb.tsx | 1 + src/components/Jodetail/completeJobOrderRecord.tsx | 6 ++---- .../ProductionProcessJobOrderDetail.tsx | 2 +- src/components/Qc/QcForm.tsx | 13 ++++++++++++- src/components/SearchResults/SearchResults.tsx | 2 +- src/components/StyledDataGrid/StyledDataGrid.tsx | 4 ++++ src/i18n/zh/common.json | 5 +++++ src/i18n/zh/inventory.json | 1 + src/i18n/zh/jo.json | 7 ++++++- 9 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/components/Breadcrumb/Breadcrumb.tsx b/src/components/Breadcrumb/Breadcrumb.tsx index 0ac5884..066d65c 100644 --- a/src/components/Breadcrumb/Breadcrumb.tsx +++ b/src/components/Breadcrumb/Breadcrumb.tsx @@ -14,6 +14,7 @@ const pathToLabelMap: { [path: string]: string } = { "/tasks": "Task Template", "/tasks/create": "Create Task Template", "/settings/qcItem": "Qc Item", + "/settings/qcItemAll": "QC Item All", "/settings/qrCodeHandle": "QR Code Handle", "/settings/rss": "Demand Forecast Setting", "/settings/equipment": "Equipment", diff --git a/src/components/Jodetail/completeJobOrderRecord.tsx b/src/components/Jodetail/completeJobOrderRecord.tsx index f842630..6abd9f7 100644 --- a/src/components/Jodetail/completeJobOrderRecord.tsx +++ b/src/components/Jodetail/completeJobOrderRecord.tsx @@ -642,23 +642,20 @@ const CompleteJobOrderRecord: React.FC = ({ - + - - ))} @@ -675,6 +672,7 @@ const CompleteJobOrderRecord: React.FC = ({ onPageChange={handlePageChange} onRowsPerPageChange={handlePageSizeChange} rowsPerPageOptions={[5, 10, 25, 50]} + labelRowsPerPage={t("Rows per page")} /> )} diff --git a/src/components/ProductionProcess/ProductionProcessJobOrderDetail.tsx b/src/components/ProductionProcess/ProductionProcessJobOrderDetail.tsx index b569b70..f00ddf5 100644 --- a/src/components/ProductionProcess/ProductionProcessJobOrderDetail.tsx +++ b/src/components/ProductionProcess/ProductionProcessJobOrderDetail.tsx @@ -422,7 +422,7 @@ const handleRelease = useCallback(async ( jobOrderId: number) => { const productionProcessesLineRemarkTableColumns: GridColDef[] = [ { field: "seqNo", - headerName: t("Seq"), + headerName: t("SEQ"), flex: 0.2, align: "left", headerAlign: "left", diff --git a/src/components/Qc/QcForm.tsx b/src/components/Qc/QcForm.tsx index 10d46d4..46a33a4 100644 --- a/src/components/Qc/QcForm.tsx +++ b/src/components/Qc/QcForm.tsx @@ -232,12 +232,23 @@ const QcForm: React.FC = ({ rows, disabled = false }) => { return ( <> + // autoHeight 'auto'} + initialState={{ + pagination: { paginationModel: { page: 0, pageSize: 100 } }, + }} + pageSizeOptions={[100]} + slotProps={{ + pagination: { + sx: { + display: "none", + }, + }, + }} /> ); diff --git a/src/components/SearchResults/SearchResults.tsx b/src/components/SearchResults/SearchResults.tsx index 923298a..43e692c 100644 --- a/src/components/SearchResults/SearchResults.tsx +++ b/src/components/SearchResults/SearchResults.tsx @@ -198,7 +198,7 @@ function SearchResults({ setCheckboxIds = undefined, onRowClick = undefined, }: Props) { - const { t } = useTranslation("dashboard"); + const { t } = useTranslation(); const [page, setPage] = React.useState(0); const [rowsPerPage, setRowsPerPage] = React.useState(10); diff --git a/src/components/StyledDataGrid/StyledDataGrid.tsx b/src/components/StyledDataGrid/StyledDataGrid.tsx index 7899dc4..0ea456c 100644 --- a/src/components/StyledDataGrid/StyledDataGrid.tsx +++ b/src/components/StyledDataGrid/StyledDataGrid.tsx @@ -1,6 +1,8 @@ import { styled } from "@mui/material"; import { DataGrid ,DataGridProps,zhTW} from "@mui/x-data-grid"; import { forwardRef } from "react"; +import { useTranslation } from "react-i18next"; + const StyledDataGridBase = styled(DataGrid)(({ theme }) => ({ "--unstable_DataGrid-radius": 0, "& .MuiDataGrid-columnHeaders": { @@ -29,12 +31,14 @@ const StyledDataGridBase = styled(DataGrid)(({ theme }) => ({ }, })); const StyledDataGrid = forwardRef((props, ref) => { + const { t } = useTranslation(); return ( diff --git a/src/i18n/zh/common.json b/src/i18n/zh/common.json index 5dc8e3b..57d08fe 100644 --- a/src/i18n/zh/common.json +++ b/src/i18n/zh/common.json @@ -112,6 +112,7 @@ "Today": "今天", "Yesterday": "昨天", + "Two Days Ago": "前天", "Input Equipment is not match with process": "輸入的設備與流程不匹配", "Staff No is required": "員工編號必填", @@ -120,6 +121,8 @@ "Production Date": "生產日期", "QC Check Item": "QC品檢項目", "QC Category": "QC品檢模板", + "QC Item All": "QC 綜合管理", + "qcItemAll": "QC 綜合管理", "qcCategory": "品檢模板", "QC Check Template": "QC檢查模板", "Mail": "郵件", @@ -136,6 +139,7 @@ "Production Date":"生產日期", "QC Check Item":"QC品檢項目", "QC Category":"QC品檢模板", + "QC Item All":"QC 綜合管理", "qcCategory":"品檢模板", "QC Check Template":"QC檢查模板", "QR Code Handle":"二維碼列印及下載", @@ -272,6 +276,7 @@ "Please scan equipment code": "請掃描設備編號", "Equipment Code": "設備編號", "Seq": "步驟", + "SEQ": "步驟", "Item Name": "物料名稱", "Job Order Info": "工單信息", "Matching Stock": "工單對料", diff --git a/src/i18n/zh/inventory.json b/src/i18n/zh/inventory.json index a222604..cd05554 100644 --- a/src/i18n/zh/inventory.json +++ b/src/i18n/zh/inventory.json @@ -39,6 +39,7 @@ "DO Order Code": "送貨單編號", "JO Order Code": "工單編號", "Picker Name": "提料員", + "Rows per page": "每頁行數", "rejected": "已拒絕", "miss": "缺貨", diff --git a/src/i18n/zh/jo.json b/src/i18n/zh/jo.json index 5c53546..e726dea 100644 --- a/src/i18n/zh/jo.json +++ b/src/i18n/zh/jo.json @@ -93,6 +93,11 @@ "Bag Code": "包裝袋編號", "Sequence": "序", + "Seq": "步驟", + "SEQ": "步驟", + "Today": "今天", + "Yesterday": "昨天", + "Two Days Ago": "前天", "Item Code": "成品/半成品編號", "Paused": "已暫停", "paused": "已暫停", @@ -347,7 +352,7 @@ "receivedQty": "接收數量", "stock in information": "庫存信息", "No Uom": "沒有單位", - "Print Pick Record": "打印板頭紙", + "Print Pick Record": "打印版頭紙", "Printed Successfully.": "成功列印", "Submit All Scanned": "提交所有已掃描項目", "Submitting...": "提交中...",