From c6f3e2c699d133f74e0f4ce0424c1fd4ad43dcbf Mon Sep 17 00:00:00 2001 From: tanghui Date: Thu, 20 Jan 2022 19:24:34 +0800 Subject: [PATCH] fix list --- docs/react/i18n.en-US.md | 23 +++++++++++++---------- docs/react/i18n.zh-CN.md | 27 +++++++++++++++++---------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/docs/react/i18n.en-US.md b/docs/react/i18n.en-US.md index 7b11916484dd..02d3947a944e 100644 --- a/docs/react/i18n.en-US.md +++ b/docs/react/i18n.en-US.md @@ -103,7 +103,7 @@ If your language is not in above list, feel free to create a locale package base Do it step by step: -1. Fork `antd` and git clone to local, switch to `feature` branch, pull it to make sure it's up-to-date, create a new branch based on `feature` branch, all work will be done in it. +1 - Fork `antd` and git clone to local, switch to `feature` branch, pull it to make sure it's up-to-date, create a new branch based on `feature` branch, all work will be done in it. ```bash git clone git@github.com:/ant-design.git @@ -112,17 +112,20 @@ git remote add upstream origin git@github.com:ant-design/ant-design.git git checkout -b ``` -2. Add the language support for [rc-picker](https://github.com/react-component/picker), for example [this](https://github.com/react-component/picker/blob/master/src/locale/en_US.ts). -3. Add the language support for [rc-pagination](https://github.com/react-component/pagination), for example [this](https://github.com/react-component/pagination/blob/master/src/locale/en_US.js). -4. Wait for `rc-picker` and `rc-pagination` to release the new version containing the above. -5. Update the `rc-picker` and `rc-pagination` versions in `antd` and add the remaining other necessary content for the language. for example [Azerbaijani PR](https://github.com/ant-design/ant-design/pull/21387). -6. Add a test case for the language in [components/locale-provider/\_\_tests\_\_/index.test.js](/components/locale-provider/__tests__/index.test.js). -7. update snapshots, you may also need to delete `node_modules`, lock files (`yarn.lock` or `package-lock.json`) and reinstall at first. +2 - Add the language support for [rc-picker](https://github.com/react-component/picker), for example [this](https://github.com/react-component/picker/blob/master/src/locale/en_US.ts). + +3 - Add the language support for [rc-pagination](https://github.com/react-component/pagination), for example [this](https://github.com/react-component/pagination/blob/master/src/locale/en_US.js). + +4 - Wait for `rc-picker` and `rc-pagination` to release the new version containing the above. + +5 - Update the `rc-picker` and `rc-pagination` versions in `antd` and add the remaining other necessary content for the language. for example [Azerbaijani PR](https://github.com/ant-design/ant-design/pull/21387). + +6 - Add a test case for the language in [components/locale-provider/\_\_tests\_\_/index.test.js](/components/locale-provider/__tests__/index.test.js). + +7 - update snapshots, you may also need to delete `node_modules`, lock files (`yarn.lock` or `package-lock.json`) and reinstall at first. ```bash npm run test -- components/locale-provider -u ``` -8. Add the language to i18n list [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md) and [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md). -9. Watch out the CI status, and if it failed, look at the logs and make some changes until it all passes. -10. Ok, now everything is ready for review. +8 - Add the language to i18n list [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md) and [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md). 9 - Watch out the CI status, and if it failed, look at the logs and make some changes until it all passes. 10 - Ok, now everything is ready for review. diff --git a/docs/react/i18n.zh-CN.md b/docs/react/i18n.zh-CN.md index e5e92e3e269a..a1c8d9251a83 100644 --- a/docs/react/i18n.zh-CN.md +++ b/docs/react/i18n.zh-CN.md @@ -100,7 +100,7 @@ return ( 基本步骤如下: -1. Fork `antd` 并 git clone 到本地,切换到 `feature` 分支,执行一次拉取确保最新,基于 `feature` 分支切换一个新分支,以下工作将在新分支完成。 +1 - Fork `antd` 并 git clone 到本地,切换到 `feature` 分支,执行一次拉取确保最新,基于 `feature` 分支切换一个新分支,以下工作将在新分支完成。 ```bash git clone git@github.com:/ant-design.git @@ -109,20 +109,27 @@ git remote add upstream origin git@github.com:ant-design/ant-design.git git checkout -b ``` -2. 为 [rc-picker](https://github.com/react-component/picker) 添加对应语言,参考 [这个](https://github.com/react-component/picker/blob/master/src/locale/en_US.ts)。 -3. 为 [rc-pagination](https://github.com/react-component/pagination) 添加对应语言,参考 [这个](https://github.com/react-component/pagination/blob/master/src/locale/en_US.js)。 -4. 等待 `rc-picker` 和 `rc-pagination` 发布含上述内容的最低版本。 -5. 参考 [阿塞拜疆语的 PR](https://github.com/ant-design/ant-design/pull/21387) 向 `antd` 发起 PR,完善对应语言的其他内容和更新 `rc-picker` 和 `rc-pagination` 版本。 -6. 在 [components/locale-provider/\_\_tests\_\_/index.test.js](/components/locale-provider/__tests__/index.test.js) 添加该语言的测试用例。 -7. 更新 snapshot,在这之前或许你还需要先删除 `node_modules` 和 lock 文件 (`yarn.lock` or `package-lock.json`) 并全新安装。 +2 - 为 [rc-picker](https://github.com/react-component/picker) 添加对应语言,参考 [这个](https://github.com/react-component/picker/blob/master/src/locale/en_US.ts)。 + +3 - 为 [rc-pagination](https://github.com/react-component/pagination) 添加对应语言,参考 [这个](https://github.com/react-component/pagination/blob/master/src/locale/en_US.js)。 + +4 - 等待 `rc-picker` 和 `rc-pagination` 发布含上述内容的最低版本。 + +5 - 参考 [阿塞拜疆语的 PR](https://github.com/ant-design/ant-design/pull/21387) 向 `antd` 发起 PR,完善对应语言的其他内容和更新 `rc-picker` 和 `rc-pagination` 版本。 + +6 - 在 [components/locale-provider/\_\_tests\_\_/index.test.js](/components/locale-provider/__tests__/index.test.js) 添加该语言的测试用例。 + +7 - 更新 snapshot,在这之前或许你还需要先删除 `node_modules` 和 lock 文件 (`yarn.lock` or `package-lock.json`) 并全新安装。 ```bash npm run test -- components/locale-provider -u ``` -8. 更新 [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md) 和 [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md),将对应语言添加到文档列表。 -9. 观察 CI 是否通过,若未通过,根据日志进行修改直至通过。 -10. 万事俱备等待 review 。 +8 - 更新 [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md) 和 [docs/react/i18n.zh-CN.md](/docs/react/i18n.zh-CN.md),将对应语言添加到文档列表。 + +9 - 观察 CI 是否通过,若未通过,根据日志进行修改直至通过。 + +10 - 万事俱备等待 review 。 ## i18n 项目示例