Explorar o código

locale(cloud): translate cloud

crush394 %!s(int64=4) %!d(string=hai) anos
pai
achega
ca3fef0d87

+ 9 - 3
src/pages/cloud/Aliyun/index.tsx

@@ -2,7 +2,6 @@ import { PageContainer } from '@ant-design/pro-layout';
 import BaseService from '@/utils/BaseService';
 import { useRef } from 'react';
 import type { ActionType, ProColumns } from '@jetlinks/pro-table';
-import { useIntl } from '@@/plugin-locale/localeExports';
 import BaseCrud from '@/components/BaseCrud';
 import { message, Popconfirm, Tooltip } from 'antd';
 import {
@@ -13,6 +12,7 @@ import {
 } from '@ant-design/icons';
 import { CurdModel } from '@/components/BaseCrud/model';
 import type { AliyunItem } from '@/pages/cloud/Aliyun/typings';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 export const service = new BaseService<AliyunItem>('device/aliyun/bridge');
 
@@ -31,12 +31,18 @@ const Aliyun = () => {
       width: 48,
     },
     {
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
       align: 'center',
       dataIndex: 'name',
     },
     {
-      title: '说明',
+      title: intl.formatMessage({
+        id: 'pages.table.description',
+        defaultMessage: '说明',
+      }),
       align: 'center',
       dataIndex: 'description',
     },

+ 9 - 3
src/pages/cloud/Ctwing/index.tsx

@@ -6,8 +6,8 @@ import { PageContainer } from '@ant-design/pro-layout';
 import type { ActionType, ProColumns } from '@jetlinks/pro-table';
 import { message, Popconfirm, Tooltip } from 'antd';
 import { useRef } from 'react';
-import { useIntl } from '@@/plugin-locale/localeExports';
 import type { CtwingItem } from '@/pages/cloud/Ctwing/typings';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 export const service = new BaseService<CtwingItem>('ctwing/product');
 
@@ -26,7 +26,10 @@ const Ctwing = () => {
       width: 48,
     },
     {
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
       align: 'center',
       dataIndex: 'name',
     },
@@ -39,7 +42,10 @@ const Ctwing = () => {
       render: (value: any) => value.text,
     },
     {
-      title: '说明',
+      title: intl.formatMessage({
+        id: 'pages.table.description',
+        defaultMessage: '说明',
+      }),
       align: 'center',
       dataIndex: 'description',
     },

+ 21 - 6
src/pages/cloud/DuerOS/index.tsx

@@ -1,12 +1,12 @@
 import BaseService from '@/utils/BaseService';
 import type { ProColumns, ActionType } from '@jetlinks/pro-table';
-import { useIntl } from '@@/plugin-locale/localeExports';
 import { PageContainer } from '@ant-design/pro-layout';
 import BaseCrud from '@/components/BaseCrud';
 import { useRef } from 'react';
 import { Tooltip } from 'antd';
 import { EditOutlined, MinusOutlined } from '@ant-design/icons';
 import type { DuerOSItem } from '@/pages/cloud/DuerOS/typings';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 export const service = new BaseService<DuerOSItem>('dueros/product');
 const DuerOS = () => {
@@ -19,23 +19,38 @@ const DuerOS = () => {
       width: 48,
     },
     {
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
       dataIndex: 'name',
     },
     {
-      title: '设备类型',
+      title: intl.formatMessage({
+        id: 'pages.cloud.duerOS.applianceType',
+        defaultMessage: '设备类型',
+      }),
       dataIndex: 'applianceType',
     },
     {
-      title: '厂商名称',
+      title: intl.formatMessage({
+        id: 'pages.cloud.duerOS.manufacturerName',
+        defaultMessage: '厂家名称',
+      }),
       dataIndex: 'manufacturerName',
     },
     {
-      title: '动作数量',
+      title: intl.formatMessage({
+        id: 'pages.cloud.duerOS.version',
+        defaultMessage: '动作数量',
+      }),
       dataIndex: 'version',
     },
     {
-      title: '操作',
+      title: intl.formatMessage({
+        id: 'pages.data.option',
+        defaultMessage: '操作',
+      }),
       valueType: 'option',
       align: 'center',
       width: 200,

+ 14 - 5
src/pages/cloud/Onenet/index.tsx

@@ -1,6 +1,5 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import BaseService from '@/utils/BaseService';
-import { useIntl } from '@@/plugin-locale/localeExports';
 import { useRef } from 'react';
 import type { ActionType, ProColumns } from '@jetlinks/pro-table';
 import { message, Popconfirm, Tooltip } from 'antd';
@@ -13,6 +12,7 @@ import {
 import BaseCrud from '@/components/BaseCrud';
 import { CurdModel } from '@/components/BaseCrud/model';
 import type { OnenetItem } from '@/pages/cloud/Onenet/typings';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 export const service = new BaseService<OnenetItem>('one-net/product');
 
@@ -31,24 +31,33 @@ const Onenet = () => {
       width: 48,
     },
     {
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
       align: 'center',
       dataIndex: 'name',
     },
     {
-      title: '状态',
+      title: intl.formatMessage({
+        id: 'pages.searchTable.titleStatus',
+        defaultMessage: '状态',
+      }),
       align: 'center',
       dataIndex: 'state.text',
     },
     {
-      title: '说明',
+      title: intl.formatMessage({
+        id: 'pages.table.description',
+        defaultMessage: '说明',
+      }),
       align: 'center',
       dataIndex: 'description',
     },
     {
       title: intl.formatMessage({
         id: 'pages.data.option',
-        defaultMessage: '',
+        defaultMessage: '操作',
       }),
       valueType: 'option',
       align: 'center',