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.
- Ensure that your project supports one of the l10n frameworks (gettext, XLIFF, L20n, lang, properties, etc.).
- Extract localizable strings into resource files.
- 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
oren-US
. You may want to create a dedicatedlocales
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
- Individual locale folders must be located at the same nesting level of the directory tree. Source locale needs to be called
- Make sure Pontoon has write access to the repository.
- If using GitHub, add mozilla-pontoon orĀ pontoon-l10n-robots as collaborator to your project.
B. (optional) Enable in-page localization of your web project
- 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:-
<script src="https://pontoon.mozilla.org/pontoon.js"></script>
-
- If your site uses CSP, please make sure that the following is permitted for domain
pontoon.mozilla.org
:- loading inside iframe
- loading remote CSS
- loading remote images
- If your site uses the X-Frame-Options header, please make sure loading inside iframe is permitted for domain
pontoon.mozilla.org
. - 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.