So you’d like to help us translate Discourse into other languages? Great! Let’s get started.
Translators do all their work in the Transifex project for files listed there. Create an account at Transifex and join a team for one or more languages. You’ll be notified when there are new strings that need to be translated, and get emails when there are announcements.
After contributing translations to the Transifex project, there’s nothing more to do. The translations will be pulled into the Discourse repo periodically.
Discussions about the translations and how to improve the process should happen in Meta’s translations category.
What Discourse team does
We use the Transifex client to push and pull translations, and to manage which files belong in Transifex.
Installing the client is easy. First, you’ll need a Transifex account. Then, install the client.
On OS X:
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py sudo python get-pip.py sudo pip install transifex-client
Test that it worked:
~/.transifexrc and add your credentials:
[https://www.transifex.com] hostname = https://www.transifex.com password = my-transifex-password token = username = firstname.lastname@example.org
token empty as shown above.
To get new translations, we run a script that uses the client and does some post-processing to make sure everything is in a format that works.
You can use the language code as argument if you want to pull only a specific language. For example, if you want to pull French translations, run the script like this:
ruby script/pull_translations.rb fr
Adding new files for translation
To add a new file for translation, you’ll need to do two things: