-
Notifications
You must be signed in to change notification settings - Fork 17
Translating the State of CSS Survey in your language #30
Description
The Workflow
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 this repo 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 & teams screen).
- Once Javier has write permissions, he can now add commits directly to the PR.
Developing
For a language to appear in the dropdown, it needs to first be added to the locales.yml file. You can then run the Gatsby project with gatsby develop.
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.
Language Files
Translation files are located in /src/translations. Each language has the following files:
- A root
locale.ymlfile (for exampefr-FR.yml) containing all user interface translations. - A
/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!