translation missing: en.blog_post.title

TL;DR Make sure you’re raising an error in test and development environments if there is a translation missing. Below there are a couple of thoughts and examples.

Intro

It’s 2017: we are using microservices, shipping APIs and building Progressive Web Apps. But it can’t ease the pain of a real user when our web app is missing translations:

Runtastic
Strava
Groupon

You can find thousands of examples here.

What can possibly go wrong?

The worst case – you’re sending multi-language emails using your app, so your copy lives in locale files. No matter which translation is missing in this part – it will be sent to every user of your app. :boom:

Next actions

If you’re using Rails just go to your env/test.rb and env/development.rb and uncomment:

config.action_view.raise_on_missing_translations = true

Merry Christmas! :santa: :christmas_tree: :gift:

Are you full-stack developer or web designer? Join me at Growth Dev team at Blinkist!
I work in Growth Development team at Blinkist (app that allows you to read/listen short versions of non-fiction books), we maintain our webapps, design & ship AB-tests, build API integrations, analyse user data to improve our web products for millions of users. If you’re Rails developer with a passion for front-end or a web designer with a passion for growth – send me an email or ping on Twitter.
comments powered by Disqus