You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/08/27 08:56:45 UTC

[incubator-inlong] branch master updated: [INLONG-1488][website] there are still some chinese characters for website #1488 (#1489)

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

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 28d9dda  [INLONG-1488][website] there are still some chinese characters for website #1488 (#1489)
28d9dda is described below

commit 28d9dda839afe20e5e3f7e033792c60e74fe2e8c
Author: Daniel <le...@outlook.com>
AuthorDate: Fri Aug 27 16:56:41 2021 +0800

    [INLONG-1488][website] there are still some chinese characters for website #1488 (#1489)
---
 inlong-website/src/locales/cn.json                         | 1 +
 inlong-website/src/locales/en.json                         | 1 +
 inlong-website/src/pages/AccessCreate/DataStream/index.tsx | 9 ++++++---
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/inlong-website/src/locales/cn.json b/inlong-website/src/locales/cn.json
index d99e4ad..ca44520 100644
--- a/inlong-website/src/locales/cn.json
+++ b/inlong-website/src/locales/cn.json
@@ -5,6 +5,7 @@
   "basic.OperatingSuccess": "操作成功",
   "basic.Save": "保存",
   "basic.Cancel": "取消",
+  "basic.Create": "新建",
   "basic.Delete": "删除",
   "basic.DeleteConfirm": "确认删除吗",
   "basic.DeleteSuccess": "删除成功",
diff --git a/inlong-website/src/locales/en.json b/inlong-website/src/locales/en.json
index 816197b..5219e88 100644
--- a/inlong-website/src/locales/en.json
+++ b/inlong-website/src/locales/en.json
@@ -5,6 +5,7 @@
   "basic.OperatingSuccess": "Operating Success",
   "basic.Save": "Save",
   "basic.Cancel": "Cancel",
+  "basic.Create": "新建",
   "basic.Delete": "Delete",
   "basic.DeleteConfirm": "Are you sure to delete",
   "basic.DeleteSuccess": "Delete Success",
diff --git a/inlong-website/src/pages/AccessCreate/DataStream/index.tsx b/inlong-website/src/pages/AccessCreate/DataStream/index.tsx
index 99ca858..c817cf7 100644
--- a/inlong-website/src/pages/AccessCreate/DataStream/index.tsx
+++ b/inlong-website/src/pages/AccessCreate/DataStream/index.tsx
@@ -19,6 +19,7 @@
 
 import React, { useState, useEffect, useImperativeHandle, forwardRef } from 'react';
 import { Form, Collapse, Button, Space } from 'antd';
+import { useTranslation } from 'react-i18next';
 import { FormItemContent } from '@/components/FormGenerator';
 import { useRequest, useSelector } from '@/hooks';
 import request from '@/utils/request';
@@ -33,6 +34,8 @@ export interface Props {
 const Comp = ({ bid }: Props, ref) => {
   const [form] = Form.useForm();
 
+  const { t } = useTranslation();
+
   const userName = useSelector<State, State['userName']>(state => state.userName);
 
   const [activeKey, setActiveKey] = useState('0');
@@ -94,7 +97,7 @@ const Comp = ({ bid }: Props, ref) => {
   const genExtra = (field, removeFunc, index, arrLen) =>
     !(index === 0 && arrLen === 1) && (
       <Button size="small" type="link" onClick={() => removeFunc(field.name)}>
-        删除
+        {t('basic.Delete')}
       </Button>
     );
 
@@ -119,7 +122,7 @@ const Comp = ({ bid }: Props, ref) => {
                     setActiveKey(fields.length.toString());
                   }}
                 >
-                  新建数据流
+                  {t('basic.Create')}
                 </Button>
               </Space>
 
@@ -131,7 +134,7 @@ const Comp = ({ bid }: Props, ref) => {
               >
                 {fields.map((field, index, arr) => (
                   <Collapse.Panel
-                    header={`数据流${index + 1}`}
+                    header={`#${index + 1}`}
                     key={index.toString()}
                     extra={genExtra(field, remove, index, arr.length)}
                     style={{