This article brings details about how to organize team translation.
If youâre translating alone â we encourage you to spread the word, tell others that youâre translating, let them join!
The best thing about team work is reviews. They really help to make the text better, more fluent, and fix typos.
Our bot named javascript-translate-bot watches translation repositories. It adds/removes labels and requests reviews to ensure that every PR gets at least two reviews. Also it edits the Progress Issue, marks articles.
Whatâs the flow for the team translation?
Hereâs the flow for the team translation. It was tested with large teams and is known to work well.
Roles:
- Translator â any person who wants to contribute.
- Maintainer â a member of the org, good at JS, with enough knowledge to review translations. Ask me to become a maintainer.
- Bot â a cheerful robot that struggles to help, adds/removes labels and requests reviews.
The flow:
Translator
- Selects an article from the Progress Issue.
- Adds a comment to the Progress Issue with the title of the article.
- Forks the tutorial and makes a translation.
- If many articles are translated, a separate branch/PR is recommended for each one.
Bot
- Labels the article in the Progress Issue.
â â¦Translator translatesâ¦
Translator
- Makes a PR with the same title as the English article title.
Bot
- Adds âreview neededâ label and requests review from the team.
â¦Maintainer is notified (if subscribed) OR finds the PR with review needed label, andâ¦
Maintainer
- Reviews the PR, adds comments in the âFiles changesâ tab if needed.
- Approves if all good. Or requests changes, here:
Bot
- Changes the label to
needs +1(if approved) orchanges requested(if requested).
When changes requested:
Translator
- Discusses the changes in the âFile changesâ tab.
- Fixes the translation and pushes the changes.
- Adds a comment with the
/doneword to the PR.
Bot
- Changes the PR label back to
review needed.
Maintainer
- Reviews again.
â â¦Thatâs until the PR is approved and merged, then we celebrate! ð
Double reviews
Normally, the first reviewer should âApproveâ changes, then the bot adds the needs +1 label, to request a second review from another person.
Still, if the PR is obviously good to merge, or the team is small, the reviewer can just merge the PR without approvals.
What exactly the bot does?
Here are more details about the bot, just in case youâre confused about low-level details.
The bot listens to repository events and performs actions:
- When the Progress Issue gets a comment with a title of an article:
- Appends the translator name to the article in the Progress Issue.
- When a PR with a title of an article is created:
- PR gets
review neededlabel. - Review requested from
@javascript-tutorial/translate-(lang)team. - PR number and author are appended to the Progress Issue item matching PR title.
- PR gets
- When PR changes are requested by a reviewer:
- PR label changes:
review neededâchanges requested. - Bot writes a comment suggesting to comment
/donewhen changes are finished.
- PR label changes:
- When PR comment
/doneappears- PR label changes back:
changes requestedâreview needed.
- PR label changes back:
- When changes are approved:
- PR label changes
review neededâneeds +1 - The next reviewer may request more changes leading to additional
review needed/changes requestedcycles. - When a reviewer is satisfied with the PR with
needs +1, they should merge it.
- PR label changes
- When the PR is merged:
- The progress issue item is labeled with
[x]. - The bot adds a congratulating comment.
- The progress issue item is labeled with
Got any questions?
Create an issue and mention @iliakan or ask me: [email protected].
â Ilya Kantor