Skip to content

Commit

Permalink
Update contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang authored Aug 27, 2023
1 parent 31d6cfd commit 80bcc6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Currently, all the docs can be found in `packages/docs`. It contains the English

Besides that, the `.vitepress` sub-folder is used to put the config and theme, including the i18n information.

Contributing to the English docs is the same as contributing to the source code. You can simply create a pull request to our GitHub repo. However, if you would like to contribute to the translations, there are 2 options and some some extra steps to follow:
Contributing to the English docs is the same as contributing to the source code. You can simply create a pull request to our GitHub repo. However, if you would like to contribute to the translations, there are 2 options and some extra steps to follow:

### Translate in a `<lang>` sub-folder and host it on our official repo

Expand All @@ -127,17 +127,17 @@ If you want to start translating the docs in a _new_ language:
2. Create the corresponding `<lang>` sub-folder for your translation.
3. Modify the i18n config in `.vitepress` sub-folder.
4. Translate the docs and run the doc site to self-test locally.
5. Once you have done all above, run `pnpm run docs:translation-status <lang> <commit>` to update the translation status.
6. Create a pull request to our GitHub repo.
5. Once you have done all above, run `pnpm run docs:translation-status <lang> [<commit>]` to update the translation status file (`.vitepress/translation-status.json`) in which it records checkpoint info for each language. Usually you can skip the commit argument to use `main` as the initializing commit.
6. Commit all the changes and create a pull request to our GitHub repo.
7. (Repo permission required) the maintainers will review and merge the pull request once it's approved.

If you want to maintain an existing translation:

1. See what translation you need to do to sync up with the original docs. There are 2 popular ways:
1. Via the GitHub Compare page: https://github.com/vuejs/router/compare/ (only see the changes in `packages/docs/*`) from the checkpoint hash to `main` branch. You can find the checkpoint hash from the latest pull request.
2. Via a local command: `pnpm run docs:compare-to-translate <lang>`.
2. Via a local command: `pnpm run docs:compare-to-translate <lang> [<commit>]`.
2. Create your own branch and start the translation update, following the previous result.
3. Same to step 6 and step 7 in starting a new language, once you have done all above, create a pull request with the same title format as **`docs(<lang>): sync update to <checkpoint-hash>`** and wait for the approval and merge by the maintainers.
3. Same to step 5 and step 6 in starting a new language, once you have done all above, create a pull request and then wait for the maintainers to approve and merge.

For more real examples, please check out [all the PRs with title "docs(zh): sync" after 2023-01-01](https://github.com/vuejs/router/pulls?q=is%3Apr+created%3A%3E2023-01-01+docs%28zh%29+sync).

Expand Down

0 comments on commit 80bcc6b

Please sign in to comment.