Skip to content

Commit

Permalink
fix list
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo837 committed Jan 20, 2022
1 parent 5ab303d commit c6f3e2c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
23 changes: 13 additions & 10 deletions docs/react/i18n.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<your organization>/ant-design.git
Expand All @@ -112,17 +112,20 @@ git remote add upstream origin git@github.com:ant-design/ant-design.git
git checkout -b <your new branch name>
```

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.
27 changes: 17 additions & 10 deletions docs/react/i18n.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<your organization>/ant-design.git
Expand All @@ -109,20 +109,27 @@ git remote add upstream origin git@github.com:ant-design/ant-design.git
git checkout -b <your new branch name>
```

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 项目示例

Expand Down

0 comments on commit c6f3e2c

Please sign in to comment.