wiki:TranslationSystem

Version 7 (modified by romw, 9 years ago) (diff)

--

Translating BOINC

The translation of BOINC involves several steps:

  • Generate "templates" (.pot files) containing translatable strings from the BOINC source code.
  • Commit updated template(s).
  • Volunteers translate the strings on Transifex.
  • Updated translations are automatically committed to the BOINC Git repo on GitHub?.
  • Deploy the new translations.

BOINC is divided into the following components, each with its own template file:

Component directory Template file Command
BOINC web site doc/ BOINC-Web.pot build_po.php
Project web site html/user/ BOINC-Project-Generic.pot html/ops/build_po_boinc.php
Client client/ BOINC-Client.pot build_po
Manager clientgui/ BOINC-Manager.pot build_po
Mac installer mac_installer/ BOINC-Setup.pot build_po
Android GUI android/ BOINC-Android.pot a2po export -v

All template files are stored in locale/templates/ in the BOINC repo. The translations for language X are stored in locale/X/.

Software releases

Translation activity takes place in master. When a release branch (client or server) is created, its translations are the contents of locale/ at that point. If translations change after that, or new translatable strings are added to the branch, we'll need to back-port changes to the .po files.

Template generation

If a faulty template file is committed to the BOINC repo and picked up by Pootle, all existing translations will be lost. Therefore manual validation is used.

The process is as follows:

  • Templates are updated as needed, Rom and/or David generate a new template file.

If it's valid, they move it to locale/templates and commit it.

Translation

Translation is handled via the Transifex web portal. Using the TransifexGithub? bridge software, templates and completed translations are kept in sync between Transifex and Github.

Deployment

The BOINC web site

The BOINC web code expects translation files to be in ../languages/translations/. On the BOINC web server, this directory contains symbolic links from X.po to ../../locale/X/BOINC-Web.po.

'When we add a new language, we need to add a new symbolic link.'

Deploying new translations requires running the script doc/update_translations.php, which converts the .po files to a PHP translation array. This is done from cron.

Project web sites