From Sugar Labs
Jump to navigation Jump to search


Additional urls:

Hosted on


Administrative contact

  • translate AT sugarlabs DOT org


For non-emergency calls, preferably send email to the administrative contact.

Language Administrators

Language administrators are typically native speakers of a given language that take on responsibility (granted by a Pootle administrator after a request to the Localization list) for reviewing and committing PO files for a given language. Contacting language administrators is generally done by posting to the Localization list.

More information on language administrator duties can be found on this page


Home /var/lib/pootle


Logs /var/log/apache2



80 HTTP server

Upgrade notes

  • A backup of the DB and pootle must be done also.
  • Backup of the /var/lib/pootle structure
  • New versions of Django and Translate toolkit must be installed first
  • Restore localsettings and DB backup

Mantainance Notes

Pootle in Sugar is maintained. (dirakx has step-up to be maint)

We (godiard / martin_xsa / erikos / dirakx / Bernie / Dogi) are trying to resolve the pending issues because we need working translations.

To date translations are working, we are working in a new VM pootle-devel to test upgrades of the Pootle/Django/Translate-toolkit stack.

The last maintainer was Sayamindu Dasgupta and we asked he our doubts, i am putting here this information.


Important files and directories in the root directory, /var/lib/pootle.

Sources are checked out in this directory and being used to keep final .pot and .po files. The hierarchy is:


Pootle uses this directory as a sources of files to translate, it contains symlinks to files from the checkouts directory. The hierarchy is:


Contains some sugar-specific scripts to help maintain our Pootle instance, they are managed in

This is an Ini file that contains configuration for all used sources repositories. Each section describes one sources repository, where section name is full path to the directory with sources, and contains following options:

  • project required, meaning-less project name;
  • vcs required, the type of VCS for; supported values are: git;
  • method required, the method how to generate .pot files from sources; supported values are: bundlebuilder for activities, intltool for intltool based projects;
  • layout required, ?;
  • ignore-files optional, the semicolon separated list of file paths that are relative to the sources root; if method is bundlebuilder this value will be used to ignore while producing .pot files;


  • potupdater/ pulls from git and svn so we have updated sources, then it generates a new .pot file from them. Translated strings get reflected in the .po files in each module, and when the language maintainer clicks the Commit to VCS link, get pushed back to the upstream module.
  • admin/ checkout sources.
  • misc/pootle.cron all daily basis routines.
  • ...


Create new Pootle project

There's a script called[1] It is invoked as category GIT_URL checkout_directory [branch] So, assuming the directory /var/lib/pootle/translations/glucose92 exists, you can issue these commands:

  • Create new project in Pootle admin menu, admin->projects;
  • Add all needed langs;
  • Add new section to the project_list.ini file to describe new .pot location;
  • Run misc/pootle.cron script from pootle user to generate all sufficient files;
  • Call Update from templates for all languages in newly created project to peek up .po files symlinked by misc/pootle.cron script.

Adding activities

  • Do:

Note:The git url must be writable by Pootle.

2!root@pootle:/var/lib/pootle/maintenance/helpers/admin# sudo -u pootle python ./  honey git:// fototoon
******** Cloning git:// to /var/lib/pootle/checkouts/honey/fototoon *********
Running git clone git:// /var/lib/pootle/checkouts/honey/fototoon
Initialized empty Git repository in /var/lib/pootle/checkouts/honey/fototoon/.git/
******** Switching to branch master *********
Running  git checkout --track -b master origin/master
Running git pull
Already up-to-date.
********* Git operation completed, moving to next stage ********
********* Searching for POT file *********
********* Found POT file FotoToon.pot *********
********* Starting to symlink files *********
 Linking /var/lib/pootle/checkouts/honey/fototoon/po/es.po to /var/lib/pootle/translations/honey/es/fototoon.po
 Linking /var/lib/pootle/checkouts/honey/fototoon/po/fr.po to /var/lib/pootle/translations/honey/fr/fototoon.po
 Linking /var/lib/pootle/checkouts/honey/fototoon/po/FotoToon.pot to /var/lib/pootle/translations/honey/templates/fototoon.pot
********* Done Symlinking *********
  • Do update from templates on the templates project on Pootle's frontend.
  • Then run the script in order to have all the lang.po in place.
  • Then your activity must be in place to be translated and commit to VCS/update from VCS links must be activated.

Working with git in the pootle server

The git operations must be done by the pootle user:

sudo -u pootle git log
sudo -u pootle git push origin  sucrose-0.82

This script tell you when you can update different clones of activities, when new strings are added via gettext in each repo.


Other important script is this script re-generates pot in each repo.

Resolving conflicts

If the maintainer did a commit with a file in the po directory we will have a conflict, and Pootle can not do a pull.

Pootle build the pot file from the sources, if we compare and the translations are updated in pootle we can do a pull preserving the info in pootle:

sudo -u pootle git pull -s ours

Checking that pootle is working

  • When commiting from pootle interface, repos in git reflect the commit as something similar to:
pootle pushed 3fd0cf7b to taportfolio/mainline:master
on March 04, 2011 01:32
Commit from Sugar Labs: Translation System by user cjl.: 2 of 25 messages   translated (0 fuzzy).
  • (in cronjob), it's also giving mails with info like:
Already up-to-date. or
####### Checking POT for Write (master) ######


  • How to manipulate users:
django-admin shell --settings=pootle.settings
>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username='bernie')
>>> u.is_superuser = True
  • Refresh stats, needed when the database and the checked out modules get out of sync:
sudo -u pootle django-admin refresh_stats --settings=pootle.settings
  • If you have a commit error file because of only read git url, please rm the old /var/lib/pootle/checkouts/ files related with that activity or project and re run pootlepopulator.
  • Also if there are errors related with git add, is likely that some lang.po files are not versionated on pootle server, please run git add . inside the activity or project.
  • When there are commit to cvs/update to cvs links missing in activities or projects please check git url in .git/config , this URL must be writable by pootle.