Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Mozilla's Technical Evangelism team is piloting a program that uses Transifex for managing translation work, both for app developers and localizers. If you visit our team page there, you'll see the Boilerplate app for Firefox OS, along with a collection of other apps from open web app developers who have joined us there.

Why Transifex?

When looking at the available l10n platforms, we wanted one that would support both paid and volunteer translations as well as one that would support a wide range of localization formats and workflows. Transifex fitted that profile. We're also very excited about Pontoon — a platform currently in development by our l10n team — and look forward to using it with Boilerplate and other apps when it's ready.

How can developers get involved?

App developers can also get involved in the project — let's look at how.

Program criteria

This program is open to select app developers who meet the following criteria:

  1. Have a Firefox OS app that has been submitted to Firefox Marketplace.
  2. Are willing to credit all those who contribute translations to their app - for example, through a mention in the app's description on the Firefox Marketplace.

Preparing your app for localization

If your app is not already prepared for localization, you'll want to read about how to Localize Firefox OS Apps including how we localized the Firefox OS Boilerplate App.

You do not need to use the same method we have used (l10n.js), but you do need to have an initial set of strings identified and extracted (e.g., resources to upload) prior to adding your project to our team page on Transifex.

Project creation

Please contact us on Transifex and if your app meets our requirements, we can help you join our Transifex pilot.

We expect of you to credit the localizers helping you out; for instance, through a mention in the description for your app on the Firefox Marketplace or in your app directly.

Configuring Transifex (tx config)

If you like working from the command line, you may use the Transifex client (installation details) for the following steps, but you can do the following steps from the Transifex website as well.

In the top-level of your app directory, initiate the Transifex project:

[My App/]$
tx init

This command creates a .tx directory and a config file within it.

When first setting up a project to work with Transifex, you'll need to set some values in this config file.

The .tx/config file for the Boilerplate looks like this:

[main]
host = https://www.transifex.com

[firefox-os-boilerplate.app_properties]
file_filter = locales//app.properties
source_file = locales/en-US/app.properties
source_lang = en
type = MOZILLAPROPERTIES
minimum_perc = 50

[firefox-os-boilerplate.manifest_properties]
file_filter = locales//manifest.properties
source_file = locales/en-US/manifest.properties
source_lang = en
type = MOZILLAPROPERTIES
minimum_perc = 50

Each block of the config is indicted with square brackets. A project on Transifex can have any number of resources, so you can organize your app in the way that you like.

For the Boilerplate, we have two resources:

  • firefox-os-boilerplate.app_properties, which maps to the file app.properties and includes all of the strings from the app that we want to localize.
  • firefox-os-boilerplate.manifest_properties, which maps to the file manifest.properties and includes the localize name and description that we'll copy to the manifest.webapp.

Resources are also listed in the Transifex web interface:

transifex resource screen, allowing you to select translations and add new resources to them.

In Transifex, each resource will be copied when a new language is requested. Translators then check out those files, edit them to include their translations and then check them back in when they are done.

Other options are:

  • file_filter: Tells Transifex how you have organized your locale files. For the boilerplate, we wanted each property file to have the same name and be sorted into directories named after each locale. Transifex substitutes locale to acheive this.
  • source_file: Tells Transifex what is the source of strings (default locale).
  • source_lang: Indicates the locale of the source file (e.g., the default project locale).
  • type: Indicates what file type you are using for translation. Transifex supports a number of options.
  • minimum_perc: Sets the threshhold value for when Transifex will pull in a new locale. 50 means that a locale must be at least 50% complete before Transifex will pull the locale into your project.

Once the config file is complete, you can push it to Transifex with the tx push -s command:

[My App/]$
tx push -s
Pushing translations for resource my-app.app_properties:
Pushing source file (locales/en-US/app.properties)
Resource does not exist.  Creating...
Pushing translations for resource my-app.manifest_properties:
Pushing source file (locales/en-US/manifest.properties)
Resource does not exist.  Creating...
Done.

How can localizers get involved?

Let's look at the process by which localizers can get involved in translating apps.

Sign up for a Transifex account

Sign up for a Transifex account. Signing up as a contributor is free.

Sign up for Transifex

After you've created your account, you'll need to confirm your email.

Visit our team page

After confirming your email, you'll be prompted to select a project to start working on:
Transifex find a project.

To find us, click on "explore public projects", or simply visit our team page.

Select a project

On our team page, you'll see a list of available projects:

Transifex team page.

Simply click on the name of the project to which you'd like to contribute.

Find or request your language

On each project's page, you'll see a list of available languages.

Transifex list of project locales

Click on the language that you want to localize the project in to and click the button.

If your language is not listed, click the  button. Depending on the project's settings, your language request may be approved automatically, else it will be forwarded to project managers for approval.

Start translating!

After selecting a language and being approved by the project maintainer, you will see a list of resources for that project:

Click on a resource and then click the  button.

Document Tags and Contributors

 Last updated by: chrisdavidmills,