Sunday 2:30 p.m.–3 p.m.
- Audience level:
- Best Practices & Patterns
Is your web app ready for a global audience? Internationalizing your codebase with gettext (bit.ly/pyconi18n) might just be the simpler part of the puzzle. It’s hard to maintain translations in a fast paced deployment environment without constant manual intervention. This talk covers tools and strategies you can adopt to automate your localization process and ensure high translation coverage.
Last year at Hearsay Social, we went through the drill of internationalizing our codebase to support customers across the globe. We used the Python gettext framework and Babel package for translation message file generation. As we continuously deployed new features, we realized that it was hard to maintain our translations at an acceptable quality bar (particularly as an enterprise product) without constant developer intervention. We often found that we were missing translations due to latency and integrating syntax errors in message files provided by the translation service. Also, as developers edited various strings in our codebase, we lost translations for them. We had to create switches in our code to ensure that new features that did not have translations available were not turned on for international customers. Code complexity galore. We’re avid users of Github and use pull requests to integrate code into production. We used githooks to trigger translation checks (Polib and Potpie) on pull requests. We also used our existing continuous test infrastructure (Jenkins) to automate integrations with our translation service. We discovered some nifty switches in the Babel translation package for generation of translation files and revisited how strings in our code were arranged to enable quick deployment with full translation coverage for our international customers.