Skip to content

Commit

Permalink
chore: add the guide for self-host translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang committed Apr 9, 2023
1 parent 4b08a12 commit f45de45
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ 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.

For contributing to the translations, you have 2 ways to go:

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

If you want to start translating the docs in a new language:

1. Create the corresponding `<lang>` sub-folder for your translation.
Expand All @@ -139,6 +143,17 @@ If you want to maintain a existing translation:

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).

### Self-host the translation

You can also host the translation on your own. To create one, just simply fork our GitHub repo and change the content and site config in `packages/docs`. To long-term maintain it, we _highly recommend_ a similar way that we do above for our officially hosted translations:

1. Make sure to have a _checkpoint_ branch (named like `sync`), which is always to the commit of the original docs that your latest translation is corresponding to.
2. Translate by the diff result between the latest official repo and yours via git diff command or GitHub Compare page.
3. Finish the translation.
4. Update the checkpoint branch.

<!-- TODO: add an example once we have got one -->

## Credits

Thank you to all the people who have already contributed to Vue Router!
Expand Down

0 comments on commit f45de45

Please sign in to comment.