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.
Pontoon is basedon on Playdoh. To set it up, you can either use Playdoh's official documentation or follow the steps below.
- Clone this repository or your fork:
git clone --recursive https://github.com/mathjazz/pontoon.git
cd pontoon
- Create and set up the virtual environment:
virtualenv --no-site-packages env
source env/bin/activate
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:
./manage.py runserver
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.
cd Source
python setup.py configure
make
cp -R pysvn pontoon/env/lib/python2.X/site-packages/
- Run project from localization files stored in SVN repository:
./manage.py update_projects
You can also add your own project at http://localhost:8000/admin/, but you need an admin account for that:
./manage.py createsuperuser
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 LICENSE
.