Updating locales for specific projects

These are instructions in order to update locales to Android mobile products living within the android-l10n project.

Edit the l10n.toml file(s)

All Android products live within the android-l10n repository. Depending on the product that requires a locale to be added or removed, the corresponding l10n.toml file will have to be edited by updating the list of locale codes in it.

The l10n.toml files live in their corresponding project folder, located here for:

Each l10n.toml file typically looks like this:

basepath = "."

locales = [
    "an",
    "ar",
    "as",
    "ast",
    "az",
...
]

[env]

[[paths]]
  reference = "app/src/main/res/values/strings.xml"
  l10n = "app/src/main/res/values-{android_locale}/strings.xml"

Identify the locales section, add or update the desired locale code in this list, making sure that the list is in alphabetical order.

Save your edited file, then commit and push from your local clone to the android-l10n repository.

Note that:

  • All products share strings with Android Components, so you will also have to edit the Android Components l10n.toml file as well if it’s a brand new locale.
  • In case of removal of a locale, files need to be manually removed from the repository.

Updating locales in Pontoon

Once the patch has landed, the locale has to be added - or removed - in Pontoon as well. The steps to follow can be found in the existing Pontoon documentation here.

One thing to note is that, once you merge the pull request (PR) adding or removing locales in the l10n repository, automation will send that updated list over to the code repository. However use caution, as the next string quarantine PRs you receive might try to undo your changes (example of Fenix l10n.toml here, and more information about string quarantine PRs here).

You can know the status of l10n imports by checking the list of closed pull requests in firefox-android.