Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

Implementing Pontoon in a Mozilla project

Pontoon is a web-based, What-You-See-Is-What-You-Get (WYSIWYG), localization (l10n) tool. At Mozilla, we currently use Pontoon to localize various Mozilla projects and the Firefox OS app interface, known as Gaia. Pontoon is a very simple and intuitive tool that requires little to no technical skill for localizers to use, which will decrease your time-to-publish for localized versions of your project. Here we'll discuss how you can add Pontoon to your Mozilla project.

Would you like to improve Pontoon? Learn how to get involved on GitHub.

Just getting started with your project l10n? Check out the wiki on getting your project localized.

A. Make your project localizable

We realize that these are already considered to be standard best practices for localizing projects at Mozilla, but we feel it's good to add them here as a little reminder.

  1. Ensure that your project supports one of the l10n frameworks (gettext, XLIFF, L20n, lang, properties, etc.).
  2. Extract localizable strings into resource files.
  3. Push resource files to a repository (SVN, HG, Git).
    • Individual locale folders must be located at the same nesting level of the directory tree. Source locale needs to be called templates, en or en-US. You may want to create a dedicated locales folder for this purpose. Locale code must not be part of the file name.
    • Correct pattern:
      /locales/{locale_code}/path/to/file.extension
    • Incorrect pattern:
      /locales/{locale_code}/path/to/file.{locale_code}.extension
  4. Make sure Pontoon has write access to the repository.

B. (optional) Enable in-page localization of your web project

  1. Link a script from your HTML <body> element, so Pontoon can talk to your site, detect content and make it localizable in place. You only need to do this in the environment that will be used for in-page localization, e.g. staging server:
  2. If your site uses CSP, please make sure that the following is permitted for domain pontoon.mozilla.org:
    1. loading inside iframe
    2. loading remote CSS
    3. loading remote images
  3. If your site uses the X-Frame-Options header, please make sure loading inside iframe is permitted for domain pontoon.mozilla.org.
  4. Make sure your site supports HTTPS. It's free, automated and open. Let's encrypt!

C. Add your project to Pontoon

Your project is now ready to be set up in Pontoon. Please file a bug in Localization Infrastructure and Tools :: Administration / Setup and provide the following information:

  • Project name
  • Repository URL
  • List of requested locales
  • Website URL, including all subpage URLs (only if using in-page localization)

For more details, please get in touch with the Project Management Team.

Document Tags and Contributors

Tags: 
 Contributors to this page: mathjazz, teoli, jbeatty
 Last updated by: mathjazz,