This repo is a template for Vite.js docs translation repositories.
-
Click Use this template to scaffold a new translation repo in your personal GitHub.
-
This repo uses the
ryo-cho
GitHub Action to keep it in sync with changes from Vite'sdocs
. It creates pull requests in this repo that cherry-pick the upstream changes to be translated (example).Edit the following fields in
/.github/workflows/ryo-cho.yml
:upstream-repo
- the Git URL of your translation repo (the URL should end with.git
)upstream-repo-branch
- the target branch in your translation repo
By default,
ryo-cho
is configured to use thegithub-actions
bot, which works out of the box. However, you can use your own bot by configuring the following:username
- the GitHub username of a machine user (e.g.,ci-bot
)email
- the email associated with the GitHub username aboveaccess-token
- a personal access token of the machine user (stored in a repository secret, enablingaccess-token: ${{ secrets.MY_SECRET_TOKEN }}
)
-
Translate all user-visible strings (unless specified otherwise) in the following files to the target language:
/docs/.vitepress/config.ts
(theog*
,footer.*
,text
, andlink
fields)/docs/.vitepress/theme/components/HomeSponsors.vue
/docs/.vitepress/theme/composables/sponsor.ts
(thetier
fields)/docs/_data/team.js
(thetitle
anddesc
fields)/docs/**/*.md
/CONTRIBUTING.md
/README.md
/docs/images/*.svg
💡 Tips:
- Ping the
#docs
channel in Discord or GitHub Discussions for others who can help with translations. - Submit pull requests in your repo for this work so that collaborators can proofread the translations.
-
Create a pull request in Vite's main repo to update the locale links in
docs/.vitepress/config.ts
, which would add the new language to the dropdown on the Vite homepage. Specifically, append tolocaleLinks.items[]
an object with these keys:text
- the language name in its native spelling (e.g.,Español
)link
- the URL to the target site, composed of the language's ISO 639-1 code as a subdomain ofhttps://vitejs.dev
(e.g.,https://es.vitejs.dev
)
Example for French:
localeLinks: { items: [ { text: 'Française', link: 'https://fr.vitejs.dev' }, ] },
-
In the pull request's description, include the URL to your translation repo. Be prepared to transfer the repo to the
vitejs
organization upon request by the Vite team. The transfer automatically adds you as a collaborator on the repo. The repo will be renamed todocs-LANGUAGE_CODE
(e.g.,docs-fr
) after the transfer.Thank you for your contribution! ❤️