FPSMS-frontend
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

268 righe
11 KiB

  1. const fs = require('fs');
  2. const path = require('path');
  3. const en = {
  4. "pageTitle_delivery": "Delivery & Dispatch",
  5. "pageTitle_jobOrder": "Job Orders",
  6. "pageTitle_forecast": "Forecast & Planning",
  7. "pageTitle_warehouse": "Inventory & Warehouse",
  8. "pageTitle_equipmentBoard": "Equipment Usage Board",
  9. "pageTitle_processBoard": "Process Real-time Board",
  10. "pageTitle_jobOrderBoard": "Job Order Real-time Board",
  11. "pageTitle_purchase": "Purchase",
  12. "all": "All",
  13. "noData": "No data",
  14. "exportExcel": "Export Excel",
  15. "show": "Show",
  16. "laneX": "Lane X",
  17. "today": "Today",
  18. "yesterday": "Yesterday",
  19. "selectDate": "Select Date",
  20. "refresh": "Refresh",
  21. "otherBoards": "Other Boards",
  22. "autoRefresh": "Auto Refresh",
  23. "on": "On",
  24. "off": "Off",
  25. "intervalSeconds": "Interval (sec)",
  26. "minutes": "minutes",
  27. "minutesWithVal": "{{val}} min",
  28. "minuteAbbr": "min",
  29. "delivery_staffPerfDateError": "Staff performance start date cannot be later than end date",
  30. "delivery_ordersByDate": "Delivery Orders by Date",
  31. "delivery_ordersByDate_export": "Delivery_Orders_By_Date",
  32. "delivery_orderCount": "Order Count",
  33. "delivery_topItemsByCount": "Top Items by Delivery Count",
  34. "delivery_item": "Item",
  35. "delivery_itemPlaceholder": "Leave empty for all",
  36. "delivery_staffPerformanceTitle": "Staff Delivery Performance (Daily Pick Count & Duration)",
  37. "delivery_startDate": "Start Date",
  38. "delivery_endDate": "End Date",
  39. "delivery_store": "Store",
  40. "delivery_staff": "Staff",
  41. "delivery_staffPlaceholder": "Leave empty for all",
  42. "delivery_staffPerfCaption": "Per-person pick count & total duration for period",
  43. "delivery_colStaff": "Staff",
  44. "delivery_colPickCount": "Pick Count",
  45. "delivery_colTotalMin": "Total Min",
  46. "delivery_colAvgMin": "Avg Min/Order",
  47. "delivery_dailyByStaff": "Daily by Staff",
  48. "delivery_noDataDesc": "No delivery data available for the selected period.",
  49. "jo_byStatus": "Job Orders by Status",
  50. "jo_byStatus_export": "Job_Orders_By_Status",
  51. "jo_datePlanStart": "Date (Plan Start)",
  52. "jo_createdVsCompleted": "Job Orders Created vs Completed by Date",
  53. "jo_createdVsCompleted_export": "Job_Orders_Created_vs_Completed",
  54. "jo_detailSection": "Job Order Material / Process / Equipment",
  55. "jo_materialPendingPicked": "Material Pending / Picked (by Plan Date)",
  56. "jo_materialPendingPicked_export": "Material_Pending_vs_Picked",
  57. "jo_processPendingCompleted": "Process Pending / Completed (by Plan Date)",
  58. "jo_processPendingCompleted_export": "Process_Pending_vs_Completed",
  59. "jo_equipmentWorkingWorked": "Equipment In Use / Used (by Job Order)",
  60. "jo_equipmentWorkingWorked_export": "Equipment_In_Use_vs_Used",
  61. "board_jobOrderLive": "Job Order Live Board",
  62. "board_equipmentUsage": "Equipment Usage Board",
  63. "board_processLive": "Process Live Board",
  64. "board_jobOrderChart": "Job Order Chart",
  65. "forecast_plannedOutputByDate": "Planned Daily Output by Item (Forecast)",
  66. "forecast_plannedOutputByDate_export": "Planned_Daily_Output_By_Item",
  67. "forecast_itemCode": "Item Code",
  68. "forecast_noScheduleData": "No scheduling data for this date range.",
  69. "forecast_productionSchedule": "Production Schedule by Date (Estimated Output)",
  70. "forecast_productionSchedule_export": "Production_Schedule_By_Date",
  71. "warehouse_stockTxnByDate": "Stock Transactions by Date (In / Out / Total)",
  72. "warehouse_stockTxnByDate_export": "Stock_Transactions_By_Date",
  73. "warehouse_stockInOutByDate": "Stock In vs Out by Date",
  74. "warehouse_stockInOutByDate_export": "Stock_In_vs_Out",
  75. "warehouse_balanceTrend": "Stock Balance Trend",
  76. "warehouse_balanceTrend_export": "Stock_Balance_Trend",
  77. "warehouse_consumptionTrend": "Monthly Consumption Trend (Outbound)",
  78. "warehouse_consumptionTrend_export": "Monthly_Consumption_Trend",
  79. "warehouse_qty": "Qty",
  80. "warehouse_optional": "Optional",
  81. "warehouse_sumAll": "Sum all if empty",
  82. "warehouse_addItem": "Add item to split",
  83. "warehouse_exportFail": "Master export failed",
  84. "equipment_status": "Status",
  85. "equipment_equipment": "Equipment",
  86. "equipment_jobOrder": "Job Order",
  87. "equipment_process": "Process",
  88. "equipment_planStart": "Plan Start",
  89. "equipment_startTime": "Start Time",
  90. "equipment_endTime": "End Time",
  91. "equipment_operator": "Operator",
  92. "equipment_boardTitle": "Equipment Usage Board",
  93. "equipment_infoDescription1": "Shows equipment status in real-time: working, idle, or under maintenance.",
  94. "equipment_infoDescription2": "Each equipment card displays the current job order and process.",
  95. "equipment_infoDescription3": "Equipment with unclosed hours or missing time entries will be flagged.",
  96. "equipment_searchAndList": "Search & List",
  97. "equipment_notToday": "Not Today",
  98. "equipment_unclosedHours": "Equipment hours not closed",
  99. "equipment_missingHours": "Missing equipment hours",
  100. "equipment_completed": "Completed",
  101. "process_notStarted": "Not Started",
  102. "process_inProgress": "In Progress",
  103. "process_completed": "Completed",
  104. "process_nonToday": "Not Today",
  105. "dateRange_lastDays": "Last {{d}} days",
  106. "series_inbound": "Inbound",
  107. "series_outbound": "Outbound",
  108. "series_total": "Total",
  109. "series_balance": "Balance",
  110. "series_consumption": "Consumption",
  111. "series_created": "Created",
  112. "series_completed": "Completed",
  113. "series_month": "Month",
  114. "requestFailed": "Request failed"
  115. };
  116. const zh = {
  117. "pageTitle_delivery": "發貨與配送",
  118. "pageTitle_jobOrder": "工單",
  119. "pageTitle_forecast": "預測與計劃",
  120. "pageTitle_warehouse": "庫存與倉儲",
  121. "pageTitle_equipmentBoard": "設備使用看板",
  122. "pageTitle_processBoard": "工序即時看板",
  123. "pageTitle_jobOrderBoard": "工單即時看板",
  124. "pageTitle_purchase": "採購",
  125. "all": "全部",
  126. "noData": "無數據",
  127. "exportExcel": "匯出 Excel",
  128. "show": "顯示",
  129. "laneX": "車線-X",
  130. "today": "今日",
  131. "yesterday": "昨日",
  132. "selectDate": "選擇日期",
  133. "refresh": "重新整理",
  134. "otherBoards": "其他看板",
  135. "autoRefresh": "自動重新整理",
  136. "on": "開啟",
  137. "off": "關閉",
  138. "intervalSeconds": "間隔(秒)",
  139. "minutes": "分鐘",
  140. "minutesWithVal": "{{val}} 分鐘",
  141. "minuteAbbr": "分",
  142. "delivery_staffPerfDateError": "員工發貨績效的起始日期不能晚於結束日期",
  143. "delivery_ordersByDate": "按日期發貨單數量",
  144. "delivery_ordersByDate_export": "發貨單數量_按日期",
  145. "delivery_orderCount": "單數",
  146. "delivery_topItemsByCount": "發貨數量排行(按物料)",
  147. "delivery_item": "物料",
  148. "delivery_itemPlaceholder": "不選則全部",
  149. "delivery_staffPerformanceTitle": "員工發貨績效(每日揀貨數量與耗時)",
  150. "delivery_startDate": "開始日期",
  151. "delivery_endDate": "結束日期",
  152. "delivery_store": "倉別",
  153. "delivery_staff": "員工",
  154. "delivery_staffPlaceholder": "不選則全部",
  155. "delivery_staffPerfCaption": "週期內每人揀單數及總耗時(首揀至完成)",
  156. "delivery_colStaff": "員工",
  157. "delivery_colPickCount": "揀單數",
  158. "delivery_colTotalMin": "總分鐘",
  159. "delivery_colAvgMin": "平均分鐘/單",
  160. "delivery_dailyByStaff": "每日按員工單數",
  161. "delivery_noDataDesc": "所選期間內暫無發貨記錄,請調整日期範圍後再試。",
  162. "jo_byStatus": "工單按狀態",
  163. "jo_byStatus_export": "工單_按狀態",
  164. "jo_datePlanStart": "日期(計劃開始)",
  165. "jo_createdVsCompleted": "工單創建與完成按日期",
  166. "jo_createdVsCompleted_export": "工單_創建與完成_按日期",
  167. "jo_detailSection": "工單物料/工序/設備",
  168. "jo_materialPendingPicked": "物料待領/已揀(按工單計劃日)",
  169. "jo_materialPendingPicked_export": "物料_待領_已揀",
  170. "jo_processPendingCompleted": "工序待完成/已完成(按工單計劃日)",
  171. "jo_processPendingCompleted_export": "工序_待完成_已完成",
  172. "jo_equipmentWorkingWorked": "設備使用中/已使用(按工單)",
  173. "jo_equipmentWorkingWorked_export": "設備_使用中_已使用",
  174. "board_jobOrderLive": "工單即時看板",
  175. "board_equipmentUsage": "設備使用看板",
  176. "board_processLive": "工序即時看板",
  177. "board_jobOrderChart": "工單圖表",
  178. "forecast_plannedOutputByDate": "按物料計劃日產量(預測)",
  179. "forecast_plannedOutputByDate_export": "計劃日產量_按物料",
  180. "forecast_itemCode": "物料編碼",
  181. "forecast_noScheduleData": "此日期範圍內尚無排程資料。",
  182. "forecast_productionSchedule": "按日期生產排程(預估產量)",
  183. "forecast_productionSchedule_export": "生產排程_按日期",
  184. "warehouse_stockTxnByDate": "按日期庫存流水(入/出/合計)",
  185. "warehouse_stockTxnByDate_export": "庫存流水_按日期",
  186. "warehouse_stockInOutByDate": "按日期入庫與出庫",
  187. "warehouse_stockInOutByDate_export": "入庫_出庫_按日期",
  188. "warehouse_balanceTrend": "庫存餘額趨勢",
  189. "warehouse_balanceTrend_export": "庫存餘額趨勢",
  190. "warehouse_consumptionTrend": "按月考勤消耗趨勢(出庫量)",
  191. "warehouse_consumptionTrend_export": "月考勤消耗趨勢",
  192. "warehouse_qty": "數量",
  193. "warehouse_optional": "可選",
  194. "warehouse_sumAll": "不選則全部合計",
  195. "warehouse_addItem": "新增物料以分項顯示",
  196. "warehouse_exportFail": "總表匯出失敗",
  197. "equipment_status": "狀態",
  198. "equipment_equipment": "設備",
  199. "equipment_jobOrder": "工單",
  200. "equipment_process": "工序",
  201. "equipment_planStart": "工單計劃開始",
  202. "equipment_startTime": "開工時間",
  203. "equipment_endTime": "完工時間",
  204. "equipment_operator": "操作員",
  205. "equipment_boardTitle": "設備使用看板",
  206. "equipment_infoDescription1": "即時顯示設備狀態:使用中、閒置或維護中。",
  207. "equipment_infoDescription2": "每張設備卡片顯示當前工單和工序。",
  208. "equipment_infoDescription3": "設備工時未結案或未填寫將被標記。",
  209. "equipment_searchAndList": "查詢與列表",
  210. "equipment_notToday": "非今日",
  211. "equipment_unclosedHours": "設備工時未結案",
  212. "equipment_missingHours": "未填設備工時",
  213. "equipment_completed": "已完工",
  214. "process_notStarted": "未開工",
  215. "process_inProgress": "進行中",
  216. "process_completed": "已完工",
  217. "process_nonToday": "非今日",
  218. "dateRange_lastDays": "最近 {{d}} 天",
  219. "series_inbound": "入庫",
  220. "series_outbound": "出庫",
  221. "series_total": "合計",
  222. "series_balance": "餘額",
  223. "series_consumption": "消耗",
  224. "series_created": "新建",
  225. "series_completed": "完成",
  226. "series_month": "月份",
  227. "requestFailed": "請求失敗"
  228. };
  229. const i18nDir = path.join(__dirname, '..', 'src', 'i18n');
  230. const enPath = path.join(i18nDir, 'en', 'chart.json');
  231. const zhPath = path.join(i18nDir, 'zh', 'chart.json');
  232. // Sort keys alphabetically
  233. const sortKeys = (obj) => {
  234. const sorted = {};
  235. Object.keys(obj).sort().forEach(k => { sorted[k] = obj[k]; });
  236. return sorted;
  237. };
  238. fs.writeFileSync(enPath, JSON.stringify(sortKeys(en), null, 2) + '\n');
  239. fs.writeFileSync(zhPath, JSON.stringify(sortKeys(zh), null, 2) + '\n');
  240. console.log('Updated chart.json with', Object.keys(en).length, 'keys for each language');