Numbers may be a universal language, yet if you don’t read English you’ll still miss out on a lot of insights from the latest State of JS survey. For that reason we’ve decided to start translating our results in as many languages as possible!
We’re doing this as a crowdsourced, community effort, and in fact we’ve already heard from 100+ volunteers interested in helping us translate!
If you’d like to help, here’s some more information about the workflow we’ve implemented. Let’s say Alicia wants to translate our results to Spanish.
Starting a New Language
- Alicia forks our main StateOfJS monorepo to her own GitHub account.
- She makes an initial commit modifying the languages files (see below for information on where to find them).
- She then opens a PR back to the root repo.
- In the PR description, she pastes in this list of to-do items to help others see how far the translation has progressed.
Contributing to an Existing Language
Now let’s say Javier comes along, and he wants to help with the Spanish translation effort. He would:
- Search the list of open PRs for any pending Spanish translations.
- Leave a comment on the PR asking for write access to Alicia’s fork (which can be given in the repo’s
Settings > Collaborators & teamsscreen).
- Once Javier has write permissions, he can now add commits directly to the PR.
Finalizing a Language
- Once a language is complete, Alicia can ask me (SachaG) to review and merge the PR.
This means that the first person to start a new translation PR will become the “manager” for that language and be responsible with adding collaborators and notifying us once all collaborators are happy with the result.
The monorepo includes code for multiple surveys, but the files for the 2018 edition (which is the only one that can be translated currently) are located in
Translation files are located in
/surveys/2018/website/src/translations. Each language has the following files:
- A root
locale.ymlfile (for exampe
fr-FR.yml) containing all user interface translations.
localedirectory (for example
fr-FR) containing all markdown files for introductions, conclusions, etc.
When contributing new translations, please make sure you follow the same directory and file structure!
Other i18n Work
Internationalization is not just about translation, but also involves making other changes like loading new fonts, or adding right-to-left language support.
For these changes, please open separate PRs to make the reviewing process easier.
For any other question, please open an issue on GitHub!