소스 검색

locale(rule-engine): translate rule-engine

crush394 4 년 전
부모
커밋
5df2ed493d
3개의 변경된 파일60개의 추가작업 그리고 15개의 파일을 삭제
  1. 20 5
      src/pages/rule-engine/Instance/index.tsx
  2. 20 5
      src/pages/rule-engine/SQLRule/index.tsx
  3. 20 5
      src/pages/rule-engine/Scene/index.tsx

+ 20 - 5
src/pages/rule-engine/Instance/index.tsx

@@ -27,19 +27,31 @@ const Instance = () => {
     },
     {
       dataIndex: 'name',
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
     },
     {
       dataIndex: 'modelType',
-      title: '类型',
+      title: intl.formatMessage({
+        id: 'pages.link.type',
+        defaultMessage: '类型',
+      }),
     },
     {
       dataIndex: 'state',
-      title: '状态',
+      title: intl.formatMessage({
+        id: 'pages.searchTable.titleStatus',
+        defaultMessage: '状态',
+      }),
       render: (text, record) => record.state.value,
     },
     {
-      title: '操作',
+      title: intl.formatMessage({
+        id: 'pages.data.option',
+        defaultMessage: '操作',
+      }),
       valueType: 'option',
       align: 'center',
       width: 200,
@@ -106,7 +118,10 @@ const Instance = () => {
       <BaseCrud
         columns={columns}
         service={service}
-        title="规则实例"
+        title={intl.formatMessage({
+          id: 'pages.ruleEngine.instance',
+          defaultMessage: '规则实例',
+        })}
         schema={schema}
         actionRef={actionRef}
       />

+ 20 - 5
src/pages/rule-engine/SQLRule/index.tsx

@@ -27,19 +27,31 @@ const SQLRule = () => {
     },
     {
       dataIndex: 'name',
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
     },
     {
       dataIndex: 'createTime',
-      title: '创建时间',
+      title: intl.formatMessage({
+        id: 'pages.ruleEngine.sqlRule.time',
+        defaultMessage: '创建时间',
+      }),
     },
     {
       dataIndex: 'state',
-      title: '状态',
+      title: intl.formatMessage({
+        id: 'pages.searchTable.titleStatus',
+        defaultMessage: '状态',
+      }),
       render: (text, record) => record.state.value,
     },
     {
-      title: '操作',
+      title: intl.formatMessage({
+        id: 'pages.data.option',
+        defaultMessage: '操作',
+      }),
       valueType: 'option',
       align: 'center',
       width: 200,
@@ -118,7 +130,10 @@ const SQLRule = () => {
       <BaseCrud
         columns={columns}
         service={service}
-        title="数据转发"
+        title={intl.formatMessage({
+          id: 'pages.ruleEngine.sqlRule',
+          defaultMessage: '数据转发',
+        })}
         schema={schema}
         defaultParams={{ modelType: 'sql_rule' }}
         actionRef={actionRef}

+ 20 - 5
src/pages/rule-engine/Scene/index.tsx

@@ -28,20 +28,32 @@ const Scene = () => {
     },
     {
       dataIndex: 'name',
-      title: '名称',
+      title: intl.formatMessage({
+        id: 'pages.table.name',
+        defaultMessage: '名称',
+      }),
     },
     {
       dataIndex: 'triggers',
-      title: '触发方式',
+      title: intl.formatMessage({
+        id: 'pages.ruleEngine.scene.trigger',
+        defaultMessage: '触发方式',
+      }),
       render: () => 'todo',
     },
     {
       dataIndex: 'state',
-      title: '状态',
+      title: intl.formatMessage({
+        id: 'pages.searchTable.titleStatus',
+        defaultMessage: '状态',
+      }),
       render: (text, record) => record.state.value,
     },
     {
-      title: '操作',
+      title: intl.formatMessage({
+        id: 'pages.data.option',
+        defaultMessage: '操作',
+      }),
       valueType: 'option',
       align: 'center',
       width: 200,
@@ -118,7 +130,10 @@ const Scene = () => {
       <BaseCrud
         columns={columns}
         service={service}
-        title="场景联动"
+        title={intl.formatMessage({
+          id: 'pages.ruleEngine.scene',
+          defaultMessage: '场景联动',
+        })}
         schema={schema}
         actionRef={actionRef}
       />