Sfoglia il codice sorgente

Added en translation number info (#1211)

* Added translation

* Changed file name

* Fix titles

* lowercase description

* Updated based on comments
Cemre Mengu 7 anni fa
parent
commit
4ca52a1910

+ 10 - 2
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(
   <div>
     <NumberInfo
-      subTitle={<span>本周访问</span>}
+      subTitle={<span>Visits this week</span>}
       total={numeral(12321).format('0,0')}
       status="up"
       subTotal={17.1}

+ 19 - 0
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

+ 2 - 4
src/components/NumberInfo/index.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