Browse Source

feat: 加入数据分析模块语言包

vera_min 1 month ago
parent
commit
902054a4fb

+ 11 - 4
src/i18n/index.ts

@@ -2,7 +2,7 @@
  * @Author: vera_min vera_min@163.com
  * @Date: 2025-08-02 12:21:54
  * @LastEditors: vera_min vera_min@163.com
- * @LastEditTime: 2025-08-06 01:54:53
+ * @LastEditTime: 2025-09-01 10:43:44
  * @FilePath: /sagoo-admin-ui/src/i18n/index.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -46,6 +46,10 @@ import pagesDateCenterZhcn from './pages/dateCenter/zh-cn';
 import pagesDateCenterEn from './pages/dateCenter/en';
 import pagesDateCenterZhtw from './pages/dateCenter/zh-tw';
 
+import pagesDataAnalysisZhcn from './pages/dataAnalysis/zh-cn';
+import pagesDataAnalysisEn from './pages/dataAnalysis/en';
+import pagesDataAnalysisZhtw from './pages/dataAnalysis/zh-tw';
+
 
 // 定义语言国际化内容
 /**
@@ -65,7 +69,8 @@ const messages = {
 			iotCard: pagesIotcardZhcn,
 			projects: pagesProjectsZhcn,
 			property: pagesPropertyZhcn,
-			dateCenter: pagesDateCenterZhcn
+			dateCenter: pagesDateCenterZhcn,
+			dataAnalysis: pagesDataAnalysisZhcn,
 		}
 	},
 	[enLocale.name]: {
@@ -79,7 +84,8 @@ const messages = {
 			iotCard: pagesIotcardEn,
 			projects: pagesProjectsEn,
 			property: pagesPropertyEn,
-			dateCenter: pagesDateCenterEn
+			dateCenter: pagesDateCenterEn,
+			dataAnalysis: pagesDataAnalysisEn,
 		},	
 	},
 	[zhtwLocale.name]: {
@@ -93,7 +99,8 @@ const messages = {
 			iotCard: pagesIotcardZhtw,
 			projects: pagesProjectsZhtw,
 			property: pagesPropertyZhtw,
-			dateCenter: pagesDateCenterZhtw
+			dateCenter: pagesDateCenterZhtw,
+			dataAnalysis: pagesDataAnalysisZhtw,
 		},
 	},
 };

+ 115 - 0
src/i18n/pages/dataAnalysis/en.ts

@@ -0,0 +1,115 @@
+// 数据分析
+export default {
+  tabs: {
+    info: 'Source Info',
+    nodes: 'Data Nodes',
+    viewData: 'View Data',
+    baseInfo: 'Basic Info',
+    ruleExpr: 'Rule Expression',
+    reqParams: 'Request Params',
+    sourceConfig: 'Source Config',
+    indicator: {
+      dialogTitleAdd: 'Add Calculation Indicator Model',
+      dialogTitleEdit: 'Edit Calculation Indicator Model',
+      labels: {
+        key: 'Indicator Key',
+        name: 'Indicator Name',
+        description: 'Description',
+        formula: 'Formula',
+        dataType: 'Data Type',
+        accuracy: 'Accuracy',
+        operators: 'Operators',
+        deviceAttr: 'Device Attribute',
+        currentFormula: 'Current Formula',
+        editFormula: 'Edit',
+      },
+      placeholders: {
+        inputKey: 'Enter indicator key',
+        inputName: 'Enter indicator name',
+        inputDescription: 'Enter description',
+        inputFormula: 'Enter formula',
+        selectDataType: 'Select data type',
+        inputAccuracy: 'Enter accuracy',
+      },
+      types: {
+        int: 'int (integer)',
+        long: 'long (long integer)',
+        float: 'float (single precision)',
+        double: 'double (double precision)',
+      },
+    },
+  },
+  labels: {
+    selectProduct: 'Select Product',
+    selectDevice: 'Select Device',
+    selectProperty: 'Select Property',
+    selectTime: 'Select Time',
+  },
+  columns: {
+    id: 'ID',
+    key: 'Key',
+    name: 'Name',
+    dataType: 'Data Type',
+    value: 'Value Items',
+    createdAt: 'Created At',
+    action: 'Actions',
+    sourceId: 'ID',
+    from: 'Source Type',
+  },
+  actions: {
+    printChart: "Print Chart",
+    publish: 'Publish',
+    disable: 'Disable',
+    add: 'Add',
+    edit: 'Edit',
+    delete: 'Delete',
+    detail: 'Detail',
+    search: 'Search',
+    batchDelete: 'Batch Delete',
+    copy: 'Copy',
+  },
+  status: {
+    published: 'Published',
+    unpublished: 'Unpublished',
+    all: 'All',
+  },
+  options: {
+    all: 'All',
+    api: 'API Import',
+    db: 'Database',
+    file: 'File',
+    device: 'Device',
+    yes: 'Yes',
+    no: 'No',
+  },
+  messages: {
+    opSuccess: 'Operation succeeded',
+    deleteConfirmSelected: 'Are you sure to delete selected data?',
+    deleteNodeConfirm: 'This will permanently delete node: "{name}". Continue?',
+    pleaseSelectToDelete: 'Please select data to delete.',
+    tip: 'Tip',
+    confirm: 'Confirm',
+    cancel: 'Cancel',
+    deleteSuccess: 'Deleted successfully',
+    copyConfirm: 'Confirm to copy this data?',
+    copySuccess: 'Copied successfully',
+    batchDeleteConfirm: 'Confirm to batch delete these data?',
+    deleteRowConfirm: 'This will delete: "{name}". Continue?',
+  },
+  placeholders: {
+    selectProduct: "Select Product",
+    selectDevice: "Select Device",
+    selectProperty: "Select Property",
+    selectTime: "Select Time",
+  },
+  // 指标趋势
+  exponentialTrend: {
+    title: "Exponential Trend",
+    recentOneHour: "Last Hour",
+    recent24Hours: "Last 24H",
+    recentOneWeek: "Last Week",
+    startDate: "Start Date",
+    endDate: "End Date",
+    chartNotLoaded: "Chart Not Loaded"
+  }
+};

+ 115 - 0
src/i18n/pages/dataAnalysis/zh-cn.ts

@@ -0,0 +1,115 @@
+// 数据分析
+export default {
+  tabs: {
+    info: '数据源信息',
+    nodes: '数据节点',
+    viewData: '查看数据',
+    baseInfo: '基本信息',
+    ruleExpr: '规则表达式',
+    reqParams: '请求参数',
+    sourceConfig: '数据源配置',
+    indicator: {
+      dialogTitleAdd: '新增计算指标模型',
+      dialogTitleEdit: '修改计算指标模型',
+      labels: {
+        key: '指标标识',
+        name: '指标名称',
+        formula: '计算公式',
+        dataType: '数据类型',
+        description: '指标说明',
+        accuracy: '精度',
+        operators: '运算符号',
+        deviceAttr: '设备属性',
+        currentFormula: '当前公式',
+        editFormula: '编辑',
+      },
+      placeholders: {
+        inputKey: '请输入指标标识',
+        inputName: '请输入指标名称',
+        inputDescription: '请输入指标说明',
+        inputFormula: '请输入计算公式',
+        selectDataType: '请选择数据类型',
+        inputAccuracy: '请输入精度',
+      },
+      types: {
+        int: 'int(整数型)',
+        long: 'long(长整数型)',
+        float: 'float(单精度)',
+        double: 'double(双精度)',
+      },
+    },
+  },
+  labels: {
+    selectProduct: '选择产品',
+    selectDevice: '选择设备',
+    selectProperty: '选择属性',
+    selectTime: '选择时间',
+  },
+  columns: {
+    id: 'ID',
+    key: '数据标识',
+    name: '数据名称',
+    dataType: '数据类型',
+    value: '数据取值项',
+    createdAt: '创建时间',
+    action: '操作',
+    sourceId: 'ID',
+    from: '数据源类型',
+  },
+  actions: {
+    printChart: "打印图表",
+    publish: '发布',
+    disable: '停用',
+    add: '新增',
+    edit: '编辑',
+    delete: '删除',
+    detail: '详情',
+    search: '查询',
+    batchDelete: '批量删除',
+    copy: '复制',
+  },
+  status: {
+    published: '已发布',
+    unpublished: '未发布',
+    all: '全部',
+  },
+  options: {
+    all: '全部',
+    api: 'api导入',
+    db: '数据库',
+    file: '文件',
+    device: '设备',
+    yes: '是',
+    no: '否',
+  },
+  messages: {
+    opSuccess: '操作成功',
+    deleteConfirmSelected: '你确定要删除所选数据?',
+    deleteNodeConfirm: '此操作将永久删除数据节点:“{name}”,是否继续?',
+    pleaseSelectToDelete: '请选择要删除的数据。',
+    tip: '提示',
+    confirm: '确认',
+    cancel: '取消',
+    deleteSuccess: '删除成功',
+    copyConfirm: '确定要复制该数据吗?',
+    copySuccess: '复制成功',
+    batchDeleteConfirm: '是否确认要批量删除这些数据吗?',
+    deleteRowConfirm: '此操作将删除:“{name}”,是否继续?',
+  },
+  placeholders: {
+    selectProduct: "请选择产品",
+    selectDevice: "请选择设备",
+    selectProperty: "请选择属性",
+    selectTime: "请选择时间",
+  },
+  // 指标趋势
+  exponentialTrend: {
+    title: "指标趋势统计图",
+    recentOneHour: "最近一小时",
+    recent24Hours: "最近24小时",
+    recentOneWeek: "最近一周",
+    startDate: "开始日期",
+    endDate: "结束日期",
+    chartNotLoaded: "图表未加载"
+  }
+};

+ 115 - 0
src/i18n/pages/dataAnalysis/zh-tw.ts

@@ -0,0 +1,115 @@
+// 数据分析
+export default {
+  tabs: {
+    info: '資料源資訊',
+    nodes: '資料節點',
+    viewData: '查看資料',
+    baseInfo: '基本資訊',
+    ruleExpr: '規則表示式',
+    reqParams: '請求參數',
+    sourceConfig: '資料源配置',
+    indicator: {
+      dialogTitleAdd: '新增計算指標模型',
+      dialogTitleEdit: '修改計算指標模型',
+      labels: {
+        key: '指標標識',
+        name: '指標名稱',
+        formula: '計算公式',
+        dataType: '資料型別',
+        description: '指標說明',
+        accuracy: '精度',
+        operators: '運算符號',
+        deviceAttr: '設備屬性',
+        currentFormula: '當前公式',
+        editFormula: '編輯',
+      },
+      placeholders: {
+        inputKey: '請輸入指標標識',
+        inputName: '請輸入指標名稱',
+        inputDescription: '請輸入指標說明',
+        inputFormula: '請輸入計算公式',
+        selectDataType: '請選擇資料型別',
+        inputAccuracy: '請輸入精度',
+      },
+      types: {
+        int: 'int(整數型)',
+        long: 'long(長整數型)',
+        float: 'float(單精度)',
+        double: 'double(雙精度)',
+      },
+    },
+  },
+  labels: {
+    selectProduct: '選擇產品',
+    selectDevice: '選擇設備',
+    selectProperty: '選擇屬性',
+    selectTime: '選擇時間',
+  },
+  columns: {
+    id: 'ID',
+    key: '資料標識',
+    name: '資料名稱',
+    dataType: '資料型別',
+    value: '取值項',
+    createdAt: '建立時間',
+    action: '操作',
+    sourceId: 'ID',
+    from: '資料源類型',
+  },
+  actions: {
+    printChart: "列印圖表",
+    publish: '發布',
+    disable: '停用',
+    add: '新增',
+    edit: '編輯',
+    delete: '刪除',
+    detail: '詳情',
+    search: '查詢',
+    batchDelete: '批次刪除',
+    copy: '複製',
+  },
+  status: {
+    published: '已發布',
+    unpublished: '未發布',
+    all: '全部',
+  },
+  options: {
+    all: '全部',
+    api: 'API 導入',
+    db: '資料庫',
+    file: '檔案',
+    device: '設備',
+    yes: '是',
+    no: '否',
+  },
+  messages: {
+    opSuccess: '操作成功',
+    deleteConfirmSelected: '確定要刪除所選資料嗎?',
+    deleteNodeConfirm: '此操作將永久刪除資料節點:「{name}」,是否繼續?',
+    pleaseSelectToDelete: '請選擇要刪除的資料。',
+    tip: '提示',
+    confirm: '確認',
+    cancel: '取消',
+    deleteSuccess: '刪除成功',
+    copyConfirm: '確定要複製該資料嗎?',
+    copySuccess: '複製成功',
+    batchDeleteConfirm: '是否確認要批次刪除這些資料?',
+    deleteRowConfirm: '此操作將刪除:「{name}」,是否繼續?',
+  },
+  placeholders: {
+    selectProduct: "請選擇產品",
+    selectDevice: "請選擇設備",
+    selectProperty: "請選擇屬性",
+    selectTime: "請選擇時間",
+  },
+  // 指標趨勢
+  exponentialTrend: {
+    title: "指標趨勢統計圖",
+    recentOneHour: "最近一小時",
+    recent24Hours: "最近24小時",
+    recentOneWeek: "最近一週",
+    startDate: "開始日期",
+    endDate: "結束日期",
+    chartNotLoaded: "圖表未載入"
+  }
+};