Skip to content

Commit

Permalink
fix: protable search&reset button i18n (#1153)
Browse files Browse the repository at this point in the history
* fix: protable search&reset button i18n

* fix: markdown lint check error

* fix: update refer to code review

* fix: update refer to the code review

* fix: ssl

Co-authored-by: litesun <[email protected]>
Co-authored-by: 琚致远 <[email protected]>
  • Loading branch information
3 people authored Dec 30, 2020
1 parent 2d0fcd6 commit a343171
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/I18N_USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ the key can be like this : [basicModule].[moduleName].[elementName].[...desc]

## Global locale keys

we have already defined many global keys, before you do i18n, you can refer to [those](https://github.com/apache/apisix-dashboard/blob/master/src/locales/zh-CN/component.ts).
we have already defined many global keys, before you do i18n, you can refer to [those](https://github.com/apache/apisix-dashboard/blob/master/web/src/locales/zh-CN/component.ts).

## Recommended subkey naming

Expand Down
3 changes: 0 additions & 3 deletions web/src/pages/Consumer/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ import { history, useIntl } from 'umi';
import { PlusOutlined } from '@ant-design/icons';

import { timestampToLocaleString } from '@/helpers';
import useForceIntl from '@/hooks/useForceIntl';

import { fetchList, remove } from './service';

const Page: React.FC = () => {
useForceIntl();

const ref = useRef<ActionType>();
const { formatMessage } = useIntl();

Expand Down
3 changes: 0 additions & 3 deletions web/src/pages/Route/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ import { history, useIntl } from 'umi';
import { PlusOutlined, BugOutlined } from '@ant-design/icons';

import { timestampToLocaleString } from '@/helpers';
import useForceIntl from '@/hooks/useForceIntl';
import { fetchList, remove, fetchLabelList, updateRouteStatus } from './service';
import { DebugDrawView } from './components/DebugViews';

const { OptGroup, Option } = Select;

const Page: React.FC = () => {
useForceIntl();

const ref = useRef<ActionType>();
const { formatMessage } = useIntl();

Expand Down
2 changes: 0 additions & 2 deletions web/src/pages/SSL/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import { PlusOutlined } from '@ant-design/icons';

import { fetchList, remove as removeSSL } from '@/pages/SSL/service';
import { timestampToLocaleString } from '@/helpers';
import useForceIntl from '@/hooks/useForceIntl';

const Page: React.FC = () => {
useForceIntl();
const tableRef = useRef<ActionType>();
const { formatMessage } = useIntl();

Expand Down
8 changes: 4 additions & 4 deletions web/src/pages/Service/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
import { PlusOutlined } from '@ant-design/icons';
import { Button, notification, Popconfirm, Space } from 'antd';

import useForceIntl from '@/hooks/useForceIntl';

import { fetchList, remove } from './service';

const Page: React.FC = () => {
useForceIntl();

const ref = useRef<ActionType>();
const { formatMessage } = useIntl();

Expand Down Expand Up @@ -96,6 +92,10 @@ const Page: React.FC = () => {
rowKey="id"
columns={columns}
request={fetchList}
search={{
searchText: formatMessage({ id: 'component.global.search' }),
resetText: formatMessage({ id: 'component.global.reset' }),
}}
toolBarRender={() => [
<Button type="primary" onClick={() => history.push(`/service/create`)}>
<PlusOutlined />
Expand Down
3 changes: 0 additions & 3 deletions web/src/pages/Upstream/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ import { Popconfirm, Button, notification } from 'antd';
import { history, useIntl } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
import { timestampToLocaleString } from '@/helpers';
import useForceIntl from '@/hooks/useForceIntl';

import { fetchList, remove } from './service';

const Page: React.FC = () => {
useForceIntl();

const ref = useRef<ActionType>();

const { formatMessage } = useIntl();
Expand Down

0 comments on commit a343171

Please sign in to comment.