Pontoon enables localizers to translate websites in-place with context and spatial limitations right in front of them. A full list of extracted strings is also available, to help with strings that are hard to reach, e.g. error messages and the
<title> tag. Localizer Docs.
To enable localization of your site with Pontoon, include a script to overcome cross frame scripting, and Pontoon will autodetect strings. Or, to make the best out of Pontoon, fully prepare your site with hooks that will mark strings for localization and include all the neccessary tags. Developer Docs.
- Clone this repository or your fork:
git clone --recursive https://github.com/mathjazz/pontoon.git
- Create and set up the virtual environment:
virtualenv --no-site-packages env
pip install -r requirements/compiled.txt -r requirements/prod.txt
- Configure the settings:
cp settings/local.py-dist settings/local.py
- Set up the database:
mysql -u root -e 'CREATE DATABASE pontoon CHARACTER SET utf8;'
./manage.py syncdb --noinput && ./manage.py migrate
- Run the development server:
And that's it, just point your web browser to http://localhost:8000 and Pontoon's homepage should apear.
It gets much more exciting if you add at least one project, so you can try how the localization with Pontoon actually works. We created a simple website in PHP that uses SVN repository for storing localization files. Here's how you set it up:
- Move or link main Pontoon project folder (
pontoon/) to your web server's document root, which should be capable of running PHP.
- Install pysvn to work with the SVN repository. Binaries are available for most popular platforms, but you can also install it from source:
- Download and untar the latest source kit under pysvn Extension.
python setup.py configure
cp -R pysvn pontoon/env/lib/python2.X/site-packages/
- Run project from localization files stored in SVN repository:
You can also add your own project at http://localhost:8000/admin/, but you need an admin account for that:
MICROSOFT_TRANSLATOR_API_KEY: set to a valid Microsoft Translator API key to use machine translation.
GOOGLE_ANALYTICS_KEY: set to a valid Google Analytics key to use Google Analytics.
MOZILLIANS_API_KEY: set to a valid Mozillians API key to grant permission to Mozilla localizers.
To sync your repository with upstream changes, just update the code using git:
git pull && git submodule sync --quiet && git submodule update --init --recursive
This software is licensed under the New BSD License. For more information, read the file