Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update code examples in English, internationally friendly. #8998

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/card/src/components/StatisticCard/demos/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default () => {
<StatisticCard
title={
<Space>
<span>部门一</span>
<span>Department One</span>
<RightOutlined style={{ color: token.colorTextHeading }} />
</Space>
}
Expand All @@ -20,8 +20,8 @@ export default () => {
prefix: '¥',
description: (
<Space>
<Statistic title="实际完成度" value="82.3%" />
<Statistic title="当前目标" value="¥6000" />
<Statistic title="Actual Completion" value="82.3%" />
<Statistic title="Current Target" value="¥6000" />
</Space>
),
}}
Expand Down
6 changes: 3 additions & 3 deletions packages/card/src/components/StatisticCard/demos/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { StatisticCard } from '@ant-design/pro-components';
export default () => {
return (
<StatisticCard
title="大盘趋势"
tooltip="大盘说明"
title="Market Trend"
tooltip="Market Description"
style={{ maxWidth: 480 }}
extra={<EllipsisOutlined />}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/a-LN9RTYq/zhuzhuangtu.svg"
alt="柱状图"
alt="Bar Chart"
width="100%"
/>
}
Expand Down
8 changes: 4 additions & 4 deletions packages/card/src/components/StatisticCard/demos/fomula.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ export default () => {
<StatisticCard.Group>
<StatisticCard
statistic={{
title: '服务网格数',
title: 'Service Mesh Count',
value: 500,
}}
/>
<Operation>=</Operation>
<StatisticCard
statistic={{
title: '未发布',
title: 'Unpublished',
value: 234,
}}
/>
<Operation>+</Operation>
<StatisticCard
statistic={{
title: '发布中',
title: 'Publishing',
value: 112,
}}
/>
<Operation>+</Operation>
<StatisticCard
statistic={{
title: '已发布',
title: 'Published',
value: 255,
}}
/>
Expand Down
14 changes: 7 additions & 7 deletions packages/card/src/components/StatisticCard/demos/group-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ export default () => {
<StatisticCard.Group direction={responsive ? 'column' : 'row'}>
<StatisticCard
statistic={{
title: '冻结金额',
title: 'Frozen Amount',
value: 20190102,
precision: 2,
suffix: '',
suffix: 'Yuan',
}}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
alt="直方图"
alt="Histogram"
width="100%"
/>
}
/>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<StatisticCard
statistic={{
title: '设计资源数',
title: 'Design Resources',
value: 234,
}}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
alt="直方图"
alt="Histogram"
width="100%"
/>
}
/>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<StatisticCard
statistic={{
title: '信息完成度',
title: 'Information Completeness',
value: 5,
suffix: '/ 100',
}}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/RLeBTRNWv/bianzu%25252043x.png"
alt="直方图"
alt="Histogram"
width="100%"
/>
}
Expand Down
16 changes: 8 additions & 8 deletions packages/card/src/components/StatisticCard/demos/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,40 @@ export default () => {
}}
>
<StatisticCard.Group
title="核心指标"
title="Core Metrics"
direction={responsive ? 'column' : 'row'}
>
<StatisticCard
statistic={{
title: '今日UV',
tip: '供应商信息',
title: 'Today\'s UV',
tip: 'Supplier Information',
value: 79,
precision: 2,
}}
/>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<StatisticCard
statistic={{
title: '冻结金额',
title: 'Frozen Amount',
value: 112893,
precision: 2,
suffix: '',
suffix: 'Yuan',
}}
/>
<Divider type={responsive ? 'horizontal' : 'vertical'} />
<StatisticCard
statistic={{
title: '信息完整度',
title: 'Information Completeness',
value: 92,
suffix: '/ 100',
}}
/>
<StatisticCard
statistic={{
title: '冻结金额',
title: 'Frozen Amount',
value: 112893,
precision: 2,
suffix: '',
suffix: 'Yuan',
}}
/>
</StatisticCard.Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ export default () => {
<StatisticCard
chartPlacement="left"
statistic={{
title: '冻结金额',
title: 'Frozen Amount',
value: 112893,
precision: 2,
suffix: '',
suffix: 'Yuan',
description: (
<>
<Statistic title="周同比" value="6.47%" trend="up" />
<Statistic title="月同比" value="6.47%" trend="down" />
<Statistic title="Weekly Comparison" value="6.47%" trend="up" />
<Statistic title="Monthly Comparison" value="6.47%" trend="down" />
</>
),
}}
style={{ maxWidth: 584 }}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/snEBTn9ax/zhexiantuchang.svg"
alt="折线图"
alt="Line Chart"
width="100%"
/>
}
Expand Down
10 changes: 5 additions & 5 deletions packages/card/src/components/StatisticCard/demos/horizontal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ export default () => {
<StatisticCard
chartPlacement="right"
statistic={{
title: '冻结金额',
title: 'Frozen Amount',
value: 112893,
precision: 2,
suffix: '',
suffix: 'Yuan',
description: (
<>
<Statistic title="周同比" value="6.47%" trend="up" />
<Statistic title="月同比" value="6.47%" trend="down" />
<Statistic title="Weekly Comparison" value="6.47%" trend="up" />
<Statistic title="Monthly Comparison" value="6.47%" trend="down" />
</>
),
}}
style={{ width: 584 }}
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/snEBTn9ax/zhexiantuchang.svg"
alt="折线图"
alt="Line Chart"
width="100%"
/>
}
Expand Down
8 changes: 4 additions & 4 deletions packages/card/src/components/StatisticCard/demos/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default () => {
<StatisticCard.Group direction={responsive ? 'column' : 'row'}>
<StatisticCard
statistic={{
title: '支付金额',
title: 'Payment Amount',
value: 2176,
icon: (
<img
Expand All @@ -34,7 +34,7 @@ export default () => {
/>
<StatisticCard
statistic={{
title: '访客数',
title: 'Number of Visitors',
value: 475,
icon: (
<img
Expand All @@ -47,7 +47,7 @@ export default () => {
/>
<StatisticCard
statistic={{
title: '成功订单数',
title: 'Number of Successful Orders',
value: 87,
icon: (
<img
Expand All @@ -60,7 +60,7 @@ export default () => {
/>
<StatisticCard
statistic={{
title: '浏览量',
title: 'Page Views',
value: 1754,
icon: (
<img
Expand Down
27 changes: 14 additions & 13 deletions packages/card/src/components/StatisticCard/demos/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default () => {
}}
>
<ProCard
title="数据概览"
extra="2019年9月28日 星期五"
title="Data Overview"
extra="Friday, September 28, 2019"
split={responsive ? 'horizontal' : 'vertical'}
headerBordered
bordered
Expand All @@ -26,11 +26,11 @@ export default () => {
<ProCard split="vertical">
<StatisticCard
statistic={{
title: '昨日全部流量',
title: 'Total Traffic Yesterday',
value: 234,
description: (
<Statistic
title="较本月平均流量"
title="Compared to Monthly Average Traffic"
value="8.04%"
trend="down"
/>
Expand All @@ -39,47 +39,48 @@ export default () => {
/>
<StatisticCard
statistic={{
title: '本月累计流量',
title: 'Total Traffic This Month',
value: 234,
description: (
<Statistic title="月同比" value="8.04%" trend="up" />
<Statistic title="Month-on-Month" value="8.04%" trend="up" />
),
}}
/>
</ProCard>
<ProCard split="vertical">
<StatisticCard
statistic={{
title: '运行中实验',
title: 'Ongoing Experiments',
value: '12/56',
suffix: '',
suffix: 'items',
}}
/>
<StatisticCard
statistic={{
title: '历史实验总数',
title: 'Total Historical Experiments',
value: '134',
suffix: '',
suffix: 'items',
}}
/>
</ProCard>
</ProCard>
<StatisticCard
title="流量走势"
title="Traffic Trends"
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/_dZIob2NB/zhuzhuangtu.svg"
width="100%"
alt="Bar Chart"
/>
}
/>
</ProCard>
<StatisticCard
title="流量占用情况"
title="Traffic Usage"
chart={
<img
src="https://gw.alipayobjects.com/zos/alicdn/qoYmFMxWY/jieping2021-03-29%252520xiawu4.32.34.png"
alt="大盘"
alt="Dashboard"
width="100%"
/>
}
Expand Down
12 changes: 6 additions & 6 deletions packages/card/src/components/StatisticCard/demos/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ export default () => {
<StatisticCard.Group>
<StatisticCard
statistic={{
title: '全部',
tip: '帮助文字',
title: 'All',
tip: 'Help text',
value: 10,
}}
/>
<Divider />
<StatisticCard
statistic={{
title: '未发布',
title: 'Unpublished',
value: 5,
status: 'default',
}}
/>
<StatisticCard
statistic={{
title: '发布中',
title: 'Publishing',
value: 3,
status: 'processing',
}}
/>
<StatisticCard
statistic={{
title: '发布异常',
title: 'Publishing Error',
value: 2,
status: 'error',
}}
/>
<StatisticCard
statistic={{
title: '发布成功',
title: 'Published Successfully',
value: '-',
status: 'success',
}}
Expand Down
Loading