forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]:<your organization>/ant-design.git | ||
|
@@ -112,17 +112,20 @@ git remote add upstream origin [email protected]: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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ return ( | |
|
||
基本步骤如下: | ||
|
||
1. Fork `antd` 并 git clone 到本地,切换到 `feature` 分支,执行一次拉取确保最新,基于 `feature` 分支切换一个新分支,以下工作将在新分支完成。 | ||
1 - Fork `antd` 并 git clone 到本地,切换到 `feature` 分支,执行一次拉取确保最新,基于 `feature` 分支切换一个新分支,以下工作将在新分支完成。 | ||
|
||
```bash | ||
git clone [email protected]:<your organization>/ant-design.git | ||
|
@@ -109,20 +109,27 @@ git remote add upstream origin [email protected]: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 项目示例 | ||
|
||
|