Skip to content

Commit e5366bd

Browse files
author
谢栋祥
committed
docs: update code examples in English, internationally friendly.
Signed-off-by: 谢栋祥 <[email protected]>
1 parent 1f3428d commit e5366bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+808
-806
lines changed

packages/card/src/components/StatisticCard/demos/basic.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default () => {
1010
<StatisticCard
1111
title={
1212
<Space>
13-
<span>部门一</span>
13+
<span>Department One</span>
1414
<RightOutlined style={{ color: token.colorTextHeading }} />
1515
</Space>
1616
}
@@ -20,8 +20,8 @@ export default () => {
2020
prefix: '¥',
2121
description: (
2222
<Space>
23-
<Statistic title="实际完成度" value="82.3%" />
24-
<Statistic title="当前目标" value="¥6000" />
23+
<Statistic title="Actual Completion" value="82.3%" />
24+
<Statistic title="Current Target" value="¥6000" />
2525
</Space>
2626
),
2727
}}

packages/card/src/components/StatisticCard/demos/chart.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { StatisticCard } from '@ant-design/pro-components';
44
export default () => {
55
return (
66
<StatisticCard
7-
title="大盘趋势"
8-
tooltip="大盘说明"
7+
title="Market Trend"
8+
tooltip="Market Description"
99
style={{ maxWidth: 480 }}
1010
extra={<EllipsisOutlined />}
1111
chart={
1212
<img
1313
src="https://gw.alipayobjects.com/zos/alicdn/a-LN9RTYq/zhuzhuangtu.svg"
14-
alt="柱状图"
14+
alt="Bar Chart"
1515
width="100%"
1616
/>
1717
}

packages/card/src/components/StatisticCard/demos/fomula.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ export default () => {
77
<StatisticCard.Group>
88
<StatisticCard
99
statistic={{
10-
title: '服务网格数',
10+
title: 'Service Mesh Count',
1111
value: 500,
1212
}}
1313
/>
1414
<Operation>=</Operation>
1515
<StatisticCard
1616
statistic={{
17-
title: '未发布',
17+
title: 'Unpublished',
1818
value: 234,
1919
}}
2020
/>
2121
<Operation>+</Operation>
2222
<StatisticCard
2323
statistic={{
24-
title: '发布中',
24+
title: 'Publishing',
2525
value: 112,
2626
}}
2727
/>
2828
<Operation>+</Operation>
2929
<StatisticCard
3030
statistic={{
31-
title: '已发布',
31+
title: 'Published',
3232
value: 255,
3333
}}
3434
/>

packages/card/src/components/StatisticCard/demos/group-chart.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,44 @@ export default () => {
1717
<StatisticCard.Group direction={responsive ? 'column' : 'row'}>
1818
<StatisticCard
1919
statistic={{
20-
title: '冻结金额',
20+
title: 'Frozen Amount',
2121
value: 20190102,
2222
precision: 2,
23-
suffix: '',
23+
suffix: 'Yuan',
2424
}}
2525
chart={
2626
<img
2727
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
28-
alt="直方图"
28+
alt="Histogram"
2929
width="100%"
3030
/>
3131
}
3232
/>
3333
<Divider type={responsive ? 'horizontal' : 'vertical'} />
3434
<StatisticCard
3535
statistic={{
36-
title: '设计资源数',
36+
title: 'Design Resources',
3737
value: 234,
3838
}}
3939
chart={
4040
<img
4141
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
42-
alt="直方图"
42+
alt="Histogram"
4343
width="100%"
4444
/>
4545
}
4646
/>
4747
<Divider type={responsive ? 'horizontal' : 'vertical'} />
4848
<StatisticCard
4949
statistic={{
50-
title: '信息完成度',
50+
title: 'Information Completeness',
5151
value: 5,
5252
suffix: '/ 100',
5353
}}
5454
chart={
5555
<img
5656
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
57-
alt="直方图"
57+
alt="Histogram"
5858
width="100%"
5959
/>
6060
}

packages/card/src/components/StatisticCard/demos/group.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,40 @@ export default () => {
1515
}}
1616
>
1717
<StatisticCard.Group
18-
title="核心指标"
18+
title="Core Metrics"
1919
direction={responsive ? 'column' : 'row'}
2020
>
2121
<StatisticCard
2222
statistic={{
23-
title: '今日UV',
24-
tip: '供应商信息',
23+
title: 'Today\'s UV',
24+
tip: 'Supplier Information',
2525
value: 79,
2626
precision: 2,
2727
}}
2828
/>
2929
<Divider type={responsive ? 'horizontal' : 'vertical'} />
3030
<StatisticCard
3131
statistic={{
32-
title: '冻结金额',
32+
title: 'Frozen Amount',
3333
value: 112893,
3434
precision: 2,
35-
suffix: '',
35+
suffix: 'Yuan',
3636
}}
3737
/>
3838
<Divider type={responsive ? 'horizontal' : 'vertical'} />
3939
<StatisticCard
4040
statistic={{
41-
title: '信息完整度',
41+
title: 'Information Completeness',
4242
value: 92,
4343
suffix: '/ 100',
4444
}}
4545
/>
4646
<StatisticCard
4747
statistic={{
48-
title: '冻结金额',
48+
title: 'Frozen Amount',
4949
value: 112893,
5050
precision: 2,
51-
suffix: '',
51+
suffix: 'Yuan',
5252
}}
5353
/>
5454
</StatisticCard.Group>

packages/card/src/components/StatisticCard/demos/horizontal-left.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ export default () => {
77
<StatisticCard
88
chartPlacement="left"
99
statistic={{
10-
title: '冻结金额',
10+
title: 'Frozen Amount',
1111
value: 112893,
1212
precision: 2,
13-
suffix: '',
13+
suffix: 'Yuan',
1414
description: (
1515
<>
16-
<Statistic title="周同比" value="6.47%" trend="up" />
17-
<Statistic title="月同比" value="6.47%" trend="down" />
16+
<Statistic title="Weekly Comparison" value="6.47%" trend="up" />
17+
<Statistic title="Monthly Comparison" value="6.47%" trend="down" />
1818
</>
1919
),
2020
}}
2121
style={{ maxWidth: 584 }}
2222
chart={
2323
<img
2424
src="https://gw.alipayobjects.com/zos/alicdn/snEBTn9ax/zhexiantuchang.svg"
25-
alt="折线图"
25+
alt="Line Chart"
2626
width="100%"
2727
/>
2828
}

packages/card/src/components/StatisticCard/demos/horizontal.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ export default () => {
77
<StatisticCard
88
chartPlacement="right"
99
statistic={{
10-
title: '冻结金额',
10+
title: 'Frozen Amount',
1111
value: 112893,
1212
precision: 2,
13-
suffix: '',
13+
suffix: 'Yuan',
1414
description: (
1515
<>
16-
<Statistic title="周同比" value="6.47%" trend="up" />
17-
<Statistic title="月同比" value="6.47%" trend="down" />
16+
<Statistic title="Weekly Comparison" value="6.47%" trend="up" />
17+
<Statistic title="Monthly Comparison" value="6.47%" trend="down" />
1818
</>
1919
),
2020
}}
2121
style={{ width: 584 }}
2222
chart={
2323
<img
2424
src="https://gw.alipayobjects.com/zos/alicdn/snEBTn9ax/zhexiantuchang.svg"
25-
alt="折线图"
25+
alt="Line Chart"
2626
width="100%"
2727
/>
2828
}

packages/card/src/components/StatisticCard/demos/icon.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default () => {
2121
<StatisticCard.Group direction={responsive ? 'column' : 'row'}>
2222
<StatisticCard
2323
statistic={{
24-
title: '支付金额',
24+
title: 'Payment Amount',
2525
value: 2176,
2626
icon: (
2727
<img
@@ -34,7 +34,7 @@ export default () => {
3434
/>
3535
<StatisticCard
3636
statistic={{
37-
title: '访客数',
37+
title: 'Number of Visitors',
3838
value: 475,
3939
icon: (
4040
<img
@@ -47,7 +47,7 @@ export default () => {
4747
/>
4848
<StatisticCard
4949
statistic={{
50-
title: '成功订单数',
50+
title: 'Number of Successful Orders',
5151
value: 87,
5252
icon: (
5353
<img
@@ -60,7 +60,7 @@ export default () => {
6060
/>
6161
<StatisticCard
6262
statistic={{
63-
title: '浏览量',
63+
title: 'Page Views',
6464
value: 1754,
6565
icon: (
6666
<img

packages/card/src/components/StatisticCard/demos/layout.tsx

+14-13
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default () => {
1515
}}
1616
>
1717
<ProCard
18-
title="数据概览"
19-
extra="2019年9月28日 星期五"
18+
title="Data Overview"
19+
extra="Friday, September 28, 2019"
2020
split={responsive ? 'horizontal' : 'vertical'}
2121
headerBordered
2222
bordered
@@ -26,11 +26,11 @@ export default () => {
2626
<ProCard split="vertical">
2727
<StatisticCard
2828
statistic={{
29-
title: '昨日全部流量',
29+
title: 'Total Traffic Yesterday',
3030
value: 234,
3131
description: (
3232
<Statistic
33-
title="较本月平均流量"
33+
title="Compared to Monthly Average Traffic"
3434
value="8.04%"
3535
trend="down"
3636
/>
@@ -39,47 +39,48 @@ export default () => {
3939
/>
4040
<StatisticCard
4141
statistic={{
42-
title: '本月累计流量',
42+
title: 'Total Traffic This Month',
4343
value: 234,
4444
description: (
45-
<Statistic title="月同比" value="8.04%" trend="up" />
45+
<Statistic title="Month-on-Month" value="8.04%" trend="up" />
4646
),
4747
}}
4848
/>
4949
</ProCard>
5050
<ProCard split="vertical">
5151
<StatisticCard
5252
statistic={{
53-
title: '运行中实验',
53+
title: 'Ongoing Experiments',
5454
value: '12/56',
55-
suffix: '',
55+
suffix: 'items',
5656
}}
5757
/>
5858
<StatisticCard
5959
statistic={{
60-
title: '历史实验总数',
60+
title: 'Total Historical Experiments',
6161
value: '134',
62-
suffix: '',
62+
suffix: 'items',
6363
}}
6464
/>
6565
</ProCard>
6666
</ProCard>
6767
<StatisticCard
68-
title="流量走势"
68+
title="Traffic Trends"
6969
chart={
7070
<img
7171
src="https://gw.alipayobjects.com/zos/alicdn/_dZIob2NB/zhuzhuangtu.svg"
7272
width="100%"
73+
alt="Bar Chart"
7374
/>
7475
}
7576
/>
7677
</ProCard>
7778
<StatisticCard
78-
title="流量占用情况"
79+
title="Traffic Usage"
7980
chart={
8081
<img
8182
src="https://gw.alipayobjects.com/zos/alicdn/qoYmFMxWY/jieping2021-03-29%252520xiawu4.32.34.png"
82-
alt="大盘"
83+
alt="Dashboard"
8384
width="100%"
8485
/>
8586
}

packages/card/src/components/StatisticCard/demos/status.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@ export default () => {
77
<StatisticCard.Group>
88
<StatisticCard
99
statistic={{
10-
title: '全部',
11-
tip: '帮助文字',
10+
title: 'All',
11+
tip: 'Help text',
1212
value: 10,
1313
}}
1414
/>
1515
<Divider />
1616
<StatisticCard
1717
statistic={{
18-
title: '未发布',
18+
title: 'Unpublished',
1919
value: 5,
2020
status: 'default',
2121
}}
2222
/>
2323
<StatisticCard
2424
statistic={{
25-
title: '发布中',
25+
title: 'Publishing',
2626
value: 3,
2727
status: 'processing',
2828
}}
2929
/>
3030
<StatisticCard
3131
statistic={{
32-
title: '发布异常',
32+
title: 'Publishing Error',
3333
value: 2,
3434
status: 'error',
3535
}}
3636
/>
3737
<StatisticCard
3838
statistic={{
39-
title: '发布成功',
39+
title: 'Published Successfully',
4040
value: '-',
4141
status: 'success',
4242
}}

0 commit comments

Comments
 (0)