Daily Bulletin

The Conversation

  • Written by Keith Pitty, Developer, The Conversation

The Conversation was launched in 2011 in partnership with Australian universities. Later on, the platform was extended to support partnerships with institutions in the UK, USA and Africa. So far, for all regions, the site was presented in English.

Then in 2015 the technical team began preparing to launch The Conversation in France. It was our first foray into using the i18n features of Rails to support the presentation of our site in another language.

To facilitate translations from English into French we chose to use the PhraseApp service.

This post describes how our i18n workflow makes use of PhraseApp.

Updating English phrases

Within our Rails apps we update the English phrases using the standard Rails i18n features. So, for example, in our main application, config/locales/tc/en.yml contains English phrases for various i18n keys that are used within the Rails application code. We need a reliable way of ensuring that the equivalent French phrases are in config/locales/tc/fr_fr.yml.

Pushing to PhraseApp

Having updated the English phrases within the Rails config/locales files, the next step in our workflow is to make them available to PhraseApp. Each of our Rails applications has a Rake task which makes use of some common utility code to do this.

    rake translations:push

When this task is run, the phraseapp-ruby RubyGem is invoked to upload the English locale file to PhraseApp via the PhraseApp API.

Each time we deploy, this rake task is run. This ensures that updates to English phrases are provided to PhraseApp in a timely fashion. It also minimises the likelihood of English phrases appearing on French pages while we wait for translations.

Translations within PhraseApp

Once the new or updated English phrases have been uploaded to PhraseApp, our colleague in Paris translates them. Due to Leighton Walter Kille’s bilingual skills and diligence together with the time difference between Australia and France, we often find the French translations available the next morning!

Pulling from PhraseApp

In a similar fashion to pushing translations, a rake task pulls translations from PhraseApp via their API.

    rake translations:pull

Running this task will update the French phrases within config/locales/tc/fr_fr.yml. Naturally, this is done on a Git branch.

Checking i18n Integrity

Without careful checking, mistakes can creep into the locale yml files. So our CI build includes a step which we call i18n-hygiene. This checks whether or not an i18n key is used in the codebase, whether interpolation variables are correctly encoded and several other tests. It’s an important part of our workflow which deserves a post in its own right so I won’t elaborate any further now.


Once the GitHub pull request has a clean build on Buildkite and has been approved, it is merged into the master branch and deployed. Then the translations are visible on our French site.


The combination of Rails i18n features, PhraseApp and custom i18n checking has served us well so far. Hopefully the infrastructure we have developed will enable us to smoothly prepare for the next language that The Conversation supports.

Authors: Keith Pitty, Developer, The Conversation

Read more http://theconversation.com/our-i18n-workflow-64960

Writers Wanted

Matt Canavan suggested the cold snap means global warming isn't real. We bust this and 2 other climate myths


Do I Need a Financial Planner or Should I Just Do It Myself?


The Conversation


Prime Minister interview with Karl Stefanovic and Allison Langdon

Karl Stefanovic: PM, good morning to you. Do you have blood on your hands?   PRIME MINISTER: No, it's obviously absurd. What we're doing here is we've got a temporary pause in place because we'v...

Karl Stefanovic and Allison Langdon - avatar Karl Stefanovic and Allison Langdon

Prime Minister Scott Morrison delivered Keynote Address at AFR Business Summit

Well, thank you all for the opportunity to come and be with you here today. Can I also acknowledge the Gadigal people, the Eora Nation, the elders past and present and future. Can I also acknowled...

Scott Morrison - avatar Scott Morrison

Morrison Government commits record $9B to social security safety net

The Morrison Government is enhancing our social security safety net by increasing support for unemployed Australians while strengthening their obligations to search for work.   From March the ...

Scott Morrison - avatar Scott Morrison

Business News

Where Does Australia Stand in the Global Green Energy Transition?

Renewable energy sources seem to be the solution for a less polluted environment, but the transition from fossil fuel is not that easy to make. After all, we still have entire industries that base...

NewsServices.com - avatar NewsServices.com

Elegant Media honoured as a Deloitte APAC Technology Fast 500 Winner

Elegant Media has been awarded a place in the prized 2021 Deloitte APAC Technology Fast 500TM. This recognition stands as a testament to Elegant Media’s dedication and success in producing outstandi...

Tess Sanders Lazarus - avatar Tess Sanders Lazarus

Seeking Funding for Your Business Development and Growth

When you are looking to fund your business's growth and development, it can be difficult knowing what to ask for and what process to undertake. There are many funding options available to business...

NewsCo - avatar NewsCo