Explorar o código

locale(src):translate analysis and system

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

+ 42 - 10
src/components/Authorization/index.tsx

@@ -10,6 +10,7 @@ import Service from '@/components/Authorization/service';
 import styles from './index.less';
 import _ from 'lodash';
 import { AuthorizationModel } from '@/components/Authorization/autz';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 const service = new Service();
 
@@ -27,7 +28,7 @@ const tableName = 'permission';
 const Authorization = observer((props: AuthorizationProps) => {
   const [form] = Form.useForm();
   const { target, close } = props;
-
+  const intl = useIntl();
   const calculationSelectAll = useMemo(
     () => (permissionDB: PermissionItem[], data: Record<string, any>) => {
       // 计算是否全选
@@ -153,12 +154,18 @@ const Authorization = observer((props: AuthorizationProps) => {
 
   const columns: TableColumnsType<PermissionItem> = [
     {
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
       dataIndex: 'name',
       width: 200,
     },
     {
-      title: '权限操作',
+      title: intl.formatMessage({
+        id: 'pages.system.authorization.actions',
+        defaultMessage: '权限操作',
+      }),
       dataIndex: 'actions',
       render: (text: { action: string; name: string; id: string }[], record) => (
         <Form.Item name={record.id}>
@@ -200,7 +207,10 @@ const Authorization = observer((props: AuthorizationProps) => {
             form.setFieldsValue(tempForm);
           }}
         >
-          全选
+          {intl.formatMessage({
+            id: 'pages.system.authorization.selectAll',
+            defaultMessage: '全选',
+          })}
         </Checkbox>
       ),
       width: 200,
@@ -215,7 +225,10 @@ const Authorization = observer((props: AuthorizationProps) => {
               });
             }}
           >
-            全选
+            {intl.formatMessage({
+              id: 'pages.system.authorization.selectAll',
+              defaultMessage: '全选',
+            })}
           </Checkbox>
         </Form.Item>
       ),
@@ -231,10 +244,20 @@ const Authorization = observer((props: AuthorizationProps) => {
         wrapperCol={{ span: 20 }}
         labelCol={{ span: 3 }}
       >
-        <Form.Item label="被授权主体">
+        <Form.Item
+          label={intl.formatMessage({
+            id: 'pages.analysis.cpu',
+            defaultMessage: '被授权主体',
+          })}
+        >
           <Input value={target.name} disabled={true} />
         </Form.Item>
-        <Form.Item label="筛选权限">
+        <Form.Item
+          label={intl.formatMessage({
+            id: 'pages.system.authorization.screen',
+            defaultMessage: '筛选权限',
+          })}
+        >
           <Input.Group>
             <Row>
               <Col span={4}>
@@ -249,7 +272,10 @@ const Authorization = observer((props: AuthorizationProps) => {
               </Col>
               <Col span={20}>
                 <Input.Search
-                  placeholder="请输入权限名称"
+                  placeholder={intl.formatMessage({
+                    id: 'pages.system.authorization.screen.tip',
+                    defaultMessage: '请输入权限名称',
+                  })}
                   onSearch={(name: string) =>
                     searchPermission(name, AuthorizationModel.filterParam?.type)
                   }
@@ -269,10 +295,16 @@ const Authorization = observer((props: AuthorizationProps) => {
       </Form>
       <div className={styles.action}>
         <Button onClick={close} style={{ marginRight: 8 }}>
-          关闭
+          {intl.formatMessage({
+            id: 'pages.system.authorization.close',
+            defaultMessage: '关闭',
+          })}
         </Button>
         <Button onClick={form.submit} type="primary">
-          保存
+          {intl.formatMessage({
+            id: 'pages.system.authorization.save',
+            defaultMessage: '保存',
+          })}
         </Button>
       </div>
     </Spin>

+ 12 - 2
src/components/BindUser/Bound.tsx

@@ -8,8 +8,10 @@ import SystemConst from '@/utils/const';
 import { observer } from '@formily/react';
 import { BindModel } from '@/components/BindUser/model';
 import { columns, service } from '@/components/BindUser/index';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 const Bound = observer(() => {
+  const intl = useIntl();
   const actionRef = useRef<ActionType>();
 
   useEffect(() => {
@@ -59,7 +61,12 @@ const Bound = observer(() => {
   };
 
   return (
-    <Card title="已绑定用户">
+    <Card
+      title={intl.formatMessage({
+        id: 'pages.bindUser.theBoundUser',
+        defaultMessage: '已绑定用户',
+      })}
+    >
       <ProTable
         size="small"
         rowKey="id"
@@ -102,7 +109,10 @@ const Bound = observer(() => {
             icon={<PlusOutlined />}
             type="primary"
           >
-            绑定用户
+            {intl.formatMessage({
+              id: 'pages.system.role.option.bindUser',
+              defaultMessage: '绑定用户',
+            })}
           </Button>,
         ]}
       />

+ 34 - 5
src/locales/en-US/pages.ts

@@ -33,7 +33,6 @@ export default {
   'pages.searchTable.titleStatus.normal': 'Normal',
   'pages.searchTable.titleStatus.disable': 'Disable',
   'pages.searchTable.titleOption': 'Option',
-  'pages.table.username': 'userName',
   'pages.table.name': 'Name',
   'pages.table.deviceName': 'Device Name',
   'pages.table.productName': 'Product Name',
@@ -44,21 +43,49 @@ export default {
   'pages.table.deviceId': 'Device ID',
 
   // 统计分析
+  'pages.analysis.volume': 'Device Message Volume Today',
+  'pages.analysis.deviceStatistics': 'Device Statistics',
+  'pages.analysis.deviceStatistics.notActive': 'Not Active',
+  'pages.analysis.deviceStatistics.total': 'Total',
+  'pages.analysis.deviceStatistics.online': 'Online',
+  'pages.analysis.deviceMessage': 'Device Message',
+  'pages.analysis.deviceMessage.hour': 'hour',
+  'pages.analysis.deviceMessage.minute': 'minute',
+  'pages.analysis.deviceMessage.1hour': '1 hour',
+  'pages.analysis.deviceMessage.1day': '1 day',
+  'pages.analysis.deviceMessage.7days': '7 days',
+  'pages.analysis.deviceMessage.30days': '30 days',
   'pages.analysis.cpu': 'CPU Usage',
   'pages.analysis.jvm': 'JVM Memory',
   'pages.analysis.information': 'Information Completeness',
 
   // 系统设置-用户管理
   'pages.system.user': 'User',
-  'pages.system.user.name': 'name',
-  'pages.system.user.password': 'password',
-  'pages.system.user.confirmPassword': 'confirmPassword',
+  'pages.system.name': 'name',
+  'pages.system.username': 'username',
+  'pages.system.password': 'password',
+  'pages.system.confirmPassword': 'confirmPassword',
   'pages.system.userName.tips': 'If the username is too long, it will automatically shrink',
   'pages.system.name.tips': 'Names that are too long automatically shrink',
-  // 角色管理
+  // 系统设置-用户管理-授权
+  'pages.system.authorization.subject': 'The Authorized Principal',
+  'pages.system.authorization.screen': 'Filter Permissions',
+  'pages.system.authorization.screen.all': 'All',
+  'pages.system.authorization.screen.default': 'Default',
+  'pages.system.authorization.screen.system': 'System',
+  'pages.system.authorization.screen.business': 'Business Functions',
+  'pages.system.authorization.screen.multiTenant': 'Multi Tenant',
+  'pages.system.authorization.screen.tip': 'Please enter the permission name',
+  'pages.system.authorization.actions': 'Permission To Operate',
+  'pages.system.authorization.selectAll': 'Select All',
+  'pages.system.authorization.close': 'Close',
+  'pages.system.authorization.save': 'Save',
+  // 系统设置-角色管理
   'pages.system.role': 'Role',
   'pages.system.role.id': 'ID',
   'pages.system.role.option.bindUser': 'Bind User',
+  // 系统设置-角色管理-绑定用户
+  'pages.bindUser.theBoundUser': 'The Bound User',
   // 系统设置-权限管理
   'pages.system.permission': 'Permission',
   'pages.system.permission.id': 'ID',
@@ -71,6 +98,7 @@ export default {
   'pages.system.permission.addPermissionPreOperation': 'Pre Operation',
   'pages.system.permission.addPermissionOperation': 'Associated Operation',
   'pages.system.permission.addDataView': 'Data View',
+  'pages.system.permission.addDataViewField': 'Field',
   // 系统设置-机构管理
   'pages.system.org': 'Organization',
   'pages.system.org.encoding': 'Code',
@@ -81,6 +109,7 @@ export default {
   'pages.system.org.option.add': 'Add the lower',
   // 系统设置-第三方平台
   'pages.system.openApi': 'OpenAPI',
+  'pages.system.openApi.username': 'username',
   'pages.system.openApi.password': 'password',
   'pages.system.openApi.ipWhileList': 'ipWhileList',
   // 系统设置-租户管理

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

@@ -33,7 +33,6 @@ export default {
   'pages.searchTable.titleStatus.normal': '正常',
   'pages.searchTable.titleStatus.disable': '禁用',
   'pages.searchTable.titleOption': '操作',
-  'pages.table.username': '用户名',
   'pages.table.name': '名称',
   'pages.table.deviceName': '设备名称',
   'pages.table.productName': '产品名称',
@@ -44,21 +43,49 @@ export default {
   'pages.table.deviceId': '设备ID',
 
   // 统计分析
+  'pages.analysis.volume': '今日设备消息量',
+  'pages.analysis.deviceStatistics': '设备统计',
+  'pages.analysis.deviceStatistics.notActive': '未激活',
+  'pages.analysis.deviceStatistics.total': '总数',
+  'pages.analysis.deviceStatistics.online': '在线',
+  'pages.analysis.deviceMessage': '设备消息',
+  'pages.analysis.deviceMessage.hour': '时',
+  'pages.analysis.deviceMessage.minute': '分',
+  'pages.analysis.deviceMessage.1hour': '1小时',
+  'pages.analysis.deviceMessage.1day': '1天',
+  'pages.analysis.deviceMessage.7days': '7天',
+  'pages.analysis.deviceMessage.30days': '30天',
   'pages.analysis.cpu': 'CPU使用率',
   'pages.analysis.jvm': 'JVM内存',
   'pages.analysis.information': '信息完成度',
 
   // 系统设置-用户管理
   'pages.system.user': '用户管理',
-  'pages.system.user.name': '姓名',
-  'pages.system.user.password': '密码',
-  'pages.system.user.confirmPassword': '确认密码',
+  'pages.system.name': '姓名',
+  'pages.system.username': '用户名',
+  'pages.system.password': '密码',
+  'pages.system.confirmPassword': '确认密码',
   'pages.system.userName.tips': '用户名过长会自动收缩',
   'pages.system.name.tips': '姓名过长会自动收缩',
-  // 角色管理
+  // 系统设置-用户管理-授权
+  'pages.system.authorization.subject': '被授权主体',
+  'pages.system.authorization.screen': '筛选权限',
+  'pages.system.authorization.screen.all': '全部',
+  'pages.system.authorization.screen.default': '默认',
+  'pages.system.authorization.screen.system': '系统',
+  'pages.system.authorization.screen.business': '业务功能',
+  'pages.system.authorization.screen.multiTenant': '多租户',
+  'pages.system.authorization.screen.tip': '请输入权限名称',
+  'pages.system.authorization.actions': '权限操作',
+  'pages.system.authorization.selectAll': '全选',
+  'pages.system.authorization.close': '关闭',
+  'pages.system.authorization.save': '保存',
+  // 系统设置-角色管理
   'pages.system.role': '角色管理',
   'pages.system.role.id': '标识',
   'pages.system.role.option.bindUser': '绑定用户',
+  // 系统设置-角色管理-绑定用户
+  'pages.bindUser.theBoundUser': '已绑定用户',
   // 系统设置-权限管理
   'pages.system.permission': '权限管理',
   'pages.system.permission.id': '标识',
@@ -71,6 +98,7 @@ export default {
   'pages.system.permission.addPermissionPreOperation': '前置操作',
   'pages.system.permission.addPermissionOperation': '关联操作',
   'pages.system.permission.addDataView': '数据视图',
+  'pages.system.permission.addDataViewField': '字段',
   // 系统设置-机构管理
   'pages.system.org': '机构管理',
   'pages.system.org.encoding': '编码',
@@ -81,6 +109,7 @@ export default {
   'pages.system.org.option.add': '添加下级',
   // 系统设置-第三方平台
   'pages.system.openApi': '第三方平台',
+  'pages.system.openApi.username': '用户名',
   'pages.system.openApi.password': '密码',
   'pages.system.openApi.ipWhileList': 'IP白名单',
   // 系统设置-租户管理

+ 29 - 4
src/pages/Analysis/DeviceChart/index.tsx

@@ -9,6 +9,7 @@ import { observer } from '@formily/react';
 import { Column } from '@ant-design/charts';
 import { Badge, Col, Row } from 'antd';
 import { SyncOutlined } from '@ant-design/icons';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 type DeviceChartType = {
   deviceOnline: number;
@@ -23,6 +24,7 @@ const DeviceChartModel = model<DeviceChartType>({
   deviceNotActive: 0,
 });
 const DeviceChart = observer(() => {
+  const intl = useIntl();
   const getDeviceData = () => {
     const requestParams = [
       // 设备状态信息-在线
@@ -110,7 +112,10 @@ const DeviceChart = observer(() => {
 
   return (
     <StatisticCard
-      title="设备统计"
+      title={intl.formatMessage({
+        id: 'pages.analysis.deviceStatistics',
+        defaultMessage: '设备统计',
+      })}
       extra={<SyncOutlined onClick={() => getDeviceData()} />}
       chart={
         <Column
@@ -143,19 +148,39 @@ const DeviceChart = observer(() => {
           <Col span={8}>
             <>
               {' '}
-              <Badge status="warning" text="未激活" />
+              <Badge
+                status="warning"
+                text={intl.formatMessage({
+                  id: 'pages.analysis.cpu',
+                  defaultMessage: '未激活',
+                })}
+              />
               {DeviceChartModel.deviceNotActive}
             </>
           </Col>
           <Col span={8}>
             <>
               {' '}
-              <Badge status="processing" text="总数" />· {DeviceChartModel.deviceCount}
+              <Badge
+                status="processing"
+                text={intl.formatMessage({
+                  id: 'pages.analysis.deviceStatistics.total',
+                  defaultMessage: '总数',
+                })}
+              />
+              · {DeviceChartModel.deviceCount}
             </>
           </Col>
           <Col span={8}>
             <>
-              <Badge status="success" text="在线" /> {DeviceChartModel.deviceOnline}
+              <Badge
+                status="success"
+                text={intl.formatMessage({
+                  id: 'pages.analysis.deviceStatistics.online',
+                  defaultMessage: '在线',
+                })}
+              />
+              {DeviceChartModel.deviceOnline}
             </>
           </Col>
         </Row>

+ 34 - 5
src/pages/Analysis/DeviceMessage/index.tsx

@@ -9,6 +9,7 @@ import { StatisticCard } from '@ant-design/pro-card';
 import { Radio } from 'antd';
 import type { DurationInputArg1, DurationInputArg2 } from 'moment';
 import moment from 'moment';
+import { useIntl } from '@@/plugin-locale/localeExports';
 
 type DeviceMessage = {
   chartData: any[];
@@ -28,6 +29,7 @@ const DeviceMessageModel = model<DeviceMessage>({
 });
 
 const DeviceMessageChart = observer(() => {
+  const intl = useIntl();
   const gatewayMonitor = (from: string, to: string, time: string) => {
     const params = [
       {
@@ -135,14 +137,41 @@ const DeviceMessageChart = observer(() => {
     },
   };
   const options = [
-    { label: '1小时', value: '1h' },
-    { label: '1天', value: '1d' },
-    { label: '7天', value: '7d' },
-    { label: '30天', value: '30d' },
+    {
+      label: intl.formatMessage({
+        id: 'pages.analysis.deviceMessage.1hour',
+        defaultMessage: '1小时',
+      }),
+      value: '1h',
+    },
+    {
+      label: intl.formatMessage({
+        id: 'pages.analysis.deviceMessage.1day',
+        defaultMessage: '1天',
+      }),
+      value: '1d',
+    },
+    {
+      label: intl.formatMessage({
+        id: 'pages.analysis.deviceMessage.7days',
+        defaultMessage: '7天',
+      }),
+      value: '7d',
+    },
+    {
+      label: intl.formatMessage({
+        id: 'pages.analysis.deviceMessage.30days',
+        defaultMessage: '30天',
+      }),
+      value: '30d',
+    },
   ];
   return (
     <StatisticCard
-      title="设备消息"
+      title={intl.formatMessage({
+        id: 'pages.analysis.deviceMessage',
+        defaultMessage: '设备消息',
+      })}
       extra={
         <Radio.Group
           options={options}

+ 7 - 1
src/pages/Analysis/index.tsx

@@ -40,7 +40,13 @@ const Analysis = () => {
           chart={<Jvm />}
         />
         <Divider type={responsive ? 'horizontal' : 'vertical'} />
-        <StatisticCard title="今日设备消息量" chart={<MessageChart />} />
+        <StatisticCard
+          title={intl.formatMessage({
+            id: 'pages.analysis.volume',
+            defaultMessage: '今日设备消息量',
+          })}
+          chart={<MessageChart />}
+        />
         <Divider type={responsive ? 'horizontal' : 'vertical'} />
         <DeviceChart />
       </StatisticCard.Group>

+ 141 - 144
src/pages/document.ejs

@@ -1,208 +1,205 @@
 <!DOCTYPE html>
 <html lang="en">
-<head>
-    <meta charset="UTF-8"/>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+  <head>
+    <meta charset="UTF-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     <meta
-            name="keywords"
-            content="antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, jetlinks"
+      name="keywords"
+      content="antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, jetlinks"
     />
+    <meta name="description" content="Jetlinks" />
     <meta
-            name="description"
-            content="Jetlinks"
-    />
-    <meta
-            name="viewport"
-            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
+      name="viewport"
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
     />
     <title>Jetlinks</title>
-    <link rel="icon" href="<%= context.config.publicPath + 'favicon.ico' %>" type="image/x-icon"/>
-</head>
-<body>
-<noscript>
-    <div class="noscript-container">
+    <link rel="icon" href="<%= context.config.publicPath + 'favicon.ico' %>" type="image/x-icon" />
+  </head>
+  <body>
+    <noscript>
+      <div class="noscript-container">
         Hi there! Please
         <div class="noscript-enableJS">
-            <a href="https://www.enablejavascript.io/en" target="_blank" rel="noopener noreferrer">
-                <b>enable Javascript</b>
-            </a>
+          <a href="https://www.enablejavascript.io/en" target="_blank" rel="noopener noreferrer">
+            <b>enable Javascript</b>
+          </a>
         </div>
         in your browser to use Ant Design, Out-of-the-box mid-stage front/design solution!
-    </div>
-</noscript>
-<div id="root">
-    <style>
+      </div>
+    </noscript>
+    <div id="root">
+      <style>
         html,
         body,
         #root {
-            height: 100%;
-            margin: 0;
-            padding: 0;
+          height: 100%;
+          margin: 0;
+          padding: 0;
         }
 
         #root {
-            background-repeat: no-repeat;
-            background-size: 100% auto;
+          background-repeat: no-repeat;
+          background-size: 100% auto;
         }
 
         .noscript-container {
-            display: flex;
-            align-content: center;
-            justify-content: center;
-            margin-top: 90px;
-            font-size: 20px;
-            font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode',
+          display: flex;
+          align-content: center;
+          justify-content: center;
+          margin-top: 90px;
+          font-size: 20px;
+          font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode',
             Geneva, Verdana, sans-serif;
         }
 
         .noscript-enableJS {
-            padding-right: 3px;
-            padding-left: 3px;
+          padding-right: 3px;
+          padding-left: 3px;
         }
 
         .page-loading-warp {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            padding: 98px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          padding: 98px;
         }
 
         .ant-spin {
-            position: absolute;
-            display: none;
-            -webkit-box-sizing: border-box;
-            box-sizing: border-box;
-            margin: 0;
-            padding: 0;
-            color: rgba(0, 0, 0, 0.65);
-            color: #1890ff;
-            font-size: 14px;
-            font-variant: tabular-nums;
-            line-height: 1.5;
-            text-align: center;
-            list-style: none;
-            opacity: 0;
-            -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-            transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-            transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-            transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
+          position: absolute;
+          display: none;
+          -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+          margin: 0;
+          padding: 0;
+          color: rgba(0, 0, 0, 0.65);
+          color: #1890ff;
+          font-size: 14px;
+          font-variant: tabular-nums;
+          line-height: 1.5;
+          text-align: center;
+          list-style: none;
+          opacity: 0;
+          -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
+          transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
+          transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
+          transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
             -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-            -webkit-font-feature-settings: 'tnum';
-            font-feature-settings: 'tnum';
+          -webkit-font-feature-settings: 'tnum';
+          font-feature-settings: 'tnum';
         }
 
         .ant-spin-spinning {
-            position: static;
-            display: inline-block;
-            opacity: 1;
+          position: static;
+          display: inline-block;
+          opacity: 1;
         }
 
         .ant-spin-dot {
-            position: relative;
-            display: inline-block;
-            width: 20px;
-            height: 20px;
-            font-size: 20px;
+          position: relative;
+          display: inline-block;
+          width: 20px;
+          height: 20px;
+          font-size: 20px;
         }
 
         .ant-spin-dot-item {
-            position: absolute;
-            display: block;
-            width: 9px;
-            height: 9px;
-            background-color: #1890ff;
-            border-radius: 100%;
-            -webkit-transform: scale(0.75);
-            -ms-transform: scale(0.75);
-            transform: scale(0.75);
-            -webkit-transform-origin: 50% 50%;
-            -ms-transform-origin: 50% 50%;
-            transform-origin: 50% 50%;
-            opacity: 0.3;
-            -webkit-animation: antspinmove 1s infinite linear alternate;
-            animation: antSpinMove 1s infinite linear alternate;
+          position: absolute;
+          display: block;
+          width: 9px;
+          height: 9px;
+          background-color: #1890ff;
+          border-radius: 100%;
+          -webkit-transform: scale(0.75);
+          -ms-transform: scale(0.75);
+          transform: scale(0.75);
+          -webkit-transform-origin: 50% 50%;
+          -ms-transform-origin: 50% 50%;
+          transform-origin: 50% 50%;
+          opacity: 0.3;
+          -webkit-animation: antspinmove 1s infinite linear alternate;
+          animation: antSpinMove 1s infinite linear alternate;
         }
 
         .ant-spin-dot-item:nth-child(1) {
-            top: 0;
-            left: 0;
+          top: 0;
+          left: 0;
         }
 
         .ant-spin-dot-item:nth-child(2) {
-            top: 0;
-            right: 0;
-            -webkit-animation-delay: 0.4s;
-            animation-delay: 0.4s;
+          top: 0;
+          right: 0;
+          -webkit-animation-delay: 0.4s;
+          animation-delay: 0.4s;
         }
 
         .ant-spin-dot-item:nth-child(3) {
-            right: 0;
-            bottom: 0;
-            -webkit-animation-delay: 0.8s;
-            animation-delay: 0.8s;
+          right: 0;
+          bottom: 0;
+          -webkit-animation-delay: 0.8s;
+          animation-delay: 0.8s;
         }
 
         .ant-spin-dot-item:nth-child(4) {
-            bottom: 0;
-            left: 0;
-            -webkit-animation-delay: 1.2s;
-            animation-delay: 1.2s;
+          bottom: 0;
+          left: 0;
+          -webkit-animation-delay: 1.2s;
+          animation-delay: 1.2s;
         }
 
         .ant-spin-dot-spin {
-            -webkit-transform: rotate(45deg);
-            -ms-transform: rotate(45deg);
-            transform: rotate(45deg);
-            -webkit-animation: antrotate 1.2s infinite linear;
-            animation: antRotate 1.2s infinite linear;
+          -webkit-transform: rotate(45deg);
+          -ms-transform: rotate(45deg);
+          transform: rotate(45deg);
+          -webkit-animation: antrotate 1.2s infinite linear;
+          animation: antRotate 1.2s infinite linear;
         }
 
         .ant-spin-lg .ant-spin-dot {
-            width: 32px;
-            height: 32px;
-            font-size: 32px;
+          width: 32px;
+          height: 32px;
+          font-size: 32px;
         }
 
         .ant-spin-lg .ant-spin-dot i {
-            width: 14px;
-            height: 14px;
+          width: 14px;
+          height: 14px;
         }
 
         @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
-            .ant-spin-blur {
-                background: #fff;
-                opacity: 0.5;
-            }
+          .ant-spin-blur {
+            background: #fff;
+            opacity: 0.5;
+          }
         }
 
         @-webkit-keyframes antSpinMove {
-            to {
-                opacity: 1;
-            }
+          to {
+            opacity: 1;
+          }
         }
 
         @keyframes antSpinMove {
-            to {
-                opacity: 1;
-            }
+          to {
+            opacity: 1;
+          }
         }
 
         @-webkit-keyframes antRotate {
-            to {
-                -webkit-transform: rotate(405deg);
-                transform: rotate(405deg);
-            }
+          to {
+            -webkit-transform: rotate(405deg);
+            transform: rotate(405deg);
+          }
         }
 
         @keyframes antRotate {
-            to {
-                -webkit-transform: rotate(405deg);
-                transform: rotate(405deg);
-            }
-        }
-    </style>
-    <div
-            style="
+          to {
+            -webkit-transform: rotate(405deg);
+            transform: rotate(405deg);
+          }
+        }
+      </style>
+      <div
+        style="
           display: flex;
           flex-direction: column;
           align-items: center;
@@ -210,25 +207,25 @@
           height: 100%;
           min-height: 420px;
         "
-    >
-        <img src="<%= context.config.publicPath + 'pro_icon.svg' %>" alt="logo" width="256"/>
+      >
+        <img src="<%= context.config.publicPath + 'pro_icon.svg' %>" alt="logo" width="256" />
         <div class="page-loading-warp">
-            <div class="ant-spin ant-spin-lg ant-spin-spinning">
+          <div class="ant-spin ant-spin-lg ant-spin-spinning">
             <span class="ant-spin-dot ant-spin-dot-spin"
-            ><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
-                ><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
-                ></span>
-            </div>
+              ><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
+              ><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i
+            ></span>
+          </div>
         </div>
         <div style="display: flex; align-items: center; justify-content: center">
-            <img
-                    src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
-                    width="32"
-                    style="margin-right: 8px"
-            />
-            Jetlinks
+          <img
+            src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
+            width="32"
+            style="margin-right: 8px"
+          />
+          Jetlinks
         </div>
+      </div>
     </div>
-</div>
-</body>
+  </body>
 </html>

+ 6 - 1
src/pages/rule-engine/SQLRule/index.tsx

@@ -115,7 +115,12 @@ const SQLRule = () => {
           >
             <DownloadOutlined
               onClick={() => {
-                message.success('下载');
+                message.success(
+                  `${intl.formatMessage({
+                    id: 'pages.data.option.download',
+                    defaultMessage: '下载',
+                  })}`,
+                );
               }}
             />
           </Tooltip>

+ 6 - 3
src/pages/system/OpenAPI/index.tsx

@@ -46,7 +46,7 @@ const OpenAPI: React.FC = observer(() => {
     },
     {
       title: intl.formatMessage({
-        id: 'pages.table.username',
+        id: 'pages.system.openApi.username',
         defaultMessage: '用户名',
       }),
       dataIndex: 'username',
@@ -222,7 +222,7 @@ const OpenAPI: React.FC = observer(() => {
           },
           username: {
             title: intl.formatMessage({
-              id: 'pages.table.username',
+              id: 'pages.system.openApi.username',
               defaultMessage: '用户名',
             }),
             type: 'string',
@@ -329,7 +329,10 @@ const OpenAPI: React.FC = observer(() => {
         actionRef={actionRef}
       />
       <Drawer
-        title="授权"
+        title={intl.formatMessage({
+          id: 'pages.data.option.authorize',
+          defaultMessage: '授权',
+        })}
         width="70vw"
         visible={autzModel.visible}
         onClose={() => {

+ 4 - 1
src/pages/system/Org/index.tsx

@@ -155,7 +155,10 @@ const Org: React.FC = observer(() => {
         <BindUser />
       </Modal>
       <Drawer
-        title="授权"
+        title={intl.formatMessage({
+          id: 'pages.data.option.authorize',
+          defaultMessage: '授权',
+        })}
         width="50vw"
         visible={autzModel.visible}
         onClose={() => {

+ 8 - 2
src/pages/system/Permission/index.tsx

@@ -580,7 +580,10 @@ const Permission: React.FC = observer(() => {
                       'x-component': 'ArrayTable.Column',
                       'x-component-props': {
                         width: 200,
-                        title: '字段',
+                        title: intl.formatMessage({
+                          id: 'pages.system.permission.addDataViewField',
+                          defaultMessage: '字段',
+                        }),
                       },
                       properties: {
                         name: {
@@ -595,7 +598,10 @@ const Permission: React.FC = observer(() => {
                       'x-component': 'ArrayTable.Column',
                       'x-component-props': {
                         width: 200,
-                        title: '描述',
+                        title: intl.formatMessage({
+                          id: 'pages.table.describe',
+                          defaultMessage: '描述',
+                        }),
                       },
                       properties: {
                         describe: {

+ 4 - 1
src/pages/system/Role/index.tsx

@@ -246,7 +246,10 @@ const Role: React.FC = observer(() => {
         <BindUser />
       </Modal>
       <Drawer
-        title="授权"
+        title={intl.formatMessage({
+          id: 'pages.data.option.authorize',
+          defaultMessage: '授权',
+        })}
         width="70vw"
         visible={autzModel.visible}
         onClose={() => {

+ 10 - 7
src/pages/system/User/index.tsx

@@ -39,7 +39,7 @@ const User = observer(() => {
     },
     {
       title: intl.formatMessage({
-        id: 'pages.system.user.name',
+        id: 'pages.system.name',
         defaultMessage: '姓名',
       }),
       dataIndex: 'name',
@@ -66,7 +66,7 @@ const User = observer(() => {
     },
     {
       title: intl.formatMessage({
-        id: 'pages.table.username',
+        id: 'pages.system.username',
         defaultMessage: '用户名',
       }),
       dataIndex: 'username',
@@ -205,7 +205,7 @@ const User = observer(() => {
     properties: {
       username: {
         title: intl.formatMessage({
-          id: 'pages.table.username',
+          id: 'pages.system.username',
           defaultMessage: '用户名',
         }),
         type: 'string',
@@ -220,7 +220,7 @@ const User = observer(() => {
       },
       name: {
         title: intl.formatMessage({
-          id: 'pages.system.user.name',
+          id: 'pages.system.name',
           defaultMessage: '姓名',
         }),
         type: 'string',
@@ -234,7 +234,7 @@ const User = observer(() => {
       password: {
         type: 'string',
         title: intl.formatMessage({
-          id: 'pages.system.user.password',
+          id: 'pages.system.password',
           defaultMessage: '密码',
         }),
         'x-decorator': 'FormItem',
@@ -261,7 +261,7 @@ const User = observer(() => {
       confirmPassword: {
         type: 'string',
         title: intl.formatMessage({
-          id: 'pages.system.user.confirmPassword',
+          id: 'pages.system.confirmPassword',
           defaultMessage: '确认密码?',
         }),
         'x-decorator': 'FormItem',
@@ -301,7 +301,10 @@ const User = observer(() => {
         schema={schema}
       />
       <Drawer
-        title="授权"
+        title={intl.formatMessage({
+          id: 'pages.data.option.authorize',
+          defaultMessage: '授权',
+        })}
         width="50vw"
         visible={autzModel.visible}
         onClose={() => {