Localization (l10n)

These notes are primarily to support localizers working on localizations related to https://addons.mozilla.org/.

Projects

There are two core projects for AMO that require localization:

Both of these projects use Pontoon for translations.

addons-server

Addons-server is the default front-end for desktop users of AMO, it is also the API backend and home to the developer hub and reviewer tools. It is written in Python using the Django Framework.

Testing changes to addons-server localizations

The strings will be available on dev or stage depending on when they were committed see When can I expect to see my strings land? for details.

The relevant hosts for addons-server are as follows:

addons-frontend

Addons-frontend is the new frontend and default frontend for mobile user-agents, it will eventually replace the addons-server frontend for user-pages. It is written in JavaScript and uses React at its core. Addons-frontend currently provides an amo app (amo.po).

Testing amo localizations

The strings will be available on dev or stage depending on when they were committed see When can I expect to see my strings land? for details.

The hosts for the new frontend are the same as addons-server except to be routed to the new frontend you either need:

  • A “mamo” cookie with the value “on”. You can set this by clicking “View mobile site” in the footer.

  • A Mobile user-agent string.

_images/view-mobile-site-link.png

Advanced Configuration for testing addons-frontend strings

This will be enough for basic string checks. If you need to test strings related to the install buttons you will need to enabled preferences to allow add-on installation to work on the development and stage servers.

To fully configure Firefox to install add-ons on either dev/stage you will need to additionally do the following:

  • Use Firefox Nightly or Firefox Developer Edition

  • A new profile is recommended since changing the dev certs will mark existing add-on installs as invalid (this change is not immediate).

  • Go to about:config and set extensions.webapi.testing as a Boolean to true.

  • To install an add-on, you will need to be able to install a signed add-on from dev or stage. Create the xpinstall.signatures.dev-root pref in about:config as a Boolean and set it to true.

  • If you see warnings when trying to install a theme or theme previews don’t work go to about:preferences#security and add an exception for dev/stage (See the “Exceptions” button next to “Warn me when sites try to install add-ons”).

  • Restart the browser.

Routine Extraction of new strings

Newly added strings are extracted every week after the tag which is at 9am PST on Tuesdays.

When can I expect to see my strings land?

Once translations are commmitted into our repositories they are visible on our dev server within 30mins (or as long as it takes to deploy the code).

Master is tagged and pushed to stage weekly at around 9am PST every Tuesday.

The code is released to production every Thursday. The push generally starts around 9am PST.

Debug locales

There are two debug locales generated from the English keys. These can be useful to detect strings that are not marked for extraction.

The debug locales are called dbl (Debug left to right) and dbr (Debug right to left). The tool used to build these is called potools and it is both HTML and placeholder aware, to provide more accurate simulated localizations.

To access a debug locale simply replace the current locale in the url of the page you are on.

E.g: https://addons-dev.allizom.org/en-US/firefox/ becomes https://addons-dev.allizom.org/dbr/firefox/.