From 2ebd736e8b33b68d42c7598f98ce598417eb4f7f Mon Sep 17 00:00:00 2001 From: tommy Date: Fri, 5 Jun 2026 19:40:25 +0800 Subject: [PATCH] translate --- src/components/ItemsSearch/ItemsSearch.tsx | 4 ++++ src/i18n/en/items.json | 5 +++++ src/i18n/zh/items.json | 5 +++++ src/i18n/zh/navigation.json | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/ItemsSearch/ItemsSearch.tsx b/src/components/ItemsSearch/ItemsSearch.tsx index a230ae0..3aeec36 100644 --- a/src/components/ItemsSearch/ItemsSearch.tsx +++ b/src/components/ItemsSearch/ItemsSearch.tsx @@ -161,6 +161,10 @@ const ItemsSearch: React.FC = ({ items }) => { name: "type", label: t("Type"), sx: { width: 120 }, + renderCell: (item) => { + const typeKey = item.type?.toString().toLowerCase(); + return {t(typeKey) || item.type}; + }, }, { name: "status", diff --git a/src/i18n/en/items.json b/src/i18n/en/items.json index 36672b4..859f7ef 100644 --- a/src/i18n/en/items.json +++ b/src/i18n/en/items.json @@ -41,6 +41,11 @@ "Special Type": "Special Type", "Status": "Status", "Type": "Type", + "fg": "FG", + "wip": "WIP", + "mat": "MAT", + "cmb": "CMB", + "nm": "NM", "code": "code", "countryOfOrigin": "countryOfOrigin", "description": "description", diff --git a/src/i18n/zh/items.json b/src/i18n/zh/items.json index 1d360da..cd97cc7 100644 --- a/src/i18n/zh/items.json +++ b/src/i18n/zh/items.json @@ -41,6 +41,11 @@ "isEgg": "雞蛋", "isFee": "費用", "isBag": "袋子", + "fg": "成品", + "wip": "半成品", + "mat": "材料", + "cmb": "合併", + "nm": "非物料", "Back": "返回", "Status": "狀態", "Complete": "完成", diff --git a/src/i18n/zh/navigation.json b/src/i18n/zh/navigation.json index bcfa455..97f832c 100644 --- a/src/i18n/zh/navigation.json +++ b/src/i18n/zh/navigation.json @@ -75,7 +75,7 @@ "nav.settings.importExcel": "Excel 匯入", "nav.settings.importTesting": "匯入測試", "nav.settings.items": "物品", - "nav.settings.masterDataIssues": "數據問題", + "nav.settings.masterDataIssues": "BOM / 物料單位問題", "nav.settings.priceInquiry": "價格查詢", "nav.settings.printer": "列印機", "nav.settings.qcCategory": "QC 品檢模板",