Skip to content

Managing translations

nditada edited this page Apr 8, 2020 · 3 revisions

(This is only for engineers managing the site, if you are a translator please ignore this!)

Update English text to lokalise

On every commit on the master branch, we upload the English texts automatically to lokalise.

Update translations from lokalise

There is now a simple tool that automates this part described below.

To import all the translations from lokalise, run the following command in the root directory of this repository.

$ ./import-translation.sh <LOKALISE_TOKEN> You can get the LOKALISE_TOKEN from https://app.lokalise.com/profile, API tokens.

This command will generate the _translations/.json files and the _content/. Then you will need to commit the desired changes.

NOTE: All the changes to translations files should be done in lokalise and then imported by the described method.

Preparing to publish a new version

  1. Look for the corresponding preview branch. We use a naming convention for this, so for example if you want to update the Spanish translations for the site, given its ISO code is es, the branch you want to look for is preview-translation/es.
  2. If this is NOT the first time we're deploying that language, skip to the next step, otherwise keep on reading this step. Pull the branch and modify the _config.yml file to enabled languages array. E.g.: for Spanish (es) you would add es to that array. Commit and push.
  3. Wait for the branch to build the preview and verify nothing is broken.
  4. If everything is ok, click Yes, it looks good in the corresponding Slack Workflow (if you don't know what this means you might not be the intended audience of these instructions, but if you think you are, look for the the Tech Team Lead ask them to explain).
Clone this wiki locally