Test your Gaia localization


You need some tools on your machine (tested on MacOS and GNU/Linux, not yet on Windows – feedback appreciated).

  • Git
  • Python 2.6
  • adb (from Android SDK)

Clone Gaia

  $ git clone https://github.com/mozilla-b2g/gaia.git
  $ cd gaia

Clone locales

You need to clone all locales that you want to have in the device (and set those in the languages.json from the next step).

  $ cd locales
  $ hg clone URL

where the URL depends on what are you trying on:

v1.0.1 is the first version («es», «pr-BR» and «en-US») and you should work on v1-train or even master.

Set environment variables

You need to export the following variables. You can do that on your .bashrc file or even on the build time (before the command).

  export LOCALE_BASEDIR=/path/to/gaia/locales/
  export LOCALES_FILE=/path/to/gaia/shared/resources/languages.json

where languages.json must be edited to select what locales you want to test. For example:

  "ca" : "Catalan",
  "en-US" : "English (US)",
  "es" : "Español",
  "eu" : "Euskara",
  "gl" : "Galego"

Build and flash

Go to the gaia cloned folder, and just:

  $ make reset-gaia

if you want to test on your device (and you have it connected) or

  $ make profile

if you want to use it with your b2g-desktop build from here.

You can also put the environment variables before the launch of the make like:

  $ LOCALE_BASEDIR=/path/to/gaia/locales/ LOCALES_FILE=/path/to/gaia/shared/resources/languages-all.json make reset-gaia


Once finished, you will have a new Gaia build on your phone with the languages you just flahsed. Or you can use your b2g-18 binary to run it on desktop, with:

 # Profile Ready: please run [b2g|firefox] -profile /Users/willyaranda/projects/gaia-mozilla/profile
 $ /path/to/b2g-19/binary -profile /path/from/above/output

And that’s it. Enjoy your new gaia in your language!