Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 4.39 KB

adding_multilocales.md

File metadata and controls

64 lines (47 loc) · 4.39 KB

Adding a new locale to the multi-locales build

Android has two different types of builds: a multi-locale build that ships in Google Play Store, and a single-locale build (containing only one locale) that is mostly used for testing.

The list of locales included in the multi-locales build is stored inside a file named maemo-locales within Mozilla’s code repositories. Since the goal is to create Nightly builds, the file will be in mozilla-central: https://hg.mozilla.org/mozilla-central/file/default/mobile/android/locales/maemo-locales

File a bug to add the new locale

You need to file a bug in Firefox for Android::General requesting the new locale (see for example this bug for Serbian). You can use this bug template to make things faster:

  • Update it with the appropriate locale code and language name.
  • Update the target version for Firefox in comment 0.
  • Set the relnote-firefox flag, e.g.
Release Note Request (optional, but appreciated)
[Why is this notable]: New locale
[Suggested wording]: "Locale added: LANGUAGE (ab-CD)"
[Links (documentation, blog post, etc)]:

Creating a patch for maemo-locales

First of all make sure that your environment is correctly set up, and update your local mozilla-unified clone:

$ cd ~/mozilla/mercurial/mozilla-unified
$ hg pull -r default -u
$ hg update central

The file to modify is in mobile/android/locales/maemo-locales, open it with your text editor of choice.

$ atom mobile/android/locales/maemo-locales

And add the new locale to the list. With Atom and the Sort Lines package installed, you can press F5 to make sure that the list is in alphabetical order. Let’s say for example that you need to add ab-CD to the list of supported locales.

After you’ve finished editing the file, check the status of the repository, and the diff.

$ hg status
M mobile/android/locales/maemo-locales

$ hg diff
--- a/mobile/android/locales/maemo-locales
+++ b/mobile/android/locales/maemo-locales
@@ -1,8 +1,9 @@
+ab-CD
 ar
 be
 ca
 cs
 da
 de
 es-AR
 es-ES

M in hg status indicates that the file has been modified, + in hg diff that the line has been added. Follow the instructions available in this document to create a patch, submit it for review, and land it.

IMPORTANT: an error in a single locale is going to break the multi-locales build for all locales, English included.