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.
-
Configure workflow permissions (required):
- Go to your repository's "Settings" > "Actions" > "General" > "Workflow permissions"
- Select "Read and write permissions"
- Click "Save"
This is a standard requirement for any GitHub Actions that need to create issues or make repository changes. Without these permissions, the action will fail with a
403 "Resource not accessible by integration"
error when trying to create issues or manage labels. -
This repo uses the
yuki-no
GitHub Action to keep it in sync with changes from Vite'sdocs
. It creates issues in this repo to track upstream changes that need to be translated.You must configure the following field in
/.github/workflows/yuki-no.yml
:track-from
: Set this to a recent commit hash from the head repository (vitejs/vite). This is the starting point for tracking changes - Yuki-no will only track commits after this hash. Using an old commit hash will significantly slow down the initial action run as it needs to process each historical commit. (After the first successful run, Yuki-no automatically skips previously processed commits.)
By default,
yuki-no
uses thegithub-actions
bot. If you want to use a custom bot: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 }}
)
For more configuration options, see the
yuki-no
documentation. -
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! ❤️