فهرست منبع

locale(device): translate Detail\Instance\device

crush394 4 سال پیش
والد
کامیت
cb66be7ba4

+ 16 - 17
src/locales/en-US/pages.ts

@@ -36,12 +36,13 @@ export default {
   'pages.table.username': 'userName',
   'pages.table.name': 'Name',
   'pages.table.deviceName': 'Device Name',
+  'pages.table.productName': 'Product Name',
   'pages.table.describe': 'Describe',
   'pages.table.description': 'Explain',
-  'pages.table.type': 'Type',
   'pages.table.provider': 'Provider',
+  'pages.table.type': 'Type',
   'pages.table.deviceId': 'Device ID',
-  'pages.table.productName': 'Product Name',
+
   // 统计分析
   'pages.analysis.cpu': 'CPU Usage',
   'pages.analysis.jvm': 'JVM Memory',
@@ -61,7 +62,7 @@ export default {
   // 系统设置-权限管理
   'pages.system.permission': 'Permission',
   'pages.system.permission.id': 'ID',
-  'pages.system.permission.name.tip': 'If the name is too long, it will automatically shrink',
+  'pages.system.permission.name.tips': 'If the name is too long, it will automatically shrink',
   'pages.system.permission.add': 'Add Entry',
   'pages.system.permission.addInformation': 'Basic Information',
   'pages.system.permission.addConfiguration': 'Operation Configuration',
@@ -80,7 +81,7 @@ export default {
   'pages.system.org.option.add': 'Add the lower',
   // 系统设置-第三方平台
   'pages.system.openApi': 'OpenAPI',
-  'pages.system.openApi.passWord': 'passWord',
+  'pages.system.openApi.password': 'password',
   'pages.system.openApi.ipWhileList': 'ipWhileList',
   // 系统设置-租户管理
   'pages.system.tenant': 'Tenant',
@@ -88,11 +89,10 @@ export default {
   'pages.system.tenant.avatar': 'Avatar',
   'pages.system.tenant.members': 'Members',
   // 系统设置-数据源管理
-  'pages.system.datasource.': 'Data Source',
+  'pages.system.datasource.': 'DataSource',
 
   // 设备管理-产品
-  'pages.device.product': 'Product',
-  'pages.device.product.list': 'Product List',
+  'pages.device.product': 'Product Manage',
   'pages.device.product.status.published': 'Published',
   'pages.device.product.status.unpublished': 'Unpublished',
   'pages.device.product.status.all': 'All',
@@ -102,20 +102,19 @@ export default {
   'pages.device.productDetail.protocolName': 'Message Protocol',
   'pages.device.productDetail.transportProtocol': 'Link Protocol',
   'pages.device.productDetail.createTime': 'Create Time',
-  'pages.device.productDetail.base': 'Configuration Information ',
+  'pages.device.productDetail.base': 'Configuration Information',
   'pages.device.productDetail.metadata': 'Metadata',
   'pages.device.productDetail.alarm': 'Alarm Set',
   'pages.device.productDetail.setting': 'Application Settings',
   'pages.device.productDetail.disable': 'Disable',
   // 设备管理-产品分类
-  'pages.device.category': 'Product Classification',
+  'pages.device.category': 'Category Manage',
   'pages.device.category.id': 'Classification ID',
   'pages.device.category.key': 'Key',
   'pages.device.category.name': 'Classification Name',
   'pages.device.category.addClass': 'Add Subclasses',
   // 设备管理-设备
-  'pages.device.instance': 'Equipment',
-  'pages.device.instance.management': 'Equipment Management',
+  'pages.device.instance': 'Instance Manage',
   'pages.device.instance.registrationTime': 'Registration Time',
   'pages.device.instance.status.notActive': 'Not Active',
   'pages.device.instance.status.offLine': 'Off Line',
@@ -132,6 +131,8 @@ export default {
   'pages.device.instanceDetail.tags': 'Tags',
   'pages.device.instanceDetail.save': 'Save',
   'pages.device.instanceDetail.detail': 'Detail',
+  'pages.device.instanceDetail.detail.sort': 'Sort',
+  'pages.device.instanceDetail.detail.value': 'Value',
   'pages.device.instanceDetail.detail.tags': 'Tags',
   'pages.device.instanceDetail.detail.addTags': 'Add Tags',
   'pages.device.instanceDetail.running': 'Running',
@@ -171,7 +172,7 @@ export default {
   'pages.device.firmware.signMethod': 'Sign Method',
   'pages.device.firmware.createTime': 'Create Time',
   // 设备管理-告警记录
-  'pages.device.alarm': 'Alarm',
+  'pages.device.alarm': 'Alarm Record',
   'pages.device.alarm.name': 'Alarm Name',
   'pages.device.alarm.time': 'Alarm Time',
   'pages.device.alarm.status': 'State',
@@ -180,18 +181,16 @@ export default {
   // 设备接入
   'pages.link.certificate': 'Certificate',
   'pages.link.protocol': 'Protocol',
-  'pages.link.component': 'Network components',
+  'pages.link.component': 'Component Manage',
   'pages.link.gateway': 'Gateway',
   'pages.link.opcua': 'OPC UA',
   'pages.link.type': 'Type',
   'pages.link.option.debug': 'Debug',
-  'pages.link.option.record': 'Record',
   // 通知管理
   'pages.notice.config': 'Config',
   'pages.notice.config.type': 'Type',
   'pages.notice.template': 'Template',
   'pages.notice.option.debug': 'Debug',
-  'pages.notice.option.record': 'Notification Records',
 
   // 规则引擎
   'pages.ruleEngine.instance': 'Instance',
@@ -251,6 +250,6 @@ export default {
   'pages.media.cascade': 'Cascade',
 
   // 边缘网关
-  'pages.edge.product': 'Product',
-  'pages.edge.device': 'Device',
+  'pages.edge.product': 'Product Manage',
+  'pages.edge.device': 'Device Manage',
 };

+ 5 - 4
src/locales/zh-CN/pages.ts

@@ -36,12 +36,13 @@ export default {
   'pages.table.username': '用户名',
   'pages.table.name': '名称',
   'pages.table.deviceName': '设备名称',
+  'pages.table.productName': '产品名称',
   'pages.table.describe': '描述',
   'pages.table.description': '说明',
   'pages.table.provider': '服务商',
   'pages.table.type': '类型',
   'pages.table.deviceId': '设备ID',
-  'pages.table.productName': '产品名称',
+
   // 统计分析
   'pages.analysis.cpu': 'CPU使用率',
   'pages.analysis.jvm': 'JVM内存',
@@ -80,7 +81,7 @@ export default {
   'pages.system.org.option.add': '添加下级',
   // 系统设置-第三方平台
   'pages.system.openApi': '第三方平台',
-  'pages.system.openApi.passWord': '密码',
+  'pages.system.openApi.password': '密码',
   'pages.system.openApi.ipWhileList': 'IP白名单',
   // 系统设置-租户管理
   'pages.system.tenant': '租户管理',
@@ -92,7 +93,6 @@ export default {
 
   // 设备管理-产品
   'pages.device.product': '产品',
-  'pages.device.product.list': '产品列表',
   'pages.device.product.status.published': '已发布',
   'pages.device.product.status.unpublished': '未发布',
   'pages.device.product.status.all': '全部',
@@ -115,7 +115,6 @@ export default {
   'pages.device.category.addClass': '添加子分类',
   // 设备管理-设备
   'pages.device.instance': '设备',
-  'pages.device.instance.management': '设备管理',
   'pages.device.instance.registrationTime': '注册时间',
   'pages.device.instance.status.notActive': '未启用',
   'pages.device.instance.status.offLine': '离线',
@@ -132,6 +131,8 @@ export default {
   'pages.device.instanceDetail.tags': '标签',
   'pages.device.instanceDetail.save': '保存',
   'pages.device.instanceDetail.detail': '实例信息',
+  'pages.device.instanceDetail.detail.sort': '排序',
+  'pages.device.instanceDetail.detail.value': '值',
   'pages.device.instanceDetail.detail.tags': '标签',
   'pages.device.instanceDetail.detail.addTags': '添加标签',
   'pages.device.instanceDetail.running': '运行状态',

+ 113 - 89
src/pages/device/Instance/Detail/Config/Tags/index.tsx

@@ -14,112 +14,136 @@ const SchemaField = createSchemaField({
 });
 const form = createForm();
 
-const schema = {
-  type: 'object',
-  properties: {
-    array: {
-      type: 'array',
-      'x-decorator': 'FormItem',
-      'x-component': 'ArrayTable',
-      'x-component-props': {
-        pagination: { pageSize: 10 },
-        scroll: { x: '100%' },
-      },
-      items: {
-        type: 'object',
-        properties: {
-          column1: {
-            type: 'void',
-            'x-component': 'ArrayTable.Column',
-            'x-component-props': { width: 50, title: '排序', align: 'center' },
-            properties: {
-              sort: {
-                type: 'void',
-                'x-component': 'ArrayTable.SortHandle',
+const Tags = observer(() => {
+  const intl = useIntl();
+  const schema = {
+    type: 'object',
+    properties: {
+      array: {
+        type: 'array',
+        'x-decorator': 'FormItem',
+        'x-component': 'ArrayTable',
+        'x-component-props': {
+          pagination: { pageSize: 10 },
+          scroll: { x: '100%' },
+        },
+        items: {
+          type: 'object',
+          properties: {
+            column1: {
+              type: 'void',
+              'x-component': 'ArrayTable.Column',
+              'x-component-props': {
+                width: 50,
+                title: intl.formatMessage({
+                  id: 'pages.device.instanceDetail.detail.sort',
+                  defaultMessage: '排序',
+                }),
+                align: 'center',
               },
-            },
-          },
-          column3: {
-            type: 'void',
-            'x-component': 'ArrayTable.Column',
-            'x-component-props': { width: 200, title: 'ID' },
-            properties: {
-              a1: {
-                type: 'string',
-                'x-decorator': 'Editable',
-                'x-component': 'Input',
+              properties: {
+                sort: {
+                  type: 'void',
+                  'x-component': 'ArrayTable.SortHandle',
+                },
               },
             },
-          },
-          column4: {
-            type: 'void',
-            'x-component': 'ArrayTable.Column',
-            'x-component-props': { width: 200, title: '名称' },
-            properties: {
-              a2: {
-                type: 'string',
-                'x-decorator': 'FormItem',
-                'x-component': 'Input',
+            column3: {
+              type: 'void',
+              'x-component': 'ArrayTable.Column',
+              'x-component-props': { width: 200, title: 'ID' },
+              properties: {
+                a1: {
+                  type: 'string',
+                  'x-decorator': 'Editable',
+                  'x-component': 'Input',
+                },
               },
             },
-          },
-          column5: {
-            type: 'void',
-            'x-component': 'ArrayTable.Column',
-            'x-component-props': { width: 200, title: '值' },
-            properties: {
-              a3: {
-                type: 'string',
-                'x-decorator': 'FormItem',
-                'x-component': 'Input',
+            column4: {
+              type: 'void',
+              'x-component': 'ArrayTable.Column',
+              'x-component-props': {
+                width: 200,
+                title: intl.formatMessage({
+                  id: 'pages.table.name',
+                  defaultMessage: '名称',
+                }),
+              },
+              properties: {
+                a2: {
+                  type: 'string',
+                  'x-decorator': 'FormItem',
+                  'x-component': 'Input',
+                },
               },
             },
-          },
-          column6: {
-            type: 'void',
-            'x-component': 'ArrayTable.Column',
-            'x-component-props': {
-              title: '操作',
-              dataIndex: 'operations',
-              width: 200,
-              fixed: 'right',
+            column5: {
+              type: 'void',
+              'x-component': 'ArrayTable.Column',
+              'x-component-props': {
+                width: 200,
+                title: intl.formatMessage({
+                  id: 'pages.device.instanceDetail.detail.value',
+                  defaultMessage: '值',
+                }),
+              },
+              properties: {
+                a3: {
+                  type: 'string',
+                  'x-decorator': 'FormItem',
+                  'x-component': 'Input',
+                },
+              },
             },
-            properties: {
-              item: {
-                type: 'void',
-                'x-component': 'FormItem',
-                properties: {
-                  remove: {
-                    type: 'void',
-                    'x-component': 'ArrayTable.Remove',
-                  },
-                  moveDown: {
-                    type: 'void',
-                    'x-component': 'ArrayTable.MoveDown',
-                  },
-                  moveUp: {
-                    type: 'void',
-                    'x-component': 'ArrayTable.MoveUp',
+            column6: {
+              type: 'void',
+              'x-component': 'ArrayTable.Column',
+              'x-component-props': {
+                title: intl.formatMessage({
+                  id: 'pages.data.option',
+                  defaultMessage: '操作',
+                }),
+                dataIndex: 'operations',
+                width: 200,
+                fixed: 'right',
+              },
+              properties: {
+                item: {
+                  type: 'void',
+                  'x-component': 'FormItem',
+                  properties: {
+                    remove: {
+                      type: 'void',
+                      'x-component': 'ArrayTable.Remove',
+                    },
+                    moveDown: {
+                      type: 'void',
+                      'x-component': 'ArrayTable.MoveDown',
+                    },
+                    moveUp: {
+                      type: 'void',
+                      'x-component': 'ArrayTable.MoveUp',
+                    },
                   },
                 },
               },
             },
           },
         },
-      },
-      properties: {
-        add: {
-          type: 'void',
-          'x-component': 'ArrayTable.Addition',
-          title: '添加标签',
+        properties: {
+          add: {
+            type: 'void',
+            'x-component': 'ArrayTable.Addition',
+            title: intl.formatMessage({
+              id: 'pages.device.instanceDetail.detail.value',
+              defaultMessage: '添加标签',
+            }),
+          },
         },
       },
     },
-  },
-};
-
-const Tags = observer(() => {
-  const intl = useIntl();
+  };
   return (
     <Card
       title={intl.formatMessage({

+ 67 - 42
src/pages/device/Instance/Detail/index.tsx

@@ -14,48 +14,6 @@ import Functions from '@/pages/device/Instance/Detail/Functions';
 import Running from '@/pages/device/Instance/Detail/Running';
 import { useIntl } from '@@/plugin-locale/localeExports';
 
-const list = [
-  {
-    key: 'detail',
-    tab: '实例信息',
-    component: <Config />,
-  },
-  {
-    key: 'running',
-    tab: '运行状态',
-    component: <Running />,
-  },
-  {
-    key: 'metadata',
-    tab: '物模型',
-    component: <Metadata />,
-  },
-  {
-    key: 'functions',
-    tab: '设备功能',
-    component: <Functions />,
-  },
-  {
-    key: 'log',
-    tab: '日志管理',
-    component: <Log />,
-  },
-  {
-    key: 'alarm',
-    tab: '告警设置',
-    component: <Alarm />,
-  },
-  {
-    key: 'visualization',
-    tab: '可视化',
-    component: null,
-  },
-  {
-    key: 'shadow',
-    tab: '设备影子',
-    component: null,
-  },
-];
 const InstanceDetail = observer(() => {
   const intl = useIntl();
   const [tab, setTab] = useState<string>('detail');
@@ -73,6 +31,73 @@ const InstanceDetail = observer(() => {
     }
   }, []);
 
+  const list = [
+    {
+      key: 'detail',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.detail',
+        defaultMessage: '实例信息',
+      }),
+      component: <Config />,
+    },
+    {
+      key: 'running',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.running',
+        defaultMessage: '运行状态',
+      }),
+      component: <Running />,
+    },
+    {
+      key: 'metadata',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.metadata',
+        defaultMessage: '物模型',
+      }),
+      component: <Metadata />,
+    },
+    {
+      key: 'functions',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.functions',
+        defaultMessage: '设备功能',
+      }),
+      component: <Functions />,
+    },
+    {
+      key: 'log',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.log',
+        defaultMessage: '日志管理',
+      }),
+      component: <Log />,
+    },
+    {
+      key: 'alarm',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.alarm',
+        defaultMessage: '告警设置',
+      }),
+      component: <Alarm />,
+    },
+    {
+      key: 'visualization',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.visualization',
+        defaultMessage: '可视化',
+      }),
+      component: null,
+    },
+    {
+      key: 'shadow',
+      tab: intl.formatMessage({
+        id: 'pages.device.instanceDetail.shadow',
+        defaultMessage: '设备影子',
+      }),
+      component: null,
+    },
+  ];
+
   return (
     <PageContainer
       onBack={history.goBack}