From 4ca52a1910ee658869cbf6ddba239ed5d8959615 Mon Sep 17 00:00:00 2001 From: Cemre Mengu Date: Mon, 9 Apr 2018 06:02:29 +0300 Subject: [PATCH] Added en translation number info (#1211) * Added translation * Changed file name * Fix titles * lowercase description * Updated based on comments --- src/components/NumberInfo/demo/basic.md | 12 ++++++++++-- src/components/NumberInfo/index.en-US.md | 19 +++++++++++++++++++ .../NumberInfo/{index.md => index.zh-CN.md} | 6 ++---- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 src/components/NumberInfo/index.en-US.md rename src/components/NumberInfo/{index.md => index.zh-CN.md} (79%) diff --git a/src/components/NumberInfo/demo/basic.md b/src/components/NumberInfo/demo/basic.md index a8ce97ac..b399655e 100644 --- a/src/components/NumberInfo/demo/basic.md +++ b/src/components/NumberInfo/demo/basic.md @@ -1,10 +1,18 @@ --- order: 0 -title: 演示 +title: + zh-CN: 演示 + en-US: Demo --- +## zh-CN + 各种数据文案的展现方式。 +## en-US + +Used for presenting various numerical data. + ````jsx import NumberInfo from 'ant-design-pro/lib/NumberInfo'; import numeral from 'numeral'; @@ -12,7 +20,7 @@ import numeral from 'numeral'; ReactDOM.render(
本周访问} + subTitle={Visits this week} total={numeral(12321).format('0,0')} status="up" subTotal={17.1} diff --git a/src/components/NumberInfo/index.en-US.md b/src/components/NumberInfo/index.en-US.md new file mode 100644 index 00000000..b82afbe4 --- /dev/null +++ b/src/components/NumberInfo/index.en-US.md @@ -0,0 +1,19 @@ +--- +title: NumberInfo +cols: 1 +order: 10 +--- + +Often used in data cards for highlighting the business data. + +## API + +Property | Description | Type | Default +----|------|-----|------ +title | title | ReactNode\|string | - +subTitle | subtitle | ReactNode\|string | - +total | total amount | ReactNode\|string | - +subTotal | total amount of additional information | ReactNode\|string | - +status | increase state | 'up \| down' | - +theme | state style | string | 'light' +gap | set the spacing (pixels) between numbers and descriptions | number | 8 diff --git a/src/components/NumberInfo/index.md b/src/components/NumberInfo/index.zh-CN.md similarity index 79% rename from src/components/NumberInfo/index.md rename to src/components/NumberInfo/index.zh-CN.md index 1116f990..71985394 100644 --- a/src/components/NumberInfo/index.md +++ b/src/components/NumberInfo/index.zh-CN.md @@ -1,7 +1,5 @@ --- -title: - en-US: NumberInfo - zh-CN: NumberInfo +title: NumberInfo subtitle: 数据文本 cols: 1 order: 10 @@ -19,4 +17,4 @@ total | 总量 | ReactNode\|string | - subTotal | 子总量 | ReactNode\|string | - status | 增加状态 | 'up \| down' | - theme | 状态样式 | string | 'light' -gap | 设置数字和描述直接的间距(像素) | number | 8 +gap | 设置数字和描述之间的间距(像素)| number | 8 -- GitLab