Skip to content

Commit

Permalink
fix: Incomplete i18n coverage (#1538)
Browse files Browse the repository at this point in the history
Co-authored-by: litesun <[email protected]>
Co-authored-by: nic-chen <[email protected]>
  • Loading branch information
3 people authored Mar 16, 2021
1 parent 40d1dab commit e95a189
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 141 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"dependencies": {
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.0.0",
"@ant-design/pro-table": "2.6.3",
"@ant-design/pro-table": "2.30.1",
"@api7-dashboard/ui": "^1.0.3",
"@mrblenny/react-flow-chart": "^0.0.14",
"@rjsf/antd": "2.2.0",
Expand Down
8 changes: 6 additions & 2 deletions web/src/pages/Route/components/Step3/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import React, { useState } from 'react';
import { Radio, Tooltip } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
import { isChrome } from 'react-device-detect';
import { useIntl } from 'umi';

import PluginOrchestration from '@/components/PluginOrchestration';
import PluginPage from '@/components/Plugin';
Expand All @@ -36,6 +37,7 @@ type Props = {
type Mode = 'NORMAL' | 'DRAW';

const Page: React.FC<Props> = ({ data, onChange, readonly = false, isForceHttps }) => {
const { formatMessage } = useIntl();
const { plugins = {}, script = {}, plugin_config_id = '' } = data;

// NOTE: Currently only compatible with chrome
Expand All @@ -55,9 +57,11 @@ const Page: React.FC<Props> = ({ data, onChange, readonly = false, isForceHttps
}}
style={{ marginBottom: 10 }}
>
<Radio.Button value="NORMAL">普通模式</Radio.Button>
<Radio.Button value="NORMAL">
{ formatMessage({ id: 'page.route.tabs.normalMode' }) }
</Radio.Button>
<Radio.Button value="DRAW" disabled={disableDraw}>
插件编排
{ formatMessage({ id: 'page.route.tabs.orchestration' }) }
</Radio.Button>
</Radio.Group>
{Boolean(disableDraw) && (
Expand Down
5 changes: 4 additions & 1 deletion web/src/pages/Route/locales/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,8 @@ export default {
'page.route.exportRoutesTips': 'Please choose the type of file you want to export',
'page.route.button.importOpenApi': 'Import OpenAPI',
'page.route.button.selectFile': 'Please Select File',
'page.route.list': 'Route List'
'page.route.list': 'Route List',

'page.route.tabs.normalMode': 'Normal mode',
'page.route.tabs.orchestration': 'Plugin orchestration'
};
5 changes: 4 additions & 1 deletion web/src/pages/Route/locales/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,8 @@ export default {
'page.route.exportRoutesTips': '请选择导出文件的类型',
'page.route.button.importOpenApi': '导入 OpenAPI',
'page.route.button.selectFile': '请选择上传文件',
'page.route.list': '路由列表'
'page.route.list': '路由列表',

'page.route.tabs.normalMode': '普通模式',
'page.route.tabs.orchestration': '插件编排'
};
Loading

0 comments on commit e95a189

Please sign in to comment.