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

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 6375d15  fix(i18n): update error key in requestConfigView.tsx (#526)
6375d15 is described below

commit 6375d158db95cb8fc14d21635ef4ea4605c15102
Author: liuxiran <[email protected]>
AuthorDate: Wed Sep 30 09:33:27 2020 +0800

    fix(i18n): update error key in requestConfigView.tsx (#526)
    
    * fix(i18n): update error key in requestConfigView.tsx
    
    * fix: two delete button in the routes list
    
    * fix: update consumer i18n
---
 src/pages/Consumer/locales/en-US.ts                |  2 +-
 src/pages/Consumer/locales/zh-CN.ts                |  2 +-
 src/pages/Route/List.tsx                           | 20 --------------------
 .../Route/components/Step1/RequestConfigView.tsx   | 22 +++++++++++++++++-----
 src/pages/Route/locales/en-US.ts                   |  1 +
 src/pages/Route/locales/zh-CN.ts                   |  1 +
 6 files changed, 21 insertions(+), 27 deletions(-)

diff --git a/src/pages/Consumer/locales/en-US.ts 
b/src/pages/Consumer/locales/en-US.ts
index 5cc5d03..5bddf33 100644
--- a/src/pages/Consumer/locales/en-US.ts
+++ b/src/pages/Consumer/locales/en-US.ts
@@ -19,7 +19,7 @@ export default {
     'Maximum length is 100, only letters, numbers and _ are supported, and can 
only begin with letters',
   'page.consumer.form.itemExtraMessage.username': 'Username should be unique',
   'page.consumer.notification.warning.enableAuthenticationPlugin':
-    'Please enable at least one authentication plugin',
+    'Please enable one authentication plugin',
   'page.consumer.username': 'Username',
   'page.consumer.updateTime': 'Update Time',
 };
diff --git a/src/pages/Consumer/locales/zh-CN.ts 
b/src/pages/Consumer/locales/zh-CN.ts
index d5b2bd9..c54bcc2 100644
--- a/src/pages/Consumer/locales/zh-CN.ts
+++ b/src/pages/Consumer/locales/zh-CN.ts
@@ -18,7 +18,7 @@ export default {
   'page.consumer.form.itemRuleMessage.username':
     '最大长度100,仅支持字母、数字和 _ ,且只能以字母开头',
   'page.consumer.form.itemExtraMessage.username': '用户名需唯一',
-  'page.consumer.notification.warning.enableAuthenticationPlugin': 
'请启用至少一种身份认证类插件',
+  'page.consumer.notification.warning.enableAuthenticationPlugin': 
'请启用一种身份认证类插件',
   'page.consumer.username': '用户名',
   'page.consumer.updateTime': '更新时间',
 };
diff --git a/src/pages/Route/List.tsx b/src/pages/Route/List.tsx
index 8aa7b85..c4028e3 100644
--- a/src/pages/Route/List.tsx
+++ b/src/pages/Route/List.tsx
@@ -115,26 +115,6 @@ const Page: React.FC = () => {
             >
               {formatMessage({ id: 'component.global.edit' })}
             </Button>
-            <Popconfirm
-              title={formatMessage({ id: 
'component.global.popconfirm.title.delete' })}
-              onConfirm={() => {
-                remove(record.id!).then(() => {
-                  notification.success({
-                    message: `${formatMessage({ id: 'component.global.delete' 
})} ${formatMessage({
-                      id: 'menu.routes',
-                    })} ${formatMessage({ id: 'component.status.success' })}`,
-                  });
-                  /* eslint-disable no-unused-expressions */
-                  ref.current?.reload();
-                });
-              }}
-              okText={formatMessage({ id: 'component.global.confirm' })}
-              cancelText={formatMessage({ id: 'component.global.cancel' })}
-            >
-              <Button type="primary" danger>
-                {formatMessage({ id: 'component.global.delete' })}
-              </Button>
-            </Popconfirm>
             <Button
               type="primary"
               onClick={() => history.push(`/routes/${record.id}/debug`)}
diff --git a/src/pages/Route/components/Step1/RequestConfigView.tsx 
b/src/pages/Route/components/Step1/RequestConfigView.tsx
index ea707fb..b1e1a27 100644
--- a/src/pages/Route/components/Step1/RequestConfigView.tsx
+++ b/src/pages/Route/components/Step1/RequestConfigView.tsx
@@ -254,15 +254,27 @@ const RequestConfigView: 
React.FC<RouteModule.Step1PassProps> = ({
           if (form.getFieldValue('redirectOption') === 'customRedirect') {
             return (
               <Form.Item
-                label={formatMessage({ id: 
'route.request.config.redirect.custom' })}
+                label={formatMessage({ id: 
'page.route.form.itemLabel.redirectCustom' })}
                 required
               >
                 <Row gutter={10}>
                   <Col>
-                    <Form.Item name="redirectURI" rules={[{ required: true }]}>
+                    <Form.Item
+                      name="redirectURI"
+                      rules={[
+                        {
+                          required: true,
+                          message: `${formatMessage({
+                            id: 'component.global.pleaseEnter',
+                          })}${formatMessage({
+                            id: 'page.route.form.itemLabel.redirectURI',
+                          })}`,
+                        },
+                      ]}
+                    >
                       <Input
                         placeholder={formatMessage({
-                          id: 'route.request.config.redirect.custom.example',
+                          id: 'page.route.input.placeholder.redirectCustom',
                         })}
                         disabled={disabled}
                       />
@@ -272,10 +284,10 @@ const RequestConfigView: 
React.FC<RouteModule.Step1PassProps> = ({
                     <Form.Item name="redirectCode" rules={[{ required: true 
}]}>
                       <Select disabled={disabled}>
                         <Select.Option value={301}>
-                          {formatMessage({ id: 
'route.request.config.redirect.301' })}
+                          {formatMessage({ id: 
'page.route.select.option.redirect301' })}
                         </Select.Option>
                         <Select.Option value={302}>
-                          {formatMessage({ id: 
'route.request.config.redirect.302' })}
+                          {formatMessage({ id: 
'page.route.select.option.redirect302' })}
                         </Select.Option>
                       </Select>
                     </Form.Item>
diff --git a/src/pages/Route/locales/en-US.ts b/src/pages/Route/locales/en-US.ts
index 8a2c25c..058a10b 100644
--- a/src/pages/Route/locales/en-US.ts
+++ b/src/pages/Route/locales/en-US.ts
@@ -88,6 +88,7 @@ export default {
   'page.route.radio.staySame': 'Stay The Same',
   'page.route.form.itemLabel.newPath': 'New Path',
   'page.route.form.itemLabel.rewriteType': 'Request Path',
+  'page.route.form.itemLabel.redirectURI': 'Redirect URI',
   'page.route.input.placeholder.newPath': 'For example: /foo/bar/index.html',
 
   'page.route.steps.stepTitle.defineApiRequest': 'Define API Request',
diff --git a/src/pages/Route/locales/zh-CN.ts b/src/pages/Route/locales/zh-CN.ts
index 0dce922..f032c4b 100644
--- a/src/pages/Route/locales/zh-CN.ts
+++ b/src/pages/Route/locales/zh-CN.ts
@@ -58,6 +58,7 @@ export default {
   'page.route.form.itemLabel.redirect': '重定向',
   'page.route.form.itemLabel.redirectCustom': '自定义重定向',
   'page.route.form.itemLabel.rewriteType': '请求路径',
+  'page.route.form.itemLabel.redirectURI': '重定向路径',
   'page.route.form.itemExtraMessage.domain': '域名或IP,支持泛域名,如:*.test.com',
   'page.route.form.itemRulesPatternMessage.domain':
     '仅支持字母、数字和 * ,且 * 只能是在开头,支持单个 * ',

Reply via email to