Guides

Extending Serge

Pootle Synchronization Plugin

This plugin provides integration with Pootle — a free open-source online translation server software. On push-ts sync step, Serge will tell Pootle to scan generated translation files and update its internal translation database so that the new content becomes available for translation online. Respectively, on pull-ts sync step, Serge will tell Pootle to synchronize all the translations back into translation files.

Currently the only supported format for translation files is .PO (used in GNU gettext toolchain), which is natively supported by Pootle.

Communication between Serge and Pootle is performed by the means of running Pootle's command-line API tool (the script is called manage.py). Note that this means that Pootle must be installed on the same machine as Serge. Please refer to Serge + Pootle configuration guide for more information.

Each configuration file in Serge represents a single translation project, and maps to a single specific project in Pootle. The typical workflow is this:

Install Pootle and set it up that it's root directory with .po files is e.g. /var/serge/po/

Run serge localize my_project.serge to make sure everything works; after this step, you get .po files in your output directory

Go to Pootle and add a new project with my_project code; Pootle will automatically know that its files are located under /var/serge/po/my_project/ folder

Edit your Serge configuration file to add a sync/ts section (see the example below), and specify my_project as a value for project_id parameter

Run serge push-ts my_project.serge to push your translations into Pootle for the first time, then go to Pootle's translation UI and see if everything works as expected

Later you will run serge sync continuously against this configuration file, which will perform the two-way sync between Serge and Pootle among other synchronization/localization steps. See Localization Cycle for more information.