This script syncs changes from the main reactjs/react.dev repo to various translation forks. Configuration for the translation forks is located in the langs folder of this repository.
Sync scripts are run weekly via GitHub Actions. Pull requests are created by the shared @react-translations-bot account. This bot is normally granted write permissions to all new language forks.
To run the sync script locally, first copy the .env.sample to .env and fill in all environment variables.
Then to sync all languages, run:
yarn
yarn sync-forksTo sync only specific languages, run:
yarn
yarn sync-forks --langs=foo,barBy default, the sync runs from .github/workflow and syncs languages in batches.
A bot cannot create a translation, only people with org access can. Normally, React team members should monitor this repository, but feel free to raise an issue on the main React repo if a translation attempt is being unattended.
If you're a member of React team, here's what you need to do:
- Install
gh(GitHub CLI) and dogh auth login - Run
npx vercel loginand ensure you have permissions to create projects in Meta Open Source org - Ensure you have permissions to create projects in the
reactjsGitHub org
Review the pull request associated with the translation. It should be adding it to the langs/langs.json file. Suppose we're adding the foo language code with @bar and @baz GitHub users as maintainers. Merge the pull request and run in this folder:
yarn
yarn create-translation --lang=foo --maintainers=bar,bazThis should create the GitHub repo, create a Vercel project, link them, and deploy them. This won't by itself set up the domain--that can wait until the translation is mature.