diff --git a/web/src/locales/en-US/component.ts b/web/src/locales/en-US/component.ts index d3095bd918..fe9e2ea329 100644 --- a/web/src/locales/en-US/component.ts +++ b/web/src/locales/en-US/component.ts @@ -42,6 +42,7 @@ export default { 'component.global.loading': 'Loading', 'component.global.list': 'List', 'component.global.description': 'Description', + 'component.global.description.required': 'Please enter the description', 'component.global.labels': 'Labels', 'component.global.version': 'Version', 'component.global.operation': 'Operation', diff --git a/web/src/locales/zh-CN/component.ts b/web/src/locales/zh-CN/component.ts index e5f95ce36b..bf5ee199ef 100644 --- a/web/src/locales/zh-CN/component.ts +++ b/web/src/locales/zh-CN/component.ts @@ -41,7 +41,8 @@ export default { 'component.global.edit.plugin': '配置插件', 'component.global.loading': '加载中', 'component.global.list': '列表', - 'component.global.description': '描述信息', + 'component.global.description': '描述', + 'component.global.description.required': '请输入描述信息', 'component.global.labels': '标签', 'component.global.version': '路由版本', 'component.global.operation': '操作', diff --git a/web/src/pages/Consumer/Create.tsx b/web/src/pages/Consumer/Create.tsx index 112ed5976f..6350fa8853 100644 --- a/web/src/pages/Consumer/Create.tsx +++ b/web/src/pages/Consumer/Create.tsx @@ -52,13 +52,12 @@ const Page: React.FC = (props) => { (username ? update(username, data) : create(data)) .then(() => { notification.success({ - message: `${ - username - ? formatMessage({ id: 'component.global.edit' }) - : formatMessage({ id: 'component.global.create' }) - } ${formatMessage({ id: 'menu.consumer' })} ${formatMessage({ - id: 'component.status.success', - })}`, + message: `${username + ? formatMessage({ id: 'component.global.edit' }) + : formatMessage({ id: 'component.global.create' }) + } ${formatMessage({ id: 'menu.consumer' })} ${formatMessage({ + id: 'component.status.success', + })}`, }); history.push('/consumer/list'); }) @@ -99,11 +98,10 @@ const Page: React.FC = (props) => { return ( <> diff --git a/web/src/pages/Consumer/List.tsx b/web/src/pages/Consumer/List.tsx index a08a72211d..d85bf6b7b5 100644 --- a/web/src/pages/Consumer/List.tsx +++ b/web/src/pages/Consumer/List.tsx @@ -111,7 +111,7 @@ const Page: React.FC = () => { ]; return ( - + actionRef={ref} columns={columns} diff --git a/web/src/pages/Consumer/components/Step1.tsx b/web/src/pages/Consumer/components/Step1.tsx index 561352ba0c..ce23093569 100644 --- a/web/src/pages/Consumer/components/Step1.tsx +++ b/web/src/pages/Consumer/components/Step1.tsx @@ -47,20 +47,15 @@ const Step1: React.FC = ({ form, disabled }) => { message: formatMessage({ id: 'page.consumer.form.itemRuleMessage.username' }), }, ]} - extra={formatMessage({ id: 'page.consumer.form.itemExtraMessage.username' })} > diff --git a/web/src/pages/Consumer/locales/en-US.ts b/web/src/pages/Consumer/locales/en-US.ts index 80aa1cf1d3..cc2cf0c20e 100644 --- a/web/src/pages/Consumer/locales/en-US.ts +++ b/web/src/pages/Consumer/locales/en-US.ts @@ -21,6 +21,10 @@ export default { 'page.consumer.notification.warning.enableAuthenticationPlugin': 'Please enable one authentication plugin', 'page.consumer.username': 'Name', + 'page.consumer.username.required': 'Please enter the Consumer\'s name', 'page.consumer.updateTime': 'Update Time', - 'page.consumer.list': 'Consumer List' + 'page.consumer.list': 'Consumer List', + 'page.consumer.description': 'Consumers are the consumers of Routes, e.g developers, end users, API calls, etc. When creating a consumer, you need to bind at least one Authentication plugin.', + 'page.consumer.create': 'Create Consumer', + 'page.consumer.configure': 'Configure Consumer', }; diff --git a/web/src/pages/Consumer/locales/zh-CN.ts b/web/src/pages/Consumer/locales/zh-CN.ts index cfb1f68239..3c48fc1546 100644 --- a/web/src/pages/Consumer/locales/zh-CN.ts +++ b/web/src/pages/Consumer/locales/zh-CN.ts @@ -20,6 +20,10 @@ export default { 'page.consumer.form.itemExtraMessage.username': '名称需唯一', 'page.consumer.notification.warning.enableAuthenticationPlugin': '请启用一种身份认证类插件', 'page.consumer.username': '名称', + 'page.consumer.username.required': '请输入消费者名称', 'page.consumer.updateTime': '更新时间', - 'page.consumer.list': '消费者列表' + 'page.consumer.list': '消费者列表', + 'page.consumer.description': '消费者是路由的消费方,形式包括开发者、最终用户、API 调用等。创建消费者时,需绑定至少一个认证类插件。', + 'page.consumer.create': '创建消费者', + 'page.consumer.configure': '配置消费者', };