- Username
+ {i18n._('Username')}
:guest
- Password
+ {i18n._('Password')}
:guest
diff --git a/src/pages/post/components/List.js b/src/pages/post/components/List.js
index cde1d4a..99411d1 100644
--- a/src/pages/post/components/List.js
+++ b/src/pages/post/components/List.js
@@ -1,6 +1,6 @@
import React, { PureComponent } from 'react'
import { Table, Avatar } from 'antd'
-import { t } from "@lingui/macro"
+import { i18n } from '@lingui/core'
import { Ellipsis } from 'components'
import styles from './List.less'
@@ -9,12 +9,12 @@ class List extends PureComponent {
const { ...tableProps } = this.props
const columns = [
{
- title: t`Image`,
+ title: i18n._('Image'),
dataIndex: 'image',
render: text => ,
},
{
- title: t`Title`,
+ title: i18n._('Title'),
dataIndex: 'title',
render: text => (
@@ -23,31 +23,31 @@ class List extends PureComponent {
),
},
{
- title: t`Author`,
+ title: i18n._('Author'),
dataIndex: 'author',
},
{
- title: t`Categories`,
+ title: i18n._('Categories'),
dataIndex: 'categories',
},
{
- title: t`Tags`,
+ title: i18n._('Tags'),
dataIndex: 'tags',
},
{
- title: t`Visibility`,
+ title: i18n._('Visibility'),
dataIndex: 'visibility',
},
{
- title: t`Comments`,
+ title: i18n._('Comments'),
dataIndex: 'comments',
},
{
- title: t`Views`,
+ title: i18n._('Views'),
dataIndex: 'views',
},
{
- title: t`Publish Date`,
+ title: i18n._('Publish Date'),
dataIndex: 'date',
},
]
@@ -57,7 +57,7 @@ class List extends PureComponent {
{...tableProps}
pagination={{
...tableProps.pagination,
- showTotal: total => t`Total ${total} Items`,
+ showTotal: total => i18n._('Total {total} Items', { total }),
}}
bordered
scroll={{ x: 1200 }}
diff --git a/src/pages/post/index.js b/src/pages/post/index.js
index 28c297c..b192ccf 100644
--- a/src/pages/post/index.js
+++ b/src/pages/post/index.js
@@ -4,7 +4,7 @@ import { connect } from 'umi'
import { Tabs } from 'antd'
import { history } from 'umi'
import { stringify } from 'qs'
-import { t } from "@lingui/macro"
+import { i18n } from '@lingui/core'
import { Page } from 'components'
import List from './components/List'
@@ -66,12 +66,12 @@ class Post extends PureComponent {
items={[
{
key: String(EnumPostStatus.PUBLISHED),
- label: t`Publised`,
+ label: i18n._('Publised'),
children:
,
},
{
key: String(EnumPostStatus.UNPUBLISH),
- label: t`Unpublished`,
+ label: i18n._('Unpublished'),
children:
,
},
]}
diff --git a/src/pages/request/index.js b/src/pages/request/index.js
index 4067926..253c90b 100644
--- a/src/pages/request/index.js
+++ b/src/pages/request/index.js
@@ -4,7 +4,7 @@ import { apiPrefix } from 'utils/config'
import { Row, Col, Select, Form, Input, Button, List, Tag, Checkbox } from 'antd'
import classnames from 'classnames'
import { CloseOutlined } from '@ant-design/icons'
-import { Trans } from "@lingui/macro"
+import { i18n } from '@lingui/core'
import api from '@/services/api'
import { Page } from 'components'
@@ -189,7 +189,7 @@ class RequestPage extends React.Component {
onClick={this.handleVisible}
size="large"
>
- Params
+ {i18n._('Params')}
@@ -199,7 +199,7 @@ class RequestPage extends React.Component {
style={{ width: 100 }}
onClick={this.handleRequest}
>
- Send
+ {i18n._('Send')}