Pontoon is a web-based, What-You-See-Is-What-You-Get (WYSIWYG), localization (l10n) tool used to localize web content. At Mozilla, we currently use Pontoon to localize various Mozilla websites 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 web project. Here we'll discuss how you can add Pontoon to your Mozilla web project.
We realize that these are already considered to be standard best practices for developing web projects at Mozilla, but we feel it's good to add them here as a little reminder.
- Ensure that your web project supports one or all of the following frameworks:
- Extract your localizable strings into the appropriate resource file. For django projects, learn how to do that here. For gettext projects, learn how to do that here.
- Add that resource file to the project's repo (e.g., SVN, hg, Transifex, etc.).
Adding Pontoon to your code
Now that setup is out of the way, let's talk about injecting Pontoon into your web project's code using the Pontoon hook (pontoon.js). The approach to doing this depends on your web project's infrastructure. Below you'll find instructions for Django, PHP, and web10n frameworks.
- You can find the Pontoon hook on github here.
- To install the hook, run this command in your terminal:
pip install -e git+git://github.com/rtnpro/django-pontoon-hook.git@master#egg=django_pontoon_hook
settings.MIDDLEWARE_CLASSESsetting, preferably as the last item.
Adding your project to Pontoon
- Admin: add project
- name, URL, locales, SVN/Transifex repo
- subpages, info
- oes not remove User, but removes UserProfile recreate users