diff --git a/src/components/ActionBar/ActionBar.tsx b/src/components/ActionBar/ActionBar.tsx index 4337389a6e..ad2613e652 100644 --- a/src/components/ActionBar/ActionBar.tsx +++ b/src/components/ActionBar/ActionBar.tsx @@ -61,7 +61,7 @@ const ActionBar: React.FC = ({ step, lastStep, onChange, withResultView } diff --git a/src/locales/en-US/component.ts b/src/locales/en-US/component.ts index 85b2a4b1ca..6e8b5d9f7d 100644 --- a/src/locales/en-US/component.ts +++ b/src/locales/en-US/component.ts @@ -18,20 +18,53 @@ export default { 'component.tagSelect.expand': 'Expand', 'component.tagSelect.collapse': 'Collapse', 'component.tagSelect.all': 'All', - 'component.global.remove': 'Remove', + 'component.global.confirm': 'Confirm', + 'component.global.delete': 'Delete', 'component.global.cancel': 'Cancel', - 'component.global.button.submit': 'Submit', + 'component.global.submit': 'Submit', 'component.global.create': 'Create', 'component.global.add': 'Add', 'component.global.save': 'Save', 'component.global.edit': 'Edit', - 'component.global.action': 'Action', 'component.global.update': 'Update', 'component.global.get': 'Get', 'component.global.edit.plugin': 'Edit plugin', 'component.global.loading': 'Loading', + 'component.global.list': 'List', + 'component.global.description': 'Description', + 'component.global.operation': 'Operation', 'component.status.success': 'Successfully', 'component.status.fail': 'Failed', + 'component.global.popconfirm.title.delete': 'Are you sure to delete this record ?', + 'component.global.notification.success.messaage.deleteSuccess': 'Deleted Successfully', + + 'component.global.steps.stepTitle.basicInformation': 'Basic Information', + 'component.global.steps.stepTitle.preview': 'Preview', + 'component.global.steps.stepTitle.pluginConfig': 'Plugin Config', + + 'component.global.pleaseEnter': 'Please Eneter', + 'component.global.pleaseChoose': 'Please Choose', + 'component.global.pleaseCheck': 'Please Check', + + 'component.global.input.ruleMessage.name': + 'Only letters, numbers, - and _ are supported, and can only begin with letters', + + 'component.global.connectionTimeout': 'Connection Timeout', + 'component.global.sendTimeout': 'Send Timeout', + 'component.global.receiveTimeout': 'Receive Timeout', + 'component.global.name': 'Name', + 'component.global.editTime': 'Edit Time', + 'component.global.form.itemExtraMessage.nameGloballyUnique': 'Name should be globally unique', + 'component.global.input.placeholder.description': 'Can not more than 200 characters', + // User component + 'component.user.loginByPassword': 'Username & Password', + 'component.user.login': 'Login', + 'component.user.username': 'Username', + 'component.user.password': 'Password', + 'component.user.rememberMe': 'Remember Me', + 'component.user.inputUsername': 'Please input username!', + 'component.user.inputPassword': 'Please input password!', + 'component.user.wrongUsernameOrPassword': 'Wrong account or password!', // SSL Module 'component.ssl.removeSSLItemModalContent': 'You are going to remove this item!', 'component.ssl.removeSSLItemModalTitle': 'SSL Remove Alert', diff --git a/src/locales/zh-CN/component.ts b/src/locales/zh-CN/component.ts index 0e4f487f15..8a9dec373e 100644 --- a/src/locales/zh-CN/component.ts +++ b/src/locales/zh-CN/component.ts @@ -18,20 +18,49 @@ export default { 'component.tagSelect.expand': '展开', 'component.tagSelect.collapse': '收起', 'component.tagSelect.all': '全部', - 'component.global.remove': '删除', + 'component.global.confirm': '确认', + 'component.global.delete': '删除', 'component.global.cancel': '取消', - 'component.global.button.submit': '提交', + 'component.global.submit': '提交', 'component.global.create': '创建', 'component.global.add': '新建', 'component.global.save': '保存', 'component.global.edit': '编辑', - 'component.global.action': '操作', 'component.global.update': '更新', 'component.global.get': '获取', 'component.global.edit.plugin': '编辑插件', 'component.global.loading': '加载中', + 'component.global.list': '列表', + 'component.global.description': '描述', + 'component.global.operation': '操作', 'component.status.success': '成功', 'component.status.fail': '失败', + 'component.global.pleaseEnter': '请输入', + 'component.global.pleaseChoose': '请选择', + 'component.global.pleaseCheck': '请检查', + 'component.global.connectionTimeout': '连接超时时间', + 'component.global.sendTimeout': '发送超时时间', + 'component.global.receiveTimeout': '接收超时时间', + 'component.global.name': '名称', + 'component.global.editTime': '编辑时间', + + 'component.global.popconfirm.title.delete': '确定删除该条记录吗?', + 'component.global.steps.stepTitle.basicInformation': '基础信息', + 'component.global.steps.stepTitle.preview': '预览', + 'component.global.steps.stepTitle.pluginConfig': '插件配置', + 'component.global.input.ruleMessage.name': '仅支持字母、数字、- 和 _,且只能以字母开头', + 'component.global.form.itemExtraMessage.nameGloballyUnique': '名称需全局唯一', + 'component.global.input.placeholder.description': '不超过 200 个字符', + + // User component + 'component.user.loginByPassword': '账号密码登录', + 'component.user.login': '登录', + 'component.user.username': '账号', + 'component.user.password': '密码', + 'component.user.rememberMe': '自动登录', + 'component.user.inputUsername': '请输入账号!', + 'component.user.inputPassword': '请输入密码!', + 'component.user.wrongUsernameOrPassword': '账号或密码错误!', // SSL Module 'component.ssl.removeSSLItemModalContent': '确定要删除该项吗?', 'component.ssl.removeSSLItemModalTitle': '删除 SSL', diff --git a/src/pages/Consumer/Create.tsx b/src/pages/Consumer/Create.tsx index f6ca8ae351..7fd661fcc5 100644 --- a/src/pages/Consumer/Create.tsx +++ b/src/pages/Consumer/Create.tsx @@ -51,9 +51,11 @@ const Page: React.FC = (props) => { notification.success({ message: `${ id - ? formatMessage({ id: 'consumer.create.edit' }) - : formatMessage({ id: 'consumer.create.create' }) - } Consumer ${formatMessage({ id: 'consumer.create.success' })}`, + ? formatMessage({ id: 'component.global.edit' }) + : formatMessage({ id: 'component.global.create' }) + } ${formatMessage({ id: 'menu.consumer' })} ${formatMessage({ + id: 'component.status.success', + })}`, }); history.push('/consumer/list'); }) @@ -77,7 +79,9 @@ const Page: React.FC = (props) => { const currentAuthPluginLen = currentAuthPlugin.length; if (currentAuthPluginLen > 1 || currentAuthPluginLen === 0) { notification.warning({ - message: formatMessage({ id: 'consumer.create.enable.authentication.plugin' }), + message: formatMessage({ + id: 'page.consumer.notification.warning.enableAuthenticationPlugin', + }), }); return; } @@ -94,15 +98,19 @@ const Page: React.FC = (props) => { - - - + + + {step === 1 && } diff --git a/src/pages/Consumer/List.tsx b/src/pages/Consumer/List.tsx index cf25f6ecac..b382bc5c78 100644 --- a/src/pages/Consumer/List.tsx +++ b/src/pages/Consumer/List.tsx @@ -31,20 +31,20 @@ const Page: React.FC = () => { const columns: ProColumns[] = [ { - title: formatMessage({ id: 'consumer.list.username' }), + title: formatMessage({ id: 'page.consumer.username' }), dataIndex: 'username', }, { - title: formatMessage({ id: 'consumer.list.description' }), + title: formatMessage({ id: 'component.global.description' }), dataIndex: 'desc', }, { - title: formatMessage({ id: 'consumer.list.update.time' }), + title: formatMessage({ id: 'page.consumer.updateTime' }), dataIndex: 'update_time', render: (text) => `${moment.unix(Number(text)).format('YYYY-MM-DD HH:mm:ss')}`, }, { - title: formatMessage({ id: 'consumer.list.operation' }), + title: formatMessage({ id: 'component.global.operation' }), valueType: 'option', render: (_, record) => ( <> @@ -53,16 +53,18 @@ const Page: React.FC = () => { style={{ marginRight: 10 }} onClick={() => history.push(`/consumer/${record.id}/edit`)} > - {formatMessage({ id: 'consumer.list.edit' })} + {formatMessage({ id: 'component.global.edit' })} { remove(record.id).then(() => { notification.success({ - message: formatMessage({ id: 'consumer.list.delete.success' }), + message: `${formatMessage({ id: 'component.global.delete' })} ${formatMessage({ + id: 'menu.consumer', + })} ${formatMessage({ id: 'component.status.success' })}`, }); /* eslint-disable no-unused-expressions */ ref.current?.reload(); @@ -70,7 +72,7 @@ const Page: React.FC = () => { }} > @@ -79,7 +81,11 @@ const Page: React.FC = () => { ]; return ( - + actionRef={ref} columns={columns} @@ -88,7 +94,7 @@ const Page: React.FC = () => { request={(params) => fetchList(params, search)} toolBarRender={(action) => [ { setSearch(value); action.setPageInfo({ page: 1 }); @@ -97,7 +103,7 @@ const Page: React.FC = () => { />, , ]} /> diff --git a/src/pages/Consumer/components/Step1.tsx b/src/pages/Consumer/components/Step1.tsx index f4afcdf291..948de1415f 100644 --- a/src/pages/Consumer/components/Step1.tsx +++ b/src/pages/Consumer/components/Step1.tsx @@ -38,24 +38,31 @@ const Step1: React.FC = ({ form, disabled }) => { return (
- - + + ); diff --git a/src/pages/Consumer/locales/en-US.ts b/src/pages/Consumer/locales/en-US.ts index 6e2ecf59c3..5cc5d03731 100644 --- a/src/pages/Consumer/locales/en-US.ts +++ b/src/pages/Consumer/locales/en-US.ts @@ -15,33 +15,11 @@ * limitations under the License. */ export default { - 'consumer.step.username': 'Username', - 'consumer.step.username.rule': + 'page.consumer.form.itemRuleMessage.username': 'Maximum length is 100, only letters, numbers and _ are supported, and can only begin with letters', - 'consumer.step.username.unique': 'Username should be unique', - 'consumer.step.input.username': 'Please input username', - 'consumer.step.description': 'Description', - 'consumer.step.input.description': 'Please input description', - - 'consumer.create.edit': 'Edit', - 'consumer.create.create': 'Create', - 'consumer.create.success': 'Success', - 'consumer.create.enable.authentication.plugin': 'Please enable one authentication plugin', - 'consumer.create.basic.information': 'Basic Information', - 'consumer.create.plugin.config': 'Plugin Config', - 'consumer.create.preview': 'Preview', - - 'consumer.list.username': 'Username', - 'consumer.list.description': 'Description', - 'consumer.list.update.time': 'Update Time', - 'consumer.list.operation': 'Operation', - 'consumer.list.edit': 'Edit', - 'consumer.list.delete.confirm': 'Are you sure to delete this record ?', - 'consumer.list.confirm': 'Confirm', - 'consumer.list.cancel': 'Cancel', - 'consumer.list.delete.success': 'Delete Success', - 'consumer.list.delete': 'Delete', - 'consumer.list': 'Consumer List', - 'consumer.list.input': 'Please input', - 'consumer.list.create': 'Create', + 'page.consumer.form.itemExtraMessage.username': 'Username should be unique', + 'page.consumer.notification.warning.enableAuthenticationPlugin': + 'Please enable at least 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 005fd0f6f5..d5b2bd95e0 100644 --- a/src/pages/Consumer/locales/zh-CN.ts +++ b/src/pages/Consumer/locales/zh-CN.ts @@ -15,32 +15,10 @@ * limitations under the License. */ export default { - 'consumer.step.username': '用户名', - 'consumer.step.username.rule': '最大长度100,仅支持字母、数字和 _ ,且只能以字母开头', - 'consumer.step.username.unique': '用户名需唯一', - 'consumer.step.input.username': '请输入用户名', - 'consumer.step.description': '描述', - 'consumer.step.input.description': '请输入描述', - - 'consumer.create.edit': '编辑', - 'consumer.create.create': '创建', - 'consumer.create.success': '成功', - 'consumer.create.enable.authentication.plugin': '请启用一种身份认证类插件', - 'consumer.create.basic.information': '基础信息', - 'consumer.create.plugin.config': '插件配置', - 'consumer.create.preview': '预览', - - 'consumer.list.username': '用户名', - 'consumer.list.description': '描述', - 'consumer.list.update.time': '更新时间', - 'consumer.list.operation': '操作', - 'consumer.list.edit': '编辑', - 'consumer.list.delete.confirm': '确定删除该条记录吗?', - 'consumer.list.confirm': '确定', - 'consumer.list.cancel': '取消', - 'consumer.list.delete.success': '删除记录成功', - 'consumer.list.delete': '删除', - 'consumer.list': '用户列表', - 'consumer.list.input': '请输入', - 'consumer.list.create': '创建', + 'page.consumer.form.itemRuleMessage.username': + '最大长度100,仅支持字母、数字和 _ ,且只能以字母开头', + 'page.consumer.form.itemExtraMessage.username': '用户名需唯一', + 'page.consumer.notification.warning.enableAuthenticationPlugin': '请启用至少一种身份认证类插件', + 'page.consumer.username': '用户名', + 'page.consumer.updateTime': '更新时间', }; diff --git a/src/pages/Metrics/Metrics.tsx b/src/pages/Metrics/Metrics.tsx index f288a9bd7b..1da0e7f790 100644 --- a/src/pages/Metrics/Metrics.tsx +++ b/src/pages/Metrics/Metrics.tsx @@ -32,7 +32,7 @@ const Metrics: React.FC = () => { }, []); return ( - + {!grafanaURL && ( { imageStyle={{ height: 60, }} - description={{formatMessage({ id: 'metrics.grafana.not.config' })}} + description={ + + {formatMessage({ id: 'page.metrics.empty.description.grafanaNotConfig' })} + + } > )} diff --git a/src/pages/Metrics/locales/en-US.ts b/src/pages/Metrics/locales/en-US.ts index b673952567..7841b7e85d 100644 --- a/src/pages/Metrics/locales/en-US.ts +++ b/src/pages/Metrics/locales/en-US.ts @@ -15,7 +15,6 @@ * limitations under the License. */ export default { - 'metrics.monitor': 'Monitor', - 'metrics.grafana.not.config': 'You have not configured Grafana', - 'metrics.grafana.config': 'Configure Now', + 'page.metrics.empty.description.grafanaNotConfig': 'You have not configured Grafana', + 'page.metrics.button.grafanaConfig': 'Configure Now', }; diff --git a/src/pages/Metrics/locales/zh-CN.ts b/src/pages/Metrics/locales/zh-CN.ts index fd60f35c72..134b1dc069 100644 --- a/src/pages/Metrics/locales/zh-CN.ts +++ b/src/pages/Metrics/locales/zh-CN.ts @@ -15,7 +15,6 @@ * limitations under the License. */ export default { - 'metrics.monitor': '监控', - 'metrics.grafana.not.config': '您还未配置 Grafana', - 'metrics.grafana.config': '现在配置', + 'page.metrics.empty.description.grafanaNotConfig': '您还未配置 Grafana', + 'page.metrics.button.grafanaConfig': '现在配置', }; diff --git a/src/pages/Route/Create.tsx b/src/pages/Route/Create.tsx index 86e269184f..f9ff9cbdb5 100644 --- a/src/pages/Route/Create.tsx +++ b/src/pages/Route/Create.tsx @@ -49,15 +49,15 @@ const Page: React.FC = (props) => { const { formatMessage } = useIntl(); const STEP_HEADER_2 = [ - formatMessage({ id: 'route.constants.define.api.request' }), - formatMessage({ id: 'route.constants.preview' }), + formatMessage({ id: 'page.route.steps.stepTitle.defineApiRequest' }), + formatMessage({ id: 'component.global.steps.stepTitle.preview' }), ]; const STEP_HEADER_4 = [ - formatMessage({ id: 'route.constants.define.api.request' }), - formatMessage({ id: 'route.constants.define.api.backend.serve' }), - formatMessage({ id: 'route.constants.plugin.configuration' }), - formatMessage({ id: 'route.constants.preview' }), + formatMessage({ id: 'page.route.steps.stepTitle.defineApiRequest' }), + formatMessage({ id: 'page.route.steps.stepTitle.defineApiBackendServe' }), + formatMessage({ id: 'component.global.steps.stepTitle.pluginConfig' }), + formatMessage({ id: 'component.global.steps.stepTitle.preview' }), ]; const [advancedMatchingRules, setAdvancedMatchingRules] = useState( @@ -266,7 +266,13 @@ const Page: React.FC = (props) => { return ( <> - + {stepHeader.map((item) => ( diff --git a/src/pages/Route/List.tsx b/src/pages/Route/List.tsx index 92d7ac4043..8aa7b857e1 100644 --- a/src/pages/Route/List.tsx +++ b/src/pages/Route/List.tsx @@ -31,11 +31,11 @@ const Page: React.FC = () => { const columns: ProColumns[] = [ { - title: formatMessage({ id: 'route.list.name' }), + title: formatMessage({ id: 'component.global.name' }), dataIndex: 'name', }, { - title: formatMessage({ id: 'route.list.domain.name' }), + title: formatMessage({ id: 'page.route.domainName' }), dataIndex: 'hosts', render: (_, record) => (record.hosts || []).map((host) => ( @@ -45,7 +45,7 @@ const Page: React.FC = () => { )), }, { - title: formatMessage({ id: 'route.list.path' }), + title: formatMessage({ id: 'page.route.path' }), dataIndex: 'uri', render: (_, record) => record.uris.map((uri) => ( @@ -59,33 +59,33 @@ const Page: React.FC = () => { // dataIndex: 'priority', // }, { - title: formatMessage({ id: 'route.list.description' }), + title: formatMessage({ id: 'component.global.description' }), dataIndex: 'description', }, { - title: formatMessage({ id: 'route.list.group.name' }), + title: formatMessage({ id: 'page.route.routeGroup' }), dataIndex: 'route_group_name', }, { - title: formatMessage({ id: 'route.list.status' }), + title: formatMessage({ id: 'page.route.status' }), dataIndex: 'status', render: (_, record) => ( <> {record.status ? ( - {formatMessage({ id: 'route.list.status.publish' })} + {formatMessage({ id: 'page.route.published' })} ) : ( - {formatMessage({ id: 'route.list.status.offline' })} + {formatMessage({ id: 'page.route.unpublished' })} )} ), }, { - title: formatMessage({ id: 'route.list.edit.time' }), + title: formatMessage({ id: 'component.global.editTime' }), dataIndex: 'update_time', render: (text) => `${moment.unix(Number(text)).format('YYYY-MM-DD HH:mm:ss')}`, }, { - title: formatMessage({ id: 'route.list.operation' }), + title: formatMessage({ id: 'component.global.operation' }), valueType: 'option', render: (_, record) => ( <> @@ -95,7 +95,9 @@ const Page: React.FC = () => { onClick={() => { publish(record.id!).then(() => { notification.success({ - message: formatMessage({ id: 'route.list.publish.success' }), + message: `${formatMessage({ id: 'page.route.publish' })} ${formatMessage({ + id: 'menu.routes', + })} ${formatMessage({ id: 'component.status.success' })}`, }); /* eslint-disable no-unused-expressions */ ref.current?.reload(); @@ -104,56 +106,80 @@ const Page: React.FC = () => { style={{ marginRight: 10 }} disabled={record.status} > - {formatMessage({ id: 'route.list.publish' })} + {formatMessage({ id: 'page.route.publish' })} + { + 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' })} + > + + { offline(record.id!).then(() => { notification.success({ - message: formatMessage({ id: 'route.list.offline.success' }), + message: `${formatMessage({ id: 'menu.routes' })} + ${formatMessage({ id: 'page.route.offline' })} + ${formatMessage({ id: 'component.status.success' })}`, }); /* eslint-disable no-unused-expressions */ ref.current?.reload(); }); }} - okText={formatMessage({ id: 'route.list.offline' })} - cancelText={formatMessage({ id: 'route.list.cancel' })} + okText={formatMessage({ id: 'component.global.confirm' })} + cancelText={formatMessage({ id: 'component.global.cancel' })} > { remove(record.id!).then(() => { notification.success({ - message: formatMessage({ id: 'route.list.delete.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: 'route.list.confirm' })} - cancelText={formatMessage({ id: 'route.list.cancel' })} + okText={formatMessage({ id: 'component.global.confirm' })} + cancelText={formatMessage({ id: 'component.global.cancel' })} > @@ -163,7 +189,11 @@ const Page: React.FC = () => { ]; return ( - + actionRef={ref} rowKey="name" @@ -172,7 +202,7 @@ const Page: React.FC = () => { request={(params) => fetchList(params, search)} toolBarRender={(action) => [ { setSearch(value); action.setPageInfo({ page: 1 }); @@ -181,7 +211,7 @@ const Page: React.FC = () => { />, , ]} /> diff --git a/src/pages/Route/components/CreateStep4/CreateStep4.tsx b/src/pages/Route/components/CreateStep4/CreateStep4.tsx index 6b28150cc1..617cb0acc4 100644 --- a/src/pages/Route/components/CreateStep4/CreateStep4.tsx +++ b/src/pages/Route/components/CreateStep4/CreateStep4.tsx @@ -42,18 +42,18 @@ const CreateStep4: React.FC = ({ form1, form2, redirect, ...rest }) => { return ( <> -

{formatMessage({ id: 'route.create.define.api.request' })}

+

{formatMessage({ id: 'page.route.steps.stepTitle.defineApiRequest' })}

{!redirect && ( <> -

{formatMessage({ id: 'route.create.define.api.backend.server' })}

+

{formatMessage({ id: 'page.route.steps.stepTitle.defineApiBackendServe' })}

{}} /> -

{formatMessage({ id: 'route.create.plugin.configuration' })}

+

{formatMessage({ id: 'component.global.steps.stepTitle.pluginConfig' })}

{Boolean(Object.keys(plugins).length !== 0) && ( )} diff --git a/src/pages/Route/components/ResultView/ResultView.tsx b/src/pages/Route/components/ResultView/ResultView.tsx index 90136567b5..b70e035439 100644 --- a/src/pages/Route/components/ResultView/ResultView.tsx +++ b/src/pages/Route/components/ResultView/ResultView.tsx @@ -27,13 +27,17 @@ const ResultView: React.FC = (props) => { return ( history.replace('/routes/list')}> - {formatMessage({ id: 'route.result.return.list' })} + {formatMessage({ id: 'page.route.button.returnList' })} , , ]} /> diff --git a/src/pages/Route/components/Step1/MatchingRulesView.tsx b/src/pages/Route/components/Step1/MatchingRulesView.tsx index 5d571c6338..5f09d17408 100644 --- a/src/pages/Route/components/Step1/MatchingRulesView.tsx +++ b/src/pages/Route/components/Step1/MatchingRulesView.tsx @@ -76,16 +76,16 @@ const MatchingRulesView: React.FC = ({ const columns = [ { - title: formatMessage({ id: 'route.match.parameter.position' }), + title: formatMessage({ id: 'page.route.parameterPosition' }), key: 'position', render: (text: RouteModule.MatchingRule) => { let renderText; switch (text.position) { case 'http': - renderText = formatMessage({ id: 'route.match.http.request.header' }); + renderText = formatMessage({ id: 'page.route.httpRequestHeader' }); break; case 'arg': - renderText = formatMessage({ id: 'route.match.request.parameter' }); + renderText = formatMessage({ id: 'page.route.requestParameter' }); break; case 'cookie': renderText = 'Cookie'; @@ -97,30 +97,30 @@ const MatchingRulesView: React.FC = ({ }, }, { - title: formatMessage({ id: 'route.match.parameter.name' }), + title: formatMessage({ id: 'page.route.parameterName' }), dataIndex: 'name', key: 'name', }, { - title: formatMessage({ id: 'route.match.operational.character' }), + title: formatMessage({ id: 'page.route.operationalCharacter' }), key: 'operator', render: (text: RouteModule.MatchingRule) => { let renderText; switch (text.operator) { case '==': - renderText = formatMessage({ id: 'route.match.equal' }); + renderText = formatMessage({ id: 'page.route.equal' }); break; case '~=': - renderText = formatMessage({ id: 'route.match.unequal' }); + renderText = formatMessage({ id: 'page.route.unequal' }); break; case '>': - renderText = formatMessage({ id: 'route.match.greater.than' }); + renderText = formatMessage({ id: 'page.route.greaterThan' }); break; case '<': - renderText = formatMessage({ id: 'route.match.less.than' }); + renderText = formatMessage({ id: 'page.route.lessThan' }); break; case '~~': - renderText = formatMessage({ id: 'route.match.regex.match' }); + renderText = formatMessage({ id: 'page.route.regexMatch' }); break; default: renderText = ''; @@ -129,20 +129,22 @@ const MatchingRulesView: React.FC = ({ }, }, { - title: formatMessage({ id: 'route.match.parameter.value' }), + title: formatMessage({ id: 'page.route.value' }), dataIndex: 'value', key: 'value', }, disabled ? {} : { - title: formatMessage({ id: 'route.match.operation' }), + title: formatMessage({ id: 'component.global.operation' }), key: 'action', render: (_: any, record: RouteModule.MatchingRule) => ( - handleEdit(record)}>{formatMessage({ id: 'route.match.edit' })} + handleEdit(record)}> + {formatMessage({ id: 'component.global.edit' })} + handleRemove(record.key)}> - {formatMessage({ id: 'route.match.delete' })} + {formatMessage({ id: 'component.global.delete' })} ), @@ -151,11 +153,11 @@ const MatchingRulesView: React.FC = ({ const renderModal = () => ( = ({ setVisible(false); modalForm.resetFields(); }} - okText={formatMessage({ id: 'route.match.confirm' })} - cancelText={formatMessage({ id: 'route.match.cancel' })} + okText={formatMessage({ id: 'component.global.confirm' })} + cancelText={formatMessage({ id: 'component.global.cancel' })} destroyOnClose >
@@ -238,7 +260,7 @@ const MatchingRulesView: React.FC = ({ ); return ( - + {!disabled && ( )} diff --git a/src/pages/Route/components/Step1/MetaView.tsx b/src/pages/Route/components/Step1/MetaView.tsx index 4c87fc4f4f..6c85339e85 100644 --- a/src/pages/Route/components/Step1/MetaView.tsx +++ b/src/pages/Route/components/Step1/MetaView.tsx @@ -32,32 +32,44 @@ const MetaView: React.FC = ({ form, disabled, isEdit // eslint-disable-next-line no-shadow fetchRouteGroupList().then(({ data }) => { setRouteGroups([ - { name: formatMessage({ id: 'route.meta.api.create.group.name' }), id: null }, + { + name: `${formatMessage({ id: 'component.global.create' })} ${formatMessage({ + id: 'page.route.routeGroup', + })}`, + id: null, + }, ...data, ]); }); }, []); return ( - + - + {!isEdit && ( = ({ form, disabled, isEdit )} - + diff --git a/src/pages/Route/components/Step1/RequestConfigView.tsx b/src/pages/Route/components/Step1/RequestConfigView.tsx index 236e4e6ff8..ea707fb005 100644 --- a/src/pages/Route/components/Step1/RequestConfigView.tsx +++ b/src/pages/Route/components/Step1/RequestConfigView.tsx @@ -41,10 +41,12 @@ const RequestConfigView: React.FC = ({ {fields.map((field, index) => ( = ({ rules={[ { pattern: new RegExp(/(^\*?[a-zA-Z0-9._-]+$|^\*$)/, 'g'), - message: formatMessage({ id: 'route.request.config.domain.name.rule' }), + message: formatMessage({ + id: 'page.route.form.itemRulesPatternMessage.domain', + }), }, ]} noStyle > @@ -83,7 +89,7 @@ const RequestConfigView: React.FC = ({ add(); }} > - {formatMessage({ id: 'route.request.config.create' })} + {formatMessage({ id: 'component.global.create' })} )} @@ -101,15 +107,15 @@ const RequestConfigView: React.FC = ({ {fields.map((field, index) => ( - {formatMessage({ id: 'route.request.config.path.description1' })} + {formatMessage({ id: 'page.route.form.itemExtraMessage1.path' })}
- {formatMessage({ id: 'route.request.config.path.description2' })} + {formatMessage({ id: 'page.route.form.itemExtraMessage2.path' })} ) : null } @@ -121,17 +127,23 @@ const RequestConfigView: React.FC = ({ { required: true, whitespace: true, - message: formatMessage({ id: 'route.request.config.input.path' }), + message: `${formatMessage({ + id: 'component.global.pleaseEnter', + })} ${formatMessage({ id: 'page.route.path' })}`, }, { pattern: new RegExp(/^\/[a-zA-Z0-9\-._~%!$&'()+,;=:@/]*\*?$/, 'g'), - message: formatMessage({ id: 'route.request.config.path.rule' }), + message: formatMessage({ + id: 'page.route.form.itemRulesPatternMessage.path', + }), }, ]} noStyle > @@ -155,7 +167,7 @@ const RequestConfigView: React.FC = ({ add(); }} > - {formatMessage({ id: 'route.request.config.create' })} + {formatMessage({ id: 'component.global.create' })}
)} @@ -166,14 +178,18 @@ const RequestConfigView: React.FC = ({ ); return ( - + @@ -193,19 +209,21 @@ const RequestConfigView: React.FC = ({ {renderHosts()} {renderPaths()} diff --git a/src/pages/Route/components/Step2/HttpHeaderRewriteView.tsx b/src/pages/Route/components/Step2/HttpHeaderRewriteView.tsx index bfc4901cd9..d56317370b 100644 --- a/src/pages/Route/components/Step2/HttpHeaderRewriteView.tsx +++ b/src/pages/Route/components/Step2/HttpHeaderRewriteView.tsx @@ -45,29 +45,29 @@ const HttpHeaderRewriteView: React.FC = ({ const columns = [ { - title: formatMessage({ id: 'route.http.request.header.name' }), + title: formatMessage({ id: 'page.route.httpHeaderName' }), dataIndex: 'header_name', key: 'header_name', }, { - title: formatMessage({ id: 'route.http.action' }), + title: formatMessage({ id: 'page.route.httpAction' }), dataIndex: 'header_action', key: 'header_action', render: (action: 'override' | 'remove') => { return action === 'override' - ? formatMessage({ id: 'route.http.override.or.create' }) - : formatMessage({ id: 'route.http.delete' }); + ? formatMessage({ id: 'page.route.httpOverrideOrCreate' }) + : formatMessage({ id: 'component.global.delete' }); }, }, { - title: formatMessage({ id: 'route.http.value' }), + title: formatMessage({ id: 'page.route.value' }), dataIndex: 'header_value', key: 'header_value', }, disabled ? {} : { - title: formatMessage({ id: 'route.http.operation' }), + title: formatMessage({ id: 'component.global.operation' }), key: 'action', render: (_: any, record: RouteModule.UpstreamHeader) => ( @@ -76,14 +76,14 @@ const HttpHeaderRewriteView: React.FC = ({ handleEdit(record); }} > - {formatMessage({ id: 'route.http.edit' })} + {formatMessage({ id: 'component.global.edit' })} { handleRemove(record.key); }} > - {formatMessage({ id: 'route.http.delete' })} + {formatMessage({ id: 'component.global.delete' })} ), @@ -122,8 +122,8 @@ const HttpHeaderRewriteView: React.FC = ({ = ({ setVisible(false); modalForm.resetFields(); }} - okText={formatMessage({ id: 'route.http.confirm' })} - cancelText={formatMessage({ id: 'route.http.cancel' })} + okText={formatMessage({ id: 'component.global.confirm' })} + cancelText={formatMessage({ id: 'component.global.cancel' })} destroyOnClose > {showModalValue && ( @@ -180,7 +194,9 @@ const HttpHeaderRewriteView: React.FC = ({ }; return ( - + {!disabled && ( )}
diff --git a/src/pages/Route/components/Step2/RequestRewriteView.tsx b/src/pages/Route/components/Step2/RequestRewriteView.tsx index 7294b0cef5..007c9b887e 100644 --- a/src/pages/Route/components/Step2/RequestRewriteView.tsx +++ b/src/pages/Route/components/Step2/RequestRewriteView.tsx @@ -52,7 +52,7 @@ const RequestRewriteView: React.FC = ({ form, disabl // eslint-disable-next-line no-shadow fetchUpstreamList().then(({ data }) => { setUpstreams([ - { name: formatMessage({ id: 'route.request.override.input' }), id: null }, + { name: formatMessage({ id: 'page.route.select.option.inputManually' }), id: null }, ...data, ]); }); @@ -104,13 +104,13 @@ const RequestRewriteView: React.FC = ({ form, disabl {...(index === 0 ? FORM_ITEM_LAYOUT : FORM_ITEM_WITHOUT_LABEL)} label={ index === 0 - ? formatMessage({ id: 'route.request.override.domain.name.or.ip' }) + ? formatMessage({ id: 'page.route.form.itemLabel.domainNameOrIp' }) : '' } extra={ index === 0 ? formatMessage({ - id: 'route.request.override.use.domain.name.default.analysis', + id: 'page.route.form.itemExtraMessage.domainNameOrIp', }) : '' } @@ -123,9 +123,11 @@ const RequestRewriteView: React.FC = ({ form, disabl rules={[ { required: true, - message: formatMessage({ - id: 'route.request.override.input.domain.or.ip', - }), + message: `${formatMessage({ + id: 'component.global.pleaseEnter', + })}${formatMessage({ + id: 'page.route.form.itemLabel.domainNameOrIp', + })}`, }, { pattern: new RegExp( @@ -133,14 +135,14 @@ const RequestRewriteView: React.FC = ({ form, disabl 'g', ), message: formatMessage({ - id: 'route.request.override.domain.or.ip.rules', + id: 'page.route.form.itemRulesPatternMessage.domainNameOrIp', }), }, ]} > @@ -153,14 +155,16 @@ const RequestRewriteView: React.FC = ({ form, disabl rules={[ { required: true, - message: formatMessage({ - id: 'route.request.override.input.port.number', - }), + message: `${formatMessage({ + id: 'component.global.pleaseEnter', + })}${formatMessage({ + id: 'page.route.portNumber', + })}`, }, ]} > = ({ form, disabl rules={[ { required: true, - message: formatMessage({ id: 'route.request.override.input.weight' }), + message: `${formatMessage({ + id: 'component.global.pleaseEnter', + })}${formatMessage({ + id: 'page.route.weight', + })}`, }, ]} > = ({ form, disabl add(); }} > - {formatMessage({ id: 'route.request.override.create' })} + {formatMessage({ id: 'component.global.create' })} )} @@ -220,27 +228,32 @@ const RequestRewriteView: React.FC = ({ form, disabl const renderTimeUnit = () => ms; return ( - + - {formatMessage({ id: 'route.request.override.stay.same' })} + {formatMessage({ id: 'page.route.radio.staySame' })} HTTP HTTPS - + - {formatMessage({ id: 'route.request.override.stay.same' })} + {formatMessage({ id: 'page.route.radio.staySame' })} {formatMessage({ id: 'page.route.radio.static' })} {formatMessage({ id: 'page.route.radio.regx' })} @@ -255,13 +268,14 @@ const RequestRewriteView: React.FC = ({ form, disabl rules={[ { required: true, - message: formatMessage({ id: 'route.request.override.input.path' }), + message: `${formatMessage({ id: 'component.global.pleaseEnter' })} + ${formatMessage({ id: 'page.route.form.itemLabel.from' })}`, }, ]} > ); @@ -277,18 +291,20 @@ const RequestRewriteView: React.FC = ({ form, disabl ) { return ( ); @@ -297,10 +313,7 @@ const RequestRewriteView: React.FC = ({ form, disabl }} - + {renderUpstreamMeta()} - + @@ -335,14 +347,16 @@ const RequestRewriteView: React.FC = ({ form, disabl {renderTimeUnit()} - + @@ -350,14 +364,16 @@ const RequestRewriteView: React.FC = ({ form, disabl {renderTimeUnit()} - + diff --git a/src/pages/Route/locales/en-US.ts b/src/pages/Route/locales/en-US.ts index 66896401a4..8a2c25c6c1 100644 --- a/src/pages/Route/locales/en-US.ts +++ b/src/pages/Route/locales/en-US.ts @@ -15,166 +15,91 @@ * limitations under the License. */ export default { - 'route.create.define.api.request': 'Define API requests', - 'route.create.define.api.backend.server': 'Define API Backend Server', - 'route.create.plugin.configuration': 'Plugin Configuration', + 'page.route.button.returnList': 'Return Route List', + 'page.route.button.onlineDebug': 'Online Debug', - 'route.result.submit.success': 'Submit Success', - 'route.result.return.list': 'Return Route List', - 'route.result.create': 'Create Route', + 'page.route.parameterPosition': 'Parameter Position', + 'page.route.httpRequestHeader': 'HTTP Request Header', + 'page.route.requestParameter': 'Request Parameter', + 'page.route.parameterName': 'Parameter Name', + 'page.route.operationalCharacter': 'Operational Character', + 'page.route.equal': 'Equal', + 'page.route.unequal': 'Unequal', + 'page.route.greaterThan': 'Greater Than', + 'page.route.lessThan': 'Less Than', + 'page.route.regexMatch': 'Regex Match', + 'page.route.rule': 'Rule', + 'page.route.httpHeaderName': 'HTTP Request Header Name', - 'route.match.parameter.position': 'Parameter Position', - 'route.match.http.request.header': 'HTTP Request Header', - 'route.match.request.parameter': 'Request Parameter', - 'route.match.parameter.name': 'Parameter Name', - 'route.match.operational.character': 'Operational Character', - 'route.match.equal': 'Equal', - 'route.match.unequal': 'Unequal', - 'route.match.greater.than': 'Greater Than', - 'route.match.less.than': 'Less Than', - 'route.match.regex.match': 'Regex Match', - 'route.match.parameter.value': 'Parameter Value', - 'route.match.operation': 'Operation', - 'route.match.edit': 'Edit', - 'route.match.delete': 'Delete', - 'route.match.edit.rule': 'Edit Rule', - 'route.match.create.rule': 'Create Rule', - 'route.match.confirm': 'Confirm', - 'route.match.cancel': 'Cancel', - 'route.match.select.parameter.position': 'Please choose parameter position', - 'route.match.request.header.example': 'Request header name, for example: HOST', - 'route.match.parameter.name.example': 'Parameter name, for example: id', - 'route.match.input.parameter.name': 'Please input parameter name', - 'route.match.parameter.name.rule': - 'Only letters, numbers, - and _ are supported, and can only begin with letters', - 'route.match.rule': 'Only letters and Numbers are supported, and can only begin with letters', - 'route.match.choose.operational.character': 'Please choose operational character', - 'route.match.value': 'Value', - 'route.match.input.parameter.value': 'Please input parameter value', - 'route.match.advanced.match.rule': 'Advanced Routing Matching Conditions', - 'route.match.create': 'Create', + 'page.route.input.placeholder.parameterNameHttpHeader': 'Request header name, for example: HOST', + 'page.route.input.placeholder.parameterNameRequestParameter': 'Parameter name, for example: id', - 'route.meta.name.description': 'Name And Description', - 'route.meta.api.name': 'API Name', - 'route.meta.input.api.name': 'Please input API name', - 'route.meta.api.name.rule': + 'page.route.form.itemRulesRequiredMessage.parameterName': + 'Only letters and Numbers are supported, and can only begin with letters', + 'page.route.value': 'Value', + 'page.route.panelSection.title.advancedMatchRule': 'Advanced Routing Matching Conditions', + + 'page.route.panelSection.title.nameDescription': 'Name And Description', + 'page.route.form.itemLabel.apiName': 'API Name', + 'page.route.form.itemLable.routeGroup': 'Route Group Name', + 'page.route.form.itemRulesPatternMessage.apiNameRule': 'Maximum length 100, only letters, Numbers, _, and - are supported, and can only begin with letters', - 'rotue.meta.api.rule': - 'Only letters, numbers, _ and - are supported, and can only begin with letters', - 'route.meta.api.group.name': 'RouteGroup', - 'route.meta.group.name': 'GroupName', - 'route.meta.input.api.group.name': 'Please enter the group name', - 'route.meta.api.create.group.name': 'Create route group', - 'route.meta.description': 'APIDescription', - 'route.meta.description.rule': 'Can not more than 200 characters', - 'route.meta.group.description': 'GroupDescription', - 'route.request.config.domain.name': 'Domain Name', - 'route.request.config.domain.or.ip': + 'page.route.panelSection.title.requestConfigBasicDefine': 'Request Basic Define', + 'page.route.protocol': 'Protocol', + 'page.route.form.itemLabel.httpMethod': 'HTTP Method', + 'page.route.form.itemLabel.redirect': 'Redirect', + 'page.route.select.option.enableHttps': 'Enable HTTPS', + 'page.route.select.option.configCustom': 'Custom', + 'page.route.select.option.forbidden': 'Forbidden', + 'page.route.form.itemLabel.redirectCustom': 'Custom Redirect', + 'page.route.input.placeholder.redirectCustom': 'For examle: /foo/index.html', + 'page.route.select.option.redirect301': '301(Permanent Redirect)', + 'page.route.select.option.redirect302': '302(Temporary Redirect)', + + 'page.route.form.itemExtraMessage.domain': 'Domain Name or IP, support for generic Domain Name, for example: *.test.com', - 'route.request.config.input.domain.name': 'Please input Domain Name', - 'route.request.config.domain.name.rule': + 'page.route.form.itemRulesPatternMessage.domain': 'Only letters, numbers and * are supported. * can only be at the beginning, and only single * is supported', - 'route.request.config.create': 'Create', - 'route.request.config.path': 'Path', - 'route.request.config.path.description1': + 'page.route.form.itemExtraMessage1.path': '1. Request path, for example: /foo/index.html, supports request path prefix /foo/* ;', - 'route.request.config.path.description2': '2. /* represents all paths', - 'route.request.config.input.path': 'Please input request path', - 'route.request.config.path.rule': 'Begin with / , and * can only at the end', - 'route.request.config.basic.define': 'Request Basic Define', - 'route.request.config.protocol': 'Protocol', - 'route.request.config.choose.protocol': 'Please choose protocols', - 'route.request.config.http.method': 'HTTP Method', - 'route.request.config.choose.http.method': 'Please choose HTTP methods', - 'route.request.config.redirect': 'Redirect', - 'route.request.config.enable.https': 'Enable HTTPS', - 'route.request.config.custom': 'Custom', - 'route.request.config.forbidden': 'Forbidden', - 'route.request.config.redirect.custom': 'Custom Redirect', - 'route.request.config.redirect.custom.example': 'For examle: /foo/index.html', - 'route.request.config.redirect.301': '301(Permanent Redirect)', - 'route.request.config.redirect.302': '302(Temporary Redirect)', + 'page.route.form.itemExtraMessage2.path': '2. /* represents all paths', + 'page.route.form.itemRulesPatternMessage.path': 'Begin with / , and * can only at the end', - 'route.http.request.header.name': 'HTTP Request Header Name', - 'route.http.action': 'Action', - 'route.http.override.or.create': 'Override/Create', - 'route.http.delete': 'Delete', - 'route.http.value': 'Value', - 'route.http.operation': 'Operation', - 'route.http.edit': 'Edit', - 'route.http.edit.request.header': 'Edit HTTP request header', - 'route.http.operate.request.header': 'Operate request header', - 'route.http.confirm': 'Confirm', - 'route.http.cancel': 'Cancel', - 'route.http.input.request.header.name': 'Please input HTTP request header name', - 'route.http.select.actions': 'Please select actions', - 'route.http.input.value': 'Please input value', - 'route.http.override.request.header': 'Override HTTP request header', + 'page.route.httpAction': 'Action', + 'page.route.httpOverrideOrCreate': 'Override/Create', + 'page.route.panelSection.title.httpOverrideRequestHeader': 'Override HTTP request header', + 'page.route.routeGroup': 'RouteGroup', + 'page.route.status': 'Status', + 'page.route.published': 'Published', + 'page.route.unpublished': 'Unpublished', + 'page.route.groupName': 'GroupName', + 'page.route.publish': 'Publish', + 'page.route.offline': 'Offline', - 'route.request.override.input': 'Input', - 'route.request.override.domain.name.or.ip': 'Domain Name/IP', - 'route.request.override.use.domain.name.default.analysis': + 'page.route.select.option.inputManually': 'Input Manually', + 'page.route.form.itemLabel.domainNameOrIp': 'Domain Name/IP', + 'page.route.form.itemExtraMessage.domainNameOrIp': 'When using Domain Name, it will analysis the local: /etc/resolv.conf by default', - 'route.request.override.input.domain.or.ip': 'Please input Domain Name/IP', - 'route.request.override.domain.or.ip.rules': 'Only letters, numbers and . are supported', - 'route.request.override.input.port.number': 'Please input port number', - 'route.request.override.port.number': 'Port Number', - 'route.request.override.input.weight': 'Please input weight', - 'route.request.override.weight': 'Weight', - 'route.request.override.create': 'Create', - 'route.request.override': 'Requests Override', - 'route.request.override.protocol': 'Protocol', - 'route.request.override.select.protocol': 'Please select protocol', - 'route.request.override.stay.same': 'Stay The Same', - 'route.request.override.path': 'Request Path', - 'route.request.override.edit': 'Edit', - 'route.request.override.new.path': 'New Path', - 'route.request.override.input.path': 'Please input request path', - 'route.request.override.path.example': 'For example: /foo/bar/index.html', - 'route.request.override.upstream': 'Upstream', - 'route.request.override.connection.timeout': 'Connection Timeout', - 'route.request.override.input.connection.timeout': 'Please inout connection timeout', - 'route.request.override.send.timeout': 'Send Timeout', - 'route.request.override.inout.send.timeout': 'Please input send timeout', - 'route.request.override.receive.timeout': 'Receive Timeout', - 'route.request.override.inout.receive.timeout': 'Please input receive timeout', + 'page.route.form.itemRulesPatternMessage.domainNameOrIp': + 'Only letters, numbers and . are supported', + 'page.route.portNumber': 'Port Number', + 'page.route.weight': 'Weight', + 'page.route.radio.staySame': 'Stay The Same', + 'page.route.form.itemLabel.newPath': 'New Path', + 'page.route.form.itemLabel.rewriteType': 'Request Path', + 'page.route.input.placeholder.newPath': 'For example: /foo/bar/index.html', - 'route.constants.define.api.request': 'Define API Request', - 'route.constants.preview': 'Preview', - 'route.constants.define.api.backend.serve': 'Define API Backend Server', - 'route.constants.plugin.configuration': 'Plugin Configuration', + 'page.route.steps.stepTitle.defineApiRequest': 'Define API Request', + 'page.route.steps.stepTitle.defineApiBackendServe': 'Define API Backend Server', - 'route.create.management': 'Route Management', - - 'route.list.name': 'Name', - 'route.list.domain.name': 'Domain Name', - 'route.list.path': 'Path', - 'route.list.description': 'Description', - 'route.list.group.name': 'RouteGroup', - 'route.list.status': 'Status', - 'route.list.status.publish': 'Published', - 'route.list.status.offline': 'Offline', - 'route.list.edit.time': 'Edit Time', - 'route.list.operation': 'Operation', - 'route.list.edit': 'Edit', - 'route.list.publish': 'Publish', - 'route.list.debug': 'Online Debug', - 'route.list.publish.success': 'Route publish success', - 'route.list.offline': 'Offline', - 'route.list.offline.success': 'Offline success', - 'route.list.offline.confirm': 'Are you sure to offline this route?', - 'route.list.delete.confrim': 'Are you sure to delete this route?', - 'route.list.delete.success': 'Delete Success!', - 'route.list.confirm': 'Confirm', - 'route.list.cancel': 'Cancel', - 'route.list.delete': 'Delete', - 'route.list': 'Route List', - 'route.list.input': 'Please input', - 'route.list.create': 'Create', + 'page.route.popconfirm.title.offline': 'Are you sure to offline this route?', 'page.route.radio.static': 'Static', 'page.route.radio.regx': 'Regx', 'page.route.form.itemLabel.from': 'From', 'page.route.form.itemHelp.status': 'Whether a route can be used after it is created, the default value is false.', + + 'page.route.domainName': 'Domain Name', + 'page.route.path': 'Path', }; diff --git a/src/pages/Route/locales/zh-CN.ts b/src/pages/Route/locales/zh-CN.ts index 95aa016d91..0dce922652 100644 --- a/src/pages/Route/locales/zh-CN.ts +++ b/src/pages/Route/locales/zh-CN.ts @@ -15,160 +15,91 @@ * limitations under the License. */ export default { - 'route.create.define.api.request': '定义 API 请求', - 'route.create.define.api.backend.server': '定义 API 后端服务', - 'route.create.plugin.configuration': '插件配置', + // global + 'page.route.parameterPosition': '参数位置', + 'page.route.httpRequestHeader': 'HTTP 请求头', + 'page.route.requestParameter': '请求参数', + 'page.route.parameterName': '参数名称', + 'page.route.operationalCharacter': '运算符', + 'page.route.equal': '等于', + 'page.route.unequal': '不等于', + 'page.route.greaterThan': '大于', + 'page.route.lessThan': '小于', + 'page.route.regexMatch': '正则匹配', + 'page.route.rule': '规则', + 'page.route.domainName': '域名', + 'page.route.path': '路径', + 'page.route.value': '参数值', + 'page.route.protocol': '协议', + 'page.route.httpHeaderName': 'HTTP 请求头名称', + 'page.route.routeGroup': '路由分组', + 'page.route.status': '状态', + 'page.route.published': '已发布', + 'page.route.unpublished': '未发布', + 'page.route.groupName': '分组名称', + 'page.route.publish': '发布', + 'page.route.offline': '下线', - 'route.result.submit.success': '提交成功', - 'route.result.return.list': '返回路由列表', - 'route.result.create': '创建路由', + // button + 'page.route.button.returnList': '返回路由列表', + 'page.route.button.onlineDebug': '在线调试', - 'route.match.parameter.position': '参数位置', - 'route.match.http.request.header': 'HTTP 请求头', - 'route.match.request.parameter': '请求参数', - 'route.match.parameter.name': '参数名称', - 'route.match.operational.character': '运算符', - 'route.match.equal': '等于', - 'route.match.unequal': '不等于', - 'route.match.greater.than': '大于', - 'route.match.less.than': '小于', - 'route.match.regex.match': '正则匹配', - 'route.match.parameter.value': '参数值', - 'route.match.operation': '操作', - 'route.match.edit': '编辑', - 'route.match.delete': '删除', - 'route.match.edit.rule': '编辑规则', - 'route.match.create.rule': '创建规则', - 'route.match.confirm': '确定', - 'route.match.cancel': '取消', - 'route.match.select.parameter.position': '请选择参数位置', - 'route.match.request.header.example': '请求头键名,例如:HOST', - 'route.match.parameter.name.example': '参数名称,例如:id', - 'route.match.input.parameter.name': '请输入参数名称', - 'route.match.parameter.name.rule': '仅支持字母、数字、- 和 _ ,且只能以字母开头', - 'route.match.rule': '仅支持字母和数字,且只能以字母开头', - 'route.match.choose.operational.character': '请选择运算符', - 'route.match.value': '值', - 'route.match.input.parameter.value': '请输入参数值', - 'route.match.advanced.match.rule': '高级路由匹配条件', - 'route.match.create': '创建', - - 'route.meta.name.description': '名称及其描述', - 'route.meta.api.name': 'API 名称', - 'route.meta.input.api.name': '请输入 API 名称', - 'route.meta.api.name.rule': '最大长度100,仅支持字母、数字、- 和 _,且只能以字母开头', - 'rotue.meta.api.rule': '仅支持字母、数字、- 和 _,且只能以字母开头', - 'route.meta.api.group.name': '路由分组', - 'route.meta.group.name': '分组名称', - 'route.meta.input.api.group.name': '请输入路由分组名称', - 'route.meta.api.create.group.name': '创建路由分组', - 'route.meta.description': '路由描述', - 'route.meta.description.rule': '不超过 200 个字符', - 'route.meta.group.description': '分组描述', - - 'route.request.config.domain.name': '域名', - 'route.request.config.domain.or.ip': '域名或IP,支持泛域名,如:*.test.com', - 'route.request.config.input.domain.name': '请输入域名', - 'route.request.config.domain.name.rule': '仅支持字母、数字和 * ,且 * 只能是在开头,支持单个 * ', - 'route.request.config.create': '创建', - 'route.request.config.path': '路径', - 'route.request.config.path.description1': + // input + 'page.route.input.placeholder.parameterNameHttpHeader': '请求头键名,例如:HOST', + 'page.route.input.placeholder.parameterNameRequestParameter': '参数名称,例如:id', + 'page.route.input.placeholder.redirectCustom': '例如:/foo/index.html', + // form + 'page.route.form.itemRulesRequiredMessage.parameterName': '仅支持字母和数字,且只能以字母开头', + 'page.route.form.itemLabel.apiName': 'API 名称', + 'page.route.form.itemLable.routeGroup': '路由分组名称', + 'page.route.form.itemRulesPatternMessage.apiNameRule': + '最大长度100,仅支持字母、数字、- 和 _,且只能以字母开头', + 'page.route.form.itemLabel.httpMethod': 'HTTP 方法', + 'page.route.form.itemLabel.redirect': '重定向', + 'page.route.form.itemLabel.redirectCustom': '自定义重定向', + 'page.route.form.itemLabel.rewriteType': '请求路径', + 'page.route.form.itemExtraMessage.domain': '域名或IP,支持泛域名,如:*.test.com', + 'page.route.form.itemRulesPatternMessage.domain': + '仅支持字母、数字和 * ,且 * 只能是在开头,支持单个 * ', + 'page.route.form.itemExtraMessage1.path': '1. 请求路径,如 /foo/index.html,支持请求路径前缀 /foo/* ;', - 'route.request.config.path.description2': '2. /* 代表所有路径', - 'route.request.config.input.path': '请输入请求路径', - 'route.request.config.path.rule': '以 / 开头,且 * 只能在最后', - 'route.request.config.basic.define': '请求基础定义', - 'route.request.config.protocol': '协议', - 'route.request.config.choose.protocol': '请选择协议', - 'route.request.config.http.method': 'HTTP 方法', - 'route.request.config.choose.http.method': '请选择 HTTP 方法', - 'route.request.config.redirect': '重定向', - 'route.request.config.enable.https': '启用 HTTPS', - 'route.request.config.custom': '自定义', - 'route.request.config.forbidden': '禁用', - 'route.request.config.redirect.custom': '自定义重定向', - 'route.request.config.redirect.custom.example': '例如:/foo/index.html', - 'route.request.config.redirect.301': '301(永久重定向)', - 'route.request.config.redirect.302': '302(临时重定向)', + 'page.route.form.itemExtraMessage2.path': '2. /* 代表所有路径', + 'page.route.form.itemRulesPatternMessage.path': '以 / 开头,且 * 只能在最后', + + // select + 'page.route.select.option.enableHttps': '启用 HTTPS', + 'page.route.select.option.configCustom': '自定义', + 'page.route.select.option.forbidden': '禁用', + 'page.route.select.option.redirect301': '301(永久重定向)', + 'page.route.select.option.redirect302': '302(临时重定向)', + 'page.route.select.option.inputManually': '手动填写', - 'route.http.request.header.name': 'HTTP 请求头名称', - 'route.http.action': '行为', - 'route.http.override.or.create': '重写/创建', - 'route.http.delete': '删除', - 'route.http.value': '值', - 'route.http.operation': '操作', - 'route.http.edit': '编辑', - 'route.http.edit.request.header': '编辑请求头', - 'route.http.operate.request.header': '操作请求头', - 'route.http.confirm': '确定', - 'route.http.cancel': '取消', - 'route.http.input.request.header.name': '请输入 HTTP 请求头名称', - 'route.http.select.actions': '请选择行为', - 'route.http.input.value': '请输入值', - 'route.http.override.request.header': 'HTTP 请求头改写', + // steps + 'page.route.steps.stepTitle.defineApiRequest': '定义 API 请求', + 'page.route.steps.stepTitle.defineApiBackendServe': '定义 API 后端服务', - 'route.request.override.input': '手动填写', - 'route.request.override.domain.name.or.ip': '域名/IP', - 'route.request.override.use.domain.name.default.analysis': - '使用域名时,默认解析本地:/etc/resolv.conf', - 'route.request.override.input.domain.or.ip': '请输入域名/IP', - 'route.request.override.domain.or.ip.rules': '仅支持字母、数字和 . ', - 'route.request.override.input.port.number': '请输入端口号', - 'route.request.override.port.number': '端口号', - 'route.request.override.input.weight': '请输入权重', - 'route.request.override.weight': '权重', - 'route.request.override.create': '创建', - 'route.request.override': '请求改写', - 'route.request.override.protocol': '协议', - 'route.request.override.select.protocol': '请选择协议', - 'route.request.override.stay.same': '保持原样', - 'route.request.override.path': '请求路径', - 'route.request.override.edit': '编辑', - 'route.request.override.new.path': '新路径', - 'route.request.override.input.path': '请输入请求路径', - 'route.request.override.path.example': '例如:/foo/bar/index.html', - 'route.request.override.upstream': '上游', - 'route.request.override.connection.timeout': '连接超时', - 'route.request.override.input.connection.timeout': '请输入连接超时时间', - 'route.request.override.send.timeout': '发送超时', - 'route.request.override.inout.send.timeout': '请输入发送超时时间', - 'route.request.override.receive.timeout': '接收超时', - 'route.request.override.inout.receive.timeout': '请输入接收超时时间', + // panelSection + 'page.route.panelSection.title.nameDescription': '名称及其描述', + 'page.route.panelSection.title.httpOverrideRequestHeader': 'HTTP 请求头改写', + 'page.route.panelSection.title.requestOverride': '请求改写', + 'page.route.panelSection.title.requestConfigBasicDefine': '请求基础定义', + 'page.route.panelSection.title.advancedMatchRule': '高级路由匹配条件', - 'route.constants.define.api.request': '定义 API 请求', - 'route.constants.preview': '预览', - 'route.constants.define.api.backend.serve': '定义 API 后端服务', - 'route.constants.plugin.configuration': '插件配置', + 'page.route.httpAction': '行为', + 'page.route.httpOverrideOrCreate': '重写/创建', - 'route.create.management': '路由管理', + 'page.route.form.itemLabel.domainNameOrIp': '域名/IP', + 'page.route.form.itemExtraMessage.domainNameOrIp': '使用域名时,默认解析本地:/etc/resolv.conf', + 'page.route.form.itemRulesPatternMessage.domainNameOrIp': '仅支持字母、数字和 . ', + 'page.route.portNumber': '端口号', + 'page.route.weight': '权重', - 'route.list.name': '名称', - 'route.list.domain.name': '域名', - 'route.list.path': '路径', - 'route.list.description': '描述', - 'route.list.group.name': '路由分组', - 'route.list.status': '状态', - 'route.list.status.publish': '已发布', - 'route.list.status.offline': '未发布', - 'route.list.edit.time': '编辑时间', - 'route.list.operation': '操作', - 'route.list.edit': '编辑', - 'route.list.publish': '发布', - 'route.list.debug': '在线调试', - 'route.list.publish.success': 'API发布成功!', - 'route.list.offline': '下线', - 'route.list.offline.success': 'API下线成功!', - 'route.list.offline.confirm': '确定下线该路由吗?', - 'route.list.delete.confrim': '确定删除该路由吗?', - 'route.list.delete.success': '删除成功!', - 'route.list.confirm': '确认', - 'route.list.cancel': '取消', - 'route.list.delete': '删除', - 'route.list': '路由列表', - 'route.list.input': '请输入', - 'route.list.create': '创建', 'page.route.radio.static': '静态重写', 'page.route.radio.regx': '正则重写', 'page.route.form.itemLabel.from': '原路径', 'page.route.form.itemHelp.status': '路由创建后是否可以使用, 默认值为 false', + 'page.route.radio.staySame': '保持原样', + 'page.route.input.placeholder.newPath': '例如:/foo/bar/index.html', + 'page.route.form.itemLabel.newPath': '新地址', + 'page.route.popconfirm.title.offline': '确定下线该路由吗?', }; diff --git a/src/pages/RouteGroup/Create.tsx b/src/pages/RouteGroup/Create.tsx index 80213a298c..8008e491f6 100644 --- a/src/pages/RouteGroup/Create.tsx +++ b/src/pages/RouteGroup/Create.tsx @@ -47,9 +47,11 @@ const Page: React.FC = (props) => { notification.success({ message: `${ gid - ? formatMessage({ id: 'routegroup.create.edit' }) - : formatMessage({ id: 'routegroup.create.create' }) - } ${formatMessage({ id: 'routegroup.create.routegroup.successfully' })}`, + ? formatMessage({ id: 'component.global.edit' }) + : formatMessage({ id: 'component.global.create' }) + }${formatMessage({ id: 'menu.routegroup' })}${formatMessage({ + id: 'component.status.success', + })}`, }); history.replace('/routegroup/list'); }); @@ -69,11 +71,19 @@ const Page: React.FC = (props) => { return ( <> - + - - + + {step === 1 && } diff --git a/src/pages/RouteGroup/List.tsx b/src/pages/RouteGroup/List.tsx index b2da1732ea..8d8d0715d6 100644 --- a/src/pages/RouteGroup/List.tsx +++ b/src/pages/RouteGroup/List.tsx @@ -32,20 +32,20 @@ const Page: React.FC = () => { const columns: ProColumns[] = [ { - title: formatMessage({ id: 'routegroup.list.name' }), + title: formatMessage({ id: 'component.global.name' }), dataIndex: 'name', }, { - title: formatMessage({ id: 'routegroup.list.description' }), + title: formatMessage({ id: 'component.global.description' }), dataIndex: 'description', }, { - title: formatMessage({ id: 'routegroup.list.edit.time' }), + title: formatMessage({ id: 'component.global.editTime' }), dataIndex: 'update_time', render: (text) => `${moment.unix(Number(text)).format('YYYY-MM-DD HH:mm:ss')}`, }, { - title: formatMessage({ id: 'routegroup.list.operation' }), + title: formatMessage({ id: 'component.global.operation' }), valueType: 'option', render: (_, record) => ( <> @@ -54,16 +54,18 @@ const Page: React.FC = () => { style={{ marginRight: 10 }} onClick={() => history.push(`/routegroup/${record.id}/edit`)} > - {formatMessage({ id: 'routegroup.list.edit' })} + {formatMessage({ id: 'component.global.edit' })} { remove(record.id!).then(() => { notification.success({ - message: formatMessage({ id: 'routegroup.list.delete.successfully' }), + message: `${formatMessage({ id: 'component.global.delete' })} ${formatMessage({ + id: 'menu.routegroup', + })} ${formatMessage({ id: 'component.status.success' })}`, }); /* eslint-disable no-unused-expressions */ ref.current?.reload(); @@ -71,7 +73,7 @@ const Page: React.FC = () => { }} > @@ -80,7 +82,11 @@ const Page: React.FC = () => { ]; return ( - + actionRef={ref} columns={columns} @@ -89,7 +95,7 @@ const Page: React.FC = () => { request={(params) => fetchList(params, search)} toolBarRender={(action) => [ { setSearch(value); action.setPageInfo({ page: 1 }); @@ -98,7 +104,7 @@ const Page: React.FC = () => { />, , ]} /> diff --git a/src/pages/RouteGroup/components/Step1.tsx b/src/pages/RouteGroup/components/Step1.tsx index 59f5dc4dbc..89e61b3976 100644 --- a/src/pages/RouteGroup/components/Step1.tsx +++ b/src/pages/RouteGroup/components/Step1.tsx @@ -36,19 +36,19 @@ const Step1: React.FC = ({ form, disabled }) => { return ( - + diff --git a/src/pages/RouteGroup/locales/en-US.ts b/src/pages/RouteGroup/locales/en-US.ts index 318809df3c..0338a7a3bc 100644 --- a/src/pages/RouteGroup/locales/en-US.ts +++ b/src/pages/RouteGroup/locales/en-US.ts @@ -15,31 +15,5 @@ * limitations under the License. */ export default { - 'routegroup.step.create': 'Create', - 'routegroup.step.name': 'Name', - 'routegroup.step.name.should.unique': 'Name should be unique', - 'routegroup.step.input.routegroup.name': 'Please input routegroup name', - 'routegroup.step.description': 'Description', - 'routegroup.step.input.description': 'Please input description', - - 'routegroup.create.edit': 'Edit', - 'routegroup.create.create': 'Create', - 'routegroup.create.routegroup.successfully': 'routegroup successfully', - 'routegroup.create.basic.info': 'Basic Information', - 'routegroup.create.preview': 'Preview', - - 'routegroup.list.name': 'Name', - 'routegroup.list.type': 'Type', - 'routegroup.list.description': 'Description', - 'routegroup.list.edit.time': 'Edit Time', - 'routegroup.list.operation': 'Operation', - 'routegroup.list.edit': 'Edit', - 'routegroup.list.confirm.delete': 'Are you sure to delete ?', - 'routegroup.list.confirm': 'Confirm', - 'routegroup.list.cancel': 'Cancel', - 'routegroup.list.delete.successfully': 'Delete successfully', - 'routegroup.list.delete': 'Delete', - 'routegroup.list': 'routegroup List', - 'routegroup.list.input': 'Please input', - 'routegroup.list.create': 'Create', + 'page.routegroup.input.placeholder.name': 'Please input routegroup name', }; diff --git a/src/pages/RouteGroup/locales/zh-CN.ts b/src/pages/RouteGroup/locales/zh-CN.ts index 9797ae44cc..cf4b167522 100644 --- a/src/pages/RouteGroup/locales/zh-CN.ts +++ b/src/pages/RouteGroup/locales/zh-CN.ts @@ -15,31 +15,5 @@ * limitations under the License. */ export default { - 'routegroup.step.create': '创建', - 'routegroup.step.name': '名称', - 'routegroup.step.name.should.unique': '名称需全局唯一', - 'routegroup.step.input.routegroup.name': '请输入分组名称', - 'routegroup.step.description': '描述', - 'routegroup.step.input.description': '请输入描述', - - 'routegroup.create.edit': '编辑', - 'routegroup.create.create': '创建', - 'routegroup.create.routegroup.successfully': '分组成功', - 'routegroup.create.basic.info': '基础信息', - 'routegroup.create.preview': '预览', - - 'routegroup.list.name': '名称', - 'routegroup.list.type': '类型', - 'routegroup.list.description': '描述', - 'routegroup.list.edit.time': '编辑时间', - 'routegroup.list.operation': '操作', - 'routegroup.list.edit': '编辑', - 'routegroup.list.confirm.delete': '确定删除该条记录吗?', - 'routegroup.list.confirm': '确定', - 'routegroup.list.cancel': '取消', - 'routegroup.list.delete.successfully': '删除记录成功', - 'routegroup.list.delete': '删除', - 'routegroup.list': '分组列表', - 'routegroup.list.input': '请输入', - 'routegroup.list.create': '创建', + 'page.routegroup.input.placeholder.name': '请输入分组名称', }; diff --git a/src/pages/SSL/Create.tsx b/src/pages/SSL/Create.tsx index fc39b335a4..01b64a280e 100644 --- a/src/pages/SSL/Create.tsx +++ b/src/pages/SSL/Create.tsx @@ -50,7 +50,11 @@ const Page: React.FC = (props) => { setStep(2); }) .catch(() => { - notification.warning({ message: formatMessage({ id: 'ssl.create.check' }) }); + notification.warning({ + message: `${formatMessage({ id: 'component.global.pleaseCheck' })}${formatMessage({ + id: 'page.ssl.form.itemLabel.cert', + })}`, + }); }); }; @@ -84,12 +88,18 @@ const Page: React.FC = (props) => { return ( <> - + {[ - formatMessage({ id: 'ssl.create.complete.cert.info' }), - formatMessage({ id: 'ssl.create.preview' }), + formatMessage({ id: 'page.ssl.steps.stepTitle.completeCertInfo' }), + formatMessage({ id: 'component.global.steps.stepTitle.preview' }), ].map((item) => ( ))} diff --git a/src/pages/SSL/List.tsx b/src/pages/SSL/List.tsx index 0966d3fce9..8d9ebf28eb 100644 --- a/src/pages/SSL/List.tsx +++ b/src/pages/SSL/List.tsx @@ -33,7 +33,11 @@ const Page: React.FC = () => { const onEnableChange = (id: string, checked: boolean) => { switchEnable(id, checked) .then(() => { - notification.success({ message: formatMessage({ id: 'ssl.list.update.cert.enable.status.successful' }) }); + notification.success({ + message: formatMessage({ + id: 'page.ssl.notification.updateCertEnableStatusSuccessfully', + }), + }); }) .catch(() => { /* eslint-disable no-unused-expressions */ @@ -54,13 +58,13 @@ const Page: React.FC = () => { }, }, { - title: formatMessage({ id: 'ssl.list.expiration.time' }), + title: formatMessage({ id: 'page.ssl.list.expirationTime' }), dataIndex: 'validity_end', hideInSearch: true, render: (text) => `${moment.unix(Number(text)).format('YYYY-MM-DD HH:mm:ss')}`, }, { - title: formatMessage({ id: 'ssl.list.if.enable' }), + title: formatMessage({ id: 'page.ssl.list.ifEnable' }), dataIndex: 'status', hideInSearch: true, render: (text, record) => ( @@ -73,13 +77,13 @@ const Page: React.FC = () => { ), }, { - title: formatMessage({ id: 'ssl.list.update.time' }), + title: formatMessage({ id: 'component.global.editTime' }), dataIndex: 'update_time', hideInSearch: true, render: (text) => `${moment.unix(Number(text)).format('YYYY-MM-DD HH:mm:ss')}`, }, { - title: formatMessage({ id: 'ssl.list.operation' }), + title: formatMessage({ id: 'component.global.operation' }), valueType: 'option', render: (_, record) => ( <> @@ -90,10 +94,10 @@ const Page: React.FC = () => { }} style={{ marginRight: 10 }} > - {formatMessage({ id: 'ssl.list.edit' })} + {formatMessage({ id: 'component.global.edit' })} removeSSL(record.id).then(() => { notification.success({ @@ -103,8 +107,8 @@ const Page: React.FC = () => { requestAnimationFrame(() => tableRef.current?.reload()); }) } - cancelText={formatMessage({ id: 'ssl.list.cancel' })} - okText={formatMessage({ id: 'ssl.list.confirm' })} + cancelText={formatMessage({ id: 'component.global.cancel' })} + okText={formatMessage({ id: 'component.global.confirm' })} > , ]} /> diff --git a/src/pages/SSL/components/CertificateForm/index.tsx b/src/pages/SSL/components/CertificateForm/index.tsx index cddc39c30b..a0a4b26acf 100644 --- a/src/pages/SSL/components/CertificateForm/index.tsx +++ b/src/pages/SSL/components/CertificateForm/index.tsx @@ -45,7 +45,7 @@ const CertificateForm: React.FC = ({ mode, form }) => { if (mode === 'VIEW') { return ( @@ -60,11 +60,19 @@ const CertificateForm: React.FC = ({ mode, form }) => { {renderSNI()} = ({ mode, form }) => { /> diff --git a/src/pages/SSL/components/CertificateUploader/index.tsx b/src/pages/SSL/components/CertificateUploader/index.tsx index 89f52a2af4..8b5680334a 100644 --- a/src/pages/SSL/components/CertificateUploader/index.tsx +++ b/src/pages/SSL/components/CertificateUploader/index.tsx @@ -84,7 +84,7 @@ const CertificateUploader: React.FC = ({ onSuccess, onRemove, dat beforeUpload={(file, fileList) => beforeUpload(file, fileList, 'PUBLIC_KEY')} > @@ -96,7 +96,10 @@ const CertificateUploader: React.FC = ({ onSuccess, onRemove, dat beforeUpload={(file, fileList) => beforeUpload(file, fileList, 'PRIVATE_KEY')} > diff --git a/src/pages/SSL/components/Step1/index.tsx b/src/pages/SSL/components/Step1/index.tsx index c0aad19315..af4341ad9c 100644 --- a/src/pages/SSL/components/Step1/index.tsx +++ b/src/pages/SSL/components/Step1/index.tsx @@ -53,14 +53,16 @@ const Step: React.FC = ({ form }) => { return ( <>
diff --git a/src/pages/SSL/locales/en-US.ts b/src/pages/SSL/locales/en-US.ts index 50c9b711bb..c80b97d6c8 100644 --- a/src/pages/SSL/locales/en-US.ts +++ b/src/pages/SSL/locales/en-US.ts @@ -15,42 +15,28 @@ * limitations under the License. */ export default { - 'ssl.form.expiration.time': 'Expiration Time', - 'ssl.form.cert': 'Certificate Content', - 'ssl.form.check.cert.value': 'Please check Certificate Content', - 'ssl.form.cert.value.length': 'The Certificate Content requires at least 128 characters', - 'ssl.form.private.key': 'Private Key', - 'ssl.form.check.key.value': 'Please check Private Key', - 'ssl.form.key.value.length': 'The Private Key requires at least 128 characters', + 'page.ssl.form.itemLabel.expireTime': 'Expiration Time', + 'page.ssl.form.itemLabel.cert': 'Certificate Content', + 'page.ssl.form.itemRuleMessage.certValueLength': + 'The Certificate Content requires at least 128 characters', + 'page.ssl.form.itemLabel.privateKey': 'Private Key', + 'page.ssl.form.itemRuleMessage.privateKeyLength': + 'The Private Key requires at least 128 characters', 'page.ssl.textAreaPlaceholder.cert': 'Please enter the SSL Certificate Content', - 'ssl.upload.cert': 'Upload Certificate', - 'ssl.upload.private.key': 'Upload Private Key', + 'page.ssl.button.uploadCert': 'Upload Certificate', - 'ssl.step.way': 'Way', - 'ssl.step.rules': + 'page.ssl.form.itemLabel.way': 'Way', + 'page.ssl.form.itemExtraMessage.way': 'The new certificate should contain the same about SNI as the current certificate', - 'ssl.step.select.create.ways': 'Please select create ways', - 'ssl.step.input': 'Input', - 'ssl.step.upload': 'Upload', + 'page.ssl.select.placeholder.selectCreateWays': 'Please select create ways', + 'page.ssl.selectOption.input': 'Input', + 'page.ssl.upload': 'Upload', - 'ssl.create.check': 'Please check certificate content', - 'ssl.create': 'Create Certificate', - 'ssl.create.complete.cert.info': 'Complete Certificate Information', - 'ssl.create.preview': 'Preview', - - 'ssl.list.update.cert.enable.status.successfully': + 'page.ssl.notification.updateCertEnableStatusSuccessfully': 'Update certificate enable status successfully', - 'ssl.list.expiration.time': 'Expiration Time', - 'ssl.list.if.enable': 'If Enable', - 'ssl.list.update.time': 'Update Time', - 'ssl.list.operation': 'Operation', - 'ssl.list.edit': 'Edit', - 'ssl.list.delete': 'Delete', - 'ssl.list.cancel': 'Cancle', - 'ssl.list.confirm': 'Confirm', - 'ssl.list.period.of.validity': 'Period Of Validity', - 'ssl.list': 'Certificate List', - 'ssl.list.input': 'Please input', - 'ssl.list.create': 'Create', + 'page.ssl.list.expirationTime': 'Expiration Time', + 'page.ssl.list.ifEnable': 'If Enable', + 'page.ssl.list.periodOfValidity': 'Period Of Validity', + 'page.ssl.steps.stepTitle.completeCertInfo': 'Complete Certificate Information', }; diff --git a/src/pages/SSL/locales/zh-CN.ts b/src/pages/SSL/locales/zh-CN.ts index d9c1660091..232c80ac4c 100644 --- a/src/pages/SSL/locales/zh-CN.ts +++ b/src/pages/SSL/locales/zh-CN.ts @@ -15,40 +15,24 @@ * limitations under the License. */ export default { - 'ssl.form.expiration.time': '过期时间', - 'ssl.form.cert': '证书内容', - 'ssl.form.check.cert.value': '请检查 证书内容', - 'ssl.form.cert.value.length': '证书内容至少需要128个字符', - 'ssl.form.private.key': '私钥', - 'ssl.form.check.key.value': '请检查 私钥', - 'ssl.form.key.value.length': '私钥 至少需要128个字符', + 'page.ssl.form.itemLabel.expireTime': '过期时间', + 'page.ssl.form.itemLabel.cert': '证书内容', + 'page.ssl.form.itemRuleMessage.certValueLength': '证书内容至少需要128个字符', + 'page.ssl.form.itemLabel.privateKey': '私钥', + 'page.ssl.form.itemRuleMessage.privateKeyLength': '私钥 至少需要128个字符', 'page.ssl.textAreaPlaceholder.cert': '请填写SSL证书内容', - 'ssl.upload.cert': '上传证书', - 'ssl.upload.private.key': '上传私钥', + 'page.ssl.button.uploadCert': '上传证书', - 'ssl.step.way': '方式', - 'ssl.step.rules': '新证书所含 SNI 应与当前证书一致', - 'ssl.step.select.create.ways': '请选择创建方式', - 'ssl.step.input': '输入', - 'ssl.step.upload': '上传', + 'page.ssl.form.itemLabel.way': '方式', + 'page.ssl.form.itemExtraMessage.way': '新证书所含 SNI 应与当前证书一致', + 'page.ssl.select.placeholder.selectCreateWays': '请选择创建方式', + 'page.ssl.selectOption.input': '输入', + 'page.ssl.upload': '上传', - 'ssl.create.check': '请检查证书内容', - 'ssl.create': '证书创建', - 'ssl.create.complete.cert.info': '完善证书信息', - 'ssl.create.preview': '预览', - - 'ssl.list.update.cert.enable.status.successful': '更新证书启用状态成功', - 'ssl.list.expiration.time': '过期时间', - 'ssl.list.if.enable': '是否启用', - 'ssl.list.update.time': '更新时间', - 'ssl.list.operation': '操作', - 'ssl.list.edit': '编辑', - 'ssl.list.delete': '删除', - 'ssl.list.cancel': '取消', - 'ssl.list.confirm': '确定', - 'ssl.list.period.of.validity': '有效期', - 'ssl.list': '证书列表', - 'ssl.list.input': '请输入', - 'ssl.list.create': '创建', + 'page.ssl.notification.updateCertEnableStatusSuccessfully': '更新证书启用状态成功', + 'page.ssl.list.expirationTime': '过期时间', + 'page.ssl.list.ifEnable': '是否启用', + 'page.ssl.list.periodOfValidity': '有效期', + 'page.ssl.steps.stepTitle.completeCertInfo': '完善证书信息', };