From 83b6203e615e00552d0b26a7b42374705d155224 Mon Sep 17 00:00:00 2001 From: "kelvin.yau" Date: Thu, 23 Jul 2026 13:56:12 +0800 Subject: [PATCH] translation fix --- src/app/(main)/settings/itemPrice/page.tsx | 2 +- .../ItemPriceSearch/ItemPriceSearch.tsx | 6 +- src/i18n/en/inventory.json | 132 +-------- src/i18n/zh/inventory.json | 262 +++++------------- 4 files changed, 83 insertions(+), 319 deletions(-) diff --git a/src/app/(main)/settings/itemPrice/page.tsx b/src/app/(main)/settings/itemPrice/page.tsx index 9b386b3..72bae26 100644 --- a/src/app/(main)/settings/itemPrice/page.tsx +++ b/src/app/(main)/settings/itemPrice/page.tsx @@ -15,7 +15,7 @@ const ItemPriceSetting: React.FC = async () => { <> - + }> diff --git a/src/components/ItemPriceSearch/ItemPriceSearch.tsx b/src/components/ItemPriceSearch/ItemPriceSearch.tsx index 54556e9..6d7f6fa 100644 --- a/src/components/ItemPriceSearch/ItemPriceSearch.tsx +++ b/src/components/ItemPriceSearch/ItemPriceSearch.tsx @@ -24,7 +24,7 @@ type ItemPriceSearchComponent = React.FC & { type SearchParamNames = keyof SearchQuery; const ItemPriceSearch: ItemPriceSearchComponent = () => { - const { t } = useTranslation(["itemPrice", "inventory", "common", "importExcel"]); + const { t } = useTranslation(["itemPrice", "common", "importExcel"]); const [item, setItem] = useState(null); const [isSearching, setIsSearching] = useState(false); @@ -275,7 +275,7 @@ const ItemPriceSearch: ItemPriceSearchComponent = () => { - {t("Average unit price", { ns: "inventory" })} + {t("Average unit price")} {avgPrice != null && avgPrice !== 0 @@ -292,7 +292,7 @@ const ItemPriceSearch: ItemPriceSearchComponent = () => { - {t("Latest market unit price", { ns: "inventory" })} + {t("Latest market unit price")} {item.latestMarketUnitPrice != null && Number(item.latestMarketUnitPrice) !== 0 diff --git a/src/i18n/en/inventory.json b/src/i18n/en/inventory.json index 1bb7e57..3dcb7bd 100644 --- a/src/i18n/en/inventory.json +++ b/src/i18n/en/inventory.json @@ -1,75 +1,28 @@ { - "-{{Variance}}≤Variance Percentage ≤{{Variance}} will be filtered out": "-{{Variance}}≤Variance Percentage ≤{{Variance}} will be filtered out", - "AVAILABLE": "AVAILABLE", "Action": "Action", "Add": "Add", "Add entry": "Add entry", "Add entry for items without inventory": "Add entry for items without inventory", "Adjusted Qty": "Adjusted Qty", - "Approve": "Approve", - "Approver All": "Approver All", - "Approver search empty hint": "Set search criteria and click Search", - "ApproverAll": "ApproverAll", - "Available": "Available", "Available Qty": "Available Qty", - "Available Qty Per Smallest Unit": "Available Qty Per Smallest Unit", - "Average unit price": "Average unit price", - "Back": "Back", - "Bad Item Handle": "Bad Item Handle", - "Bad Item Qty": "Bad Item Qty", - "Bad Item Records": "Bad Item Records", - "Balance Qty": "Balance Qty", - "Base UoM": "Base UoM", - "Batch Save Completed": "Batch Save Completed", - "Batch Save Inputted": "Batch Save Inputted", - "Batch Submit All": "Batch Submit All", - "Batch approver save completed: {{success}} success, {{skipped}} skipped, {{errors}} errors": "Batch approver save completed: {{success}} success, {{skipped}} skipped, {{errors}} errors", - "Body is unavailable": "Body is unavailable", - "Bom Req. Qty": "Bom Req. Qty", "CMB": "Consumables", "CO": "Consumables", - "Clear selection": "Clear selection", + "Cancel": "Cancel", "Code": "Code", - "Collapse floor sections": "Collapse sections for this floor", - "Confirm Adjustment": "Confirm Adjustment", - "Confirm create stock take for all sections?": "Confirm create stock take for all sections?", "Confirm remove": "Confirm remove", - "Counted Qty": "Counted Qty", - "Create Stock Take for All Sections": "Create Stock Take for All Sections", "Current Stock": "Current Stock", - "Delivery Order": "Delivery Order", "Difference": "Difference", "Download QR Code": "Download QR Code", "Edit mode": "Edit mode", - "End Date": "End Date", "Enter item code or name to search": "Enter item code or name to search", - "Expand floor sections": "Expand sections for this floor", "Expiry Date": "Expiry Date", - "Expiry End Date": "Expiry End Date", - "Expiry Item Handle": "Expiry Item Handle", - "Expiry Item Qty": "Expiry Item Qty", - "Expiry Item Records": "Expiry Item Records", - "Expiry Qty": "Expiry Qty", - "Expiry Start Date": "Expiry Start Date", "FG": "Finished good", "Failed to transfer stock": "Failed to transfer stock", "Failed to transfer stock. Please try again.": "Failed to transfer stock. Please try again.", - "Filtered out": "Filtered out", - "First Qty": "First Qty", - "Handled Date": "Handled Date", - "Handler": "Handler", - "Hide Search Filters": "Hide Search Filters", - "In Qty": "In Qty", - "Input": "Input", - "Invalid QTY": "Invalid quantity", "Inventory": "Inventory", - "Inventory Exception Management": "Inventory Exception Management", - "Item Name": "Item Name", + "Item": "Item", "Item selected": "Item selected", - "Item-lotNo": "Item-lotNo", - "Job Order": "Job Order", - "Latest market unit price": "Latest market unit price", - "Loading": "Loading", + "Location": "Location", "Lot No": "Lot No", "MA": "Material", "MI": "Miscellaneous", @@ -77,130 +30,59 @@ "NM": "Miscellaneous / non-consumables", "Name": "Name", "No Data": "No Data", - "No changes to submit": "No changes to submit", - "No issues found": "No issues found", + "No data": "No data", "No items are selected yet.": "No items are selected yet.", "No lot no entered, will be generated by system.": "No lot no entered, will be generated by system.", - "No record found": "No record found", "Opening Inventory": "Opening Inventory", "Optional - system will generate": "Optional - system will generate", "Original Qty": "Original Qty", - "Out Qty": "Out Qty", - "Perform Stock Take": "Perform Stock Take", - "Pick Order, Issue No, Item, Lot...": "Pick Order, Issue No, Item, Lot...", - "Please enter QTY and Bad QTY": "Please enter QTY and Bad QTY", "Please scan...": "Please scan...", - "Please set at least one search criterion": "Please set at least one search criterion", "Print": "Print", "Print QR Code": "Print QR Code", "Print Qty": "Print Qty", "Print failed": "Print failed", "Print sent": "Print sent", "Printer": "Printer", - "Qty": "Qty", "Qty To Be Transferred": "Qty To Be Transferred", - "Quantity exceeds available quantity": "Quantity exceeds available quantity", "RM": "Raw material", "Reason for adjustment": "Reason for adjustment", "Reason for removal": "Reason for removal", - "Refresh": "Refresh", "Remaining Qty": "Remaining Qty", "Remarks": "Remarks", "Remove": "Remove", - "Resolved": "Resolved", - "Review Variance": "Review Variance", - "Rows per page": "Rows per page", + "Reset": "Reset", "SFG": "Semi-finished good", - "Sales UoM": "Sales UoM", + "Save": "Save", "Save failed": "Save failed", "Saved successfully": "Saved successfully", "Search lot by QR code": "Search lot by QR code", - "Search to load lot lines": "Search to load lot lines", - "Second Qty": "Second Qty", - "Select": "Select", - "Select Section": "Select Section", - "Select Stock Take Section": "Select Stock Take Section", - "Select all sections": "Select all sections", - "Select sections placeholder": "Select one or more", - "Select stock take sections to create hint": "Choose warehouse stock take sections to start a new round (selected sections share one new round id in this batch).", - "Selected section count": "Selected: {{count}} section(s)", - "Show Search Filters": "Show Search Filters", - "Something went wrong fetching data in server.": "Something went wrong fetching data in server.", - "Start Date": "Start Date", "Start Location": "Start Location", - "Start New Stock Take": "Start New Stock Take", - "Start Time": "Start Time", "Stock Adjustment": "Stock Adjustment", - "Stock Record": "Stock Record", - "Stock Take Variance": "Stock Take Variance", "Stock Transfer": "Stock Transfer", "Stock UoM": "Stock UoM", - "Stock take adjustment confirmed! (Demo only)": "Stock take adjustment confirmed! (Demo only)", - "Stock take adjustment has been confirmed successfully!": "Stock take adjustment has been confirmed successfully!", - "Stock take qty exceeds maximum": "Stock take quantity cannot exceed 999,999,999,999", "Stock transfer created new lot": "Stock transfer completed (created new lot line).", "Stock transfer merged ambiguous": "Merged into the earliest available batch (multiple available lines for the same lot).", "Stock transfer merged existing lot": "Stock transfer completed (merged into existing lot).", "Stock transfer successful": "Stock transfer completed", "Stop QR Scan": "Stop QR Scan", "Submit": "Submit", - "Submit completed: {{success}} success, {{errors}} errors": "Submit completed: {{success}} success, {{errors}} errors", - "System Qty": "System Qty", "Target Location": "Target Location", - "Total Approved": "Total Approved", - "Total Issues": "Total Issues", - "Total Item Number": "Total Item Number", - "Total Stock Takes": "Total Stock Takes", - "Total need stock take": "Total need stock take", "Type": "Type", - "UNAVAILABLE": "UNAVAILABLE", - "Variance filter strict bounds": "Exclude boundaries (use > <)", - "View": "View", + "UoM": "UoM", "WIP": "Work in progress", - "Waiting for Approver": "Waiting for Approver", "Warehouse": "Warehouse", - "adj": "adj", - "approver": "approver", - "approving": "approving", - "available": "available", - "bad": "bad", "cmb": "Consumables", - "complete": "complete", - "completed": "completed", - "completed by": "completed by", - "completed date": "completed date", - "completed remarks": "completed remarks", - "completed status": "completed status", "consumable": "Consumable", "consumables": "Consumables", "dnNo": "dnNo", - "expiry": "expiry", "fg": "Finished good", "item": "Item", "mat": "Raw material", - "miss": "miss", "nm": "Miscellaneous / non-consumables", "non-consumables": "Non-consumables", - "nor": "nor", - "not available": "not available", - "not match": "not match", - "not pass": "not pass", - "notMatch": "notMatch", - "notmatch": "notmatch", - "open": "open", - "pass": "pass", - "pending": "pending", "productLotNo": "productLotNo", - "rejected": "rejected", - "save": "save", - "section": "section", "sfg": "Semi-finished good", - "stockTaking": "stockTaking", - "tke": "tke", "to": "to", - "trf": "trf", - "unavailable": "unavailable", - "variance": "variance", "wip": "Work in progress", "材料": "Material" } diff --git a/src/i18n/zh/inventory.json b/src/i18n/zh/inventory.json index f418c6a..fae7d82 100644 --- a/src/i18n/zh/inventory.json +++ b/src/i18n/zh/inventory.json @@ -1,206 +1,88 @@ { - "Inventory": "存貨", + "Action": "操作", + "Add": "新增", + "Add entry": "新增倉存", + "Add entry for items without inventory": "為無庫存貨品新增倉存", + "Adjusted Qty": "調整後倉存", + "Available Qty": "可用數量", + "CMB": "消耗品", + "CO": "消耗品", + "Cancel": "取消", "Code": "編號", - "Name": "名稱", - "Type": "類型", - "Lot No": "批號", + "Confirm remove": "確認移除", + "Current Stock": "現有庫存", + "Difference": "差異", + "Download QR Code": "下載", + "Edit mode": "編輯模式", + "Enter item code or name to search": "輸入貨品編號或名稱以搜索", "Expiry Date": "到期日", - "Warehouse": "倉庫", - "材料": "材料", - "consumable": "消耗品", - "Qty": "盤點數量", - "Total need stock take": "總需盤點數量", - "Waiting for Approver": "待審核數量", - "Total Approved": "已審核數量", - "mat": "原料", - "variance": "差異", - "ApproverAll": "審核員", - "Approver All": "審核員全部盤點", - "fg": "成品", "FG": "成品", - "sfg": "半成品", - "SFG": "半成品", - "consumables": "消耗品", - "non-consumables": "非消耗品", - "item": "貨品", - "NM": "雜項及非消耗品", - "CMB": "消耗品", - "RM": "原料", + "Failed to transfer stock": "轉倉失敗", + "Failed to transfer stock. Please try again.": "轉倉失敗,請重試。", + "Inventory": "存貨", + "Item": "貨品", + "Item selected": "已選擇貨品", + "Location": "位置", + "Lot No": "批號", "MA": "材料", - "CO": "消耗品", "MI": "雜項", - "wip": "半成品", - "WIP": "半成品", - "cmb": "消耗品", - "nm": "雜項及非消耗品", - "available": "可用", - "unavailable": "不可用", - "tke": "盤點", - "Total Stock Takes": "總盤點數量", - "Submit completed: {{success}} success, {{errors}} errors": "提交完成:{{success}} 成功,{{errors}} 失敗", - "Body is unavailable": "輸入不可用", - "Confirm create stock take for all sections?": "確認為所有區域創建盤點?", - "not available": "不可用", - "Batch Submit All": "批量提交所有", - "not match": "要求重點", - "Show Search Filters": "顯示搜索器", - "Hide Search Filters": "隱藏搜索器", - "-{{Variance}}≤Variance Percentage ≤{{Variance}} will be filtered out": "-{{Variance}}%≤差異百分比≤{{Variance}}%將被過濾掉", - "Variance filter strict bounds": "不使用=", - "Filtered out": "過濾掉", - "Total Item Number": "貨品數量", - "Please enter QTY and Bad QTY": "請輸入盤點數量和不良數量", - "Invalid QTY": "無效的數量", - "Stock take qty exceeds maximum": "盤點數量不可超過 999,999,999,999", - "Start Time": "開始時間", - "stockTaking": "盤點中", - "rejected": "已拒絕", - "miss": "缺貨", - "bad": "不良", - "expiry": "過期", - "open": "開倉", - "Bom Req. Qty": "需求數(BOM單位)", - "notmatch": "要求重點", - "pass": "已盤點", - "not pass": "不通過", - "Available": "可用", - "approving": "審核中", - "pending": "待處理", - "notMatch": "要求重點", - "Input": "輸入", - "Something went wrong fetching data in server.": "在伺服器上取得資料時發生錯誤。", - "save": "保存", - "AVAILABLE": "可用", - "View": "查看", - "approver": "審核員", - "Create Stock Take for All Sections": "為所有區域創建盤點", - "Select stock take sections to create hint": "請選擇要建立新盤點輪次的盤點區域(同一批次將共用同一輪次編號)。", - "Select sections placeholder": "可多選", - "Select all sections": "全選區域", - "Clear selection": "清除選取", - "Selected section count": "已選擇 {{count}} 個區域", - "Expand floor sections": "展開此樓層區域", - "Collapse floor sections": "收合此樓層區域", - "section": "區域", - "First Qty": "第一次盤點數量", - "Second Qty": "第二次盤點數量", - "Remarks": "備註", - "Available Qty": "可用數量", - "Sales UoM": "銷售單位", - "Stock UoM": "庫存單位", - "Available Qty Per Smallest Unit": "可用數量 (基本單位)", - "Base UoM": "基本單位", - "No items are selected yet.": "未選擇貨品", - "Item selected": "已選擇貨品", - "Delivery Order": "交貨單", - "Job Order": "工單", "Material": "物料", - "UNAVAILABLE": "不可用", - "No issues found": "未找到問題", - "Batch approver save completed: {{success}} success, {{skipped}} skipped, {{errors}} errors": "批次審核儲存完成:成功 {{success}} 筆,略過 {{skipped}} 筆,錯誤 {{errors}} 筆", - "Approve": "審核", - "complete": "完成", - "completed": "已完成", - "completed by": "完成者", - "completed date": "完成日期", - "completed remarks": "完成備註", - "completed status": "完成狀態", - "Pick Order, Issue No, Item, Lot...": "揀貨單, 問題編號, 貨品, 批號...", - "Refresh": "刷新", - "Resolved": "已解決", - "Total Issues": "總問題數量", - "Inventory Exception Management": "存貨異常管理", - "Back": "返回", - "Confirm Adjustment": "確認調整", - "Counted Qty": "盤點數量", - "Item Name": "貨品名稱", - "Perform Stock Take": "執行盤點", - "Review Variance": "審核差異", - "Select": "選擇", - "Select Section": "選擇區域", - "Select Stock Take Section": "選擇盤點區域", - "Start New Stock Take": "開始新的盤點", - "Stock Take Variance": "盤點差異", - "Stock take adjustment confirmed! (Demo only)": "盤點調整確認!(僅演示)", - "Stock take adjustment has been confirmed successfully!": "盤點調整確認成功!", - "System Qty": "系統數量", - "Batch Save Inputted": "批量保存已輸入", - "Batch Save Completed": "批量保存完成", - "Bad Item Handle": "不良品處理", - "Search to load lot lines": "請按搜索以載入批號", - "No changes to submit": "沒有可提交的變更", - "No record found": "沒有記錄", - "Rows per page": "每頁行數", - "Bad Item Records": "不良品處理紀錄", - "Expiry Item Handle": "過期品處理", - "Expiry Item Records": "過期品處理紀錄", - "Handled Date": "處理日期", - "Expiry Start Date": "到期日(開始)", - "Expiry End Date": "到期日(結束)", - "Bad Item Qty": "不良品數量", - "Expiry Item Qty": "過期品數量", - "Handler": "處理人", - "Quantity exceeds available quantity": "數量超過可用數量", - "Stock Record": "庫存記錄", - "Item-lotNo": "貨品-批號", - "In Qty": "入庫數量", - "Expiry Qty": "過期數量", - "Out Qty": "出庫數量", - "Balance Qty": "庫存數量", - "Start Date": "開始日期", - "End Date": "結束日期", - "Loading": "加載中", - "adj": "調整", - "nor": "正常", - "trf": "轉倉", - "Stock transfer successful": "轉倉成功", - "Stock transfer merged ambiguous": "已併入較早建立的批次(同批號有多筆可用)", - "Stock transfer merged existing lot": "轉倉成功(已併入既有批號)", - "Stock transfer created new lot": "轉倉成功(已建立新批號庫存)", - "Failed to transfer stock": "轉倉失敗", - "Failed to transfer stock. Please try again.": "轉倉失敗,請重試。", - "Download QR Code": "下載", - "Print QR Code": "列印", - "Stock Transfer": "轉倉", - "Start Location": "起點倉位", - "to": "轉倉至", - "Target Location": "目標倉位", + "NM": "雜項及非消耗品", + "Name": "名稱", + "No Data": "沒有數據", + "No data": "沒有數據", + "No items are selected yet.": "未選擇貨品", + "No lot no entered, will be generated by system.": "未輸入批號,將由系統生成。", + "Opening Inventory": "開倉", + "Optional - system will generate": "選填,系統將自動生成", "Original Qty": "原有數量", - "Qty To Be Transferred": "待轉數量", - "Remaining Qty": "剩餘數量", - "Submit": "確認", - "Printer": "列印機", - "Print Qty": "列印數量", + "Please scan...": "請掃描...", "Print": "列印", - "Print sent": "已送出列印", + "Print QR Code": "列印", + "Print Qty": "列印數量", "Print failed": "列印失敗", - "Stock Adjustment": "庫存調整", - "Edit mode": "編輯模式", - "Add entry": "新增倉存", - "productLotNo": "產品批號", - "dnNo": "送貨單編號", - "Optional - system will generate": "選填,系統將自動生成", - "Add": "新增", - "Opening Inventory": "開倉", + "Print sent": "已送出列印", + "Printer": "列印機", + "Qty To Be Transferred": "待轉數量", + "RM": "原料", "Reason for adjustment": "調整原因", - "No lot no entered, will be generated by system.": "未輸入批號,將由系統生成。", "Reason for removal": "移除原因", - "Confirm remove": "確認移除", - "Adjusted Qty": "調整後倉存", - "Difference": "差異", - "Action": "操作", - "Saved successfully": "儲存成功", - "Save failed": "儲存失敗", + "Remaining Qty": "剩餘數量", + "Remarks": "備註", "Remove": "移除", - "Average unit price": "平均單位價格", - "Latest market unit price": "最新市場價格", - "Add entry for items without inventory": "為無庫存貨品新增倉存", - "Enter item code or name to search": "輸入貨品編號或名稱以搜索", - "Current Stock": "現有庫存", + "Reset": "重置", + "SFG": "半成品", + "Save": "儲存", + "Save failed": "儲存失敗", + "Saved successfully": "儲存成功", "Search lot by QR code": "尋找批次(掃描二維碼)", - "Please scan...": "請掃描...", + "Start Location": "起點倉位", + "Stock Adjustment": "庫存調整", + "Stock Transfer": "轉倉", + "Stock UoM": "庫存單位", + "Stock transfer created new lot": "轉倉成功(已建立新批號庫存)", + "Stock transfer merged ambiguous": "已併入較早建立的批次(同批號有多筆可用)", + "Stock transfer merged existing lot": "轉倉成功(已併入既有批號)", + "Stock transfer successful": "轉倉成功", "Stop QR Scan": "停止掃碼", - "No Data": "沒有數據", - "Please set at least one search criterion": "請至少設定一項搜索條件", - "Approver search empty hint": "請設定搜索條件後點擊搜索" + "Submit": "確認", + "Target Location": "目標倉位", + "Type": "類型", + "UoM": "單位", + "WIP": "半成品", + "Warehouse": "倉庫", + "cmb": "消耗品", + "consumable": "消耗品", + "consumables": "消耗品", + "dnNo": "送貨單編號", + "fg": "成品", + "item": "貨品", + "mat": "原料", + "nm": "雜項及非消耗品", + "non-consumables": "非消耗品", + "productLotNo": "產品批號", + "sfg": "半成品", + "to": "轉倉至", + "wip": "半成品", + "材料": "材料" }