Skip to content

diasks2/pontoon

 
 

Repository files navigation

Pontoon

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.

Installation

Pontoon is basedon on Playdoh. To set it up, you can either use Playdoh's official documentation or follow the steps below.

  1. Clone this repository or your fork:
  • git clone --recursive https://github.com/mathjazz/pontoon.git
  • cd pontoon
  1. 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
  1. Configure the settings:
  • cp settings/local.py-dist settings/local.py
  1. Set up the database:
  • mysql.server start
  • mysql -u root -e 'CREATE DATABASE pontoon CHARACTER SET utf8;'
  • ./manage.py syncdb --noinput && ./manage.py migrate
  • mysql -u root pontoon -e 'ALTER TABLE base_entity MODIFY string LONGTEXT COLLATE utf8_bin;'
  1. 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.

Mac users: please see workarounds in case you run into issues with installing requirements or syncing database.

Test project

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:

  1. Move or link main Pontoon project folder (pontoon/) to your web server's document root, which should be capable of running PHP.
  2. 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/
  1. 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

Local settings

Updates

To sync your repository with upstream changes, just update the code using git:

  • git pull && git submodule sync --quiet && git submodule update --init --recursive

Get involved

License

This software is licensed under the New BSD License. For more information, read the file LICENSE.