You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2023/02/22 02:57:01 UTC

[incubator-streampark] branch dev updated: [Improve] add i18n support for variable Management show info page. (#2351)

This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new b2d3b1484 [Improve] add i18n support for variable Management show info page. (#2351)
b2d3b1484 is described below

commit b2d3b1484dc13080805df417a9d8748996c97810
Author: lvlin241 <lv...@163.com>
AuthorDate: Wed Feb 22 10:56:55 2023 +0800

    [Improve] add i18n support for variable Management show info page. (#2351)
    
    * [Improve] add i18n support for job sql version compare.
    
    * [Improve] add i18n support for variable Management show info page.
---
 .../src/locales/lang/en/flink/variable.ts                |  5 +++++
 .../src/locales/lang/zh-CN/flink/variable.ts             |  5 +++++
 .../src/views/flink/variable/components/VariableInfo.vue | 16 +++++++++-------
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
index 81b061758..a71ab219f 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/variable.ts
@@ -16,6 +16,7 @@
  */
 export default {
   addVariable: 'Add Variable',
+  variableInfoTitle: 'Variable Info',
   modifyVariable: 'Modify Variable',
   deleteVariable: 'Delete Variable',
   deletePopConfirm: 'Are you sure delete this variable ?',
@@ -30,6 +31,10 @@ export default {
     variableValuePlaceholder: 'Please enter Variable Value',
     descriptionPlaceholder: 'Please enter description to search',
     depend: 'depend apps',
+    createUser: 'Create User',
+    createTime: 'Create Time',
+    modifyTime: 'Modify Time',
+    description: 'Description',
   },
   form: {
     descriptionMessage: 'exceeds maximum length limit of 100 characters',
diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
index a1799c7fe..b40cc90b9 100644
--- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
+++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/variable.ts
@@ -16,6 +16,7 @@
  */
 export default {
   addVariable: '添加变量',
+  variableInfoTitle: '变量详情',
   modifyVariable: '修改变量',
   deleteVariable: '删除变量',
   deletePopConfirm: '你确定要删除这个变量?',
@@ -30,6 +31,10 @@ export default {
     variableValuePlaceholder: '输入变量值',
     descriptionPlaceholder: '输入描述',
     depend: 'application 依赖',
+    createUser: '创建者',
+    createTime: '创建时间',
+    modifyTime: '修改时间',
+    description: '描述',
   },
   form: {
     descriptionMessage: '超过 100 个字符的最大长度限制',
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
index 693ac4144..0ef510321 100644
--- a/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
+++ b/streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableInfo.vue
@@ -24,7 +24,7 @@
   >
     <template #title>
       <Icon icon="ant-design:code-outlined" />
-      Variable Info
+      {{ t('flink.variable.variableInfoTitle') }}
     </template>
     <Description class="variable-desc" :column="1" :data="variableInfo" :schema="roleColumn" />
   </BasicDrawer>
@@ -42,6 +42,7 @@
   import { useDrawerInner, BasicDrawer } from '/@/components/Drawer';
   import { fetchVariableInfo } from '/@/api/flink/variable';
   import { usePermission } from '/@/hooks/web/usePermission';
+  import { useI18n } from '/@/hooks/web/useI18n';
 
   const variableInfo = ref<Recordable>({});
   const showVariableDetail = ref(false);
@@ -50,6 +51,7 @@
   const [registerDrawer, { closeDrawer }] = useDrawerInner((data: Recordable) => {
     data && onReceiveModalData(data);
   });
+  const { t } = useI18n();
 
   function onReceiveModalData(data) {
     realVariable = '';
@@ -77,11 +79,11 @@
   const { hasPermission } = usePermission();
   const roleColumn: DescItem[] = [
     {
-      label: generatedLabelIcon('ant-design:code-outlined', 'Variable Code'),
+      label: generatedLabelIcon('ant-design:code-outlined', t('flink.variable.table.variableCode')),
       field: 'variableCode',
     },
     {
-      label: generatedLabelIcon('ant-design:down-circle-outlined', 'Variable Value'),
+      label: generatedLabelIcon('ant-design:down-circle-outlined', t('flink.variable.table.variableValue')),
       field: 'variableValue',
       render(value, data) {
         const renderIcon = () => {
@@ -104,19 +106,19 @@
       },
     },
     {
-      label: generatedLabelIcon(`ant-design:user-outlined`, 'Create User'),
+      label: generatedLabelIcon(`ant-design:user-outlined`, t('flink.variable.table.createUser')),
       field: 'creatorName',
     },
     {
-      label: generatedLabelIcon(`ant-design:clock-circle-outlined`, 'Create Time'),
+      label: generatedLabelIcon(`ant-design:clock-circle-outlined`, t('flink.variable.table.createTime')),
       field: 'createTime',
     },
     {
-      label: generatedLabelIcon('ant-design:mail-outlined', 'Modify Time'),
+      label: generatedLabelIcon('ant-design:mail-outlined', t('flink.variable.table.modifyTime')),
       field: 'modifyTime',
     },
     {
-      label: generatedLabelIcon('ant-design:message-outlined', 'Description'),
+      label: generatedLabelIcon('ant-design:message-outlined', t('flink.variable.table.description')),
       field: 'description',
     },
   ];