The Case

A key element for the successful distribution of a mobile application, is providing accurate information to each user interface element. For this reason, the Android applications of Beat (Driver and Passenger apps) have separate locales for each of our operating markets. Our service is currently available in six countries (Peru, Chile, Colombia, Mexico, Argentina and Greece), and in six different languages and dialects.

In order to be efficient and productive when it comes to the management of the various localisations, we have been using Transifex. Transifex is a localization platform that facilitates the coordination of translating texts to be used in our mobile applications.

In the past when it was time to prepare a new release for our mobile applications, we first had to go to the platform and get the latest translations. At that time we supported six different languages and dialects. For each language, we had to go to Transifex, download the appropriate strings.xml file and place it in the correct folder.

The above process was tedious, error-prone, time-consuming and non-scalable, as it required 2 minutes for each file, amounting to 24 minutes for both our Android applications.

The Solution

Team Beat decided to automate the entire process of downloading localization files for our Android applications by leveraging the functionality offered by the Transifex API. This automation has been turned into an open source gradle plugin, appropriately named as Gradle localization plugin. This plugin contributes a single and non-dependent task, named fetchLocalization. When invoked, it downloads every file for which there is appropriate configuration, and places it in the already configured destination folders.

Providing your own configuration

The Result

Following the brief setup instructions of the plugin, the entire process of downloading localization files now takes up to 10 seconds. This is a marked improvement compared to the 24 minutes. In addition, since this functionality has been implemented as a gradle plugin, it’s easy to be used in CI/CD automation pipelines.

How to invoke the script

The Vision

The future looks bright for our plugin. Our aim is to make it straightforward for someone to use with any localization platform. Gradle localization plugin currently has a single integration with Transifex, but we are exploring ways for users to add their preferred integration. Feel free to contribute to the tool at GitHub.

GitHub: https://github.com/beatlabs/gradle-localization-plugin