wiki:TranslationSystem

Version 1 (modified by romw, 11 years ago) (diff)

--

BOINC Translation System

The BOINC translation system is broken into three phases.

Template Construction

This phase is primarily a manual operation. If the automated framework consumes an invalid or empty template file all existing translations will be thrown away.

To manually update a template run the 'build_po' scripts in the given area of interest:

  • boinc/doc (BOINC-Web.pot)
  • html/user (BOINC-Project-Generic.pot)
  • boinc/client (BOINC-Client.pot)
  • boinc/clientgui (BOINC-Manager.pot)
  • boinc/mac_installer (BOINC-Setup.pot)

To update the Android localization template execute:

cd boinc/android
a2po export -v

After verifying that the updated templates have the correct string to translate and a PO header go ahead and commit the changes.

All templates are stored in /boinc/locale/templates.

Translation

Twice daily a cron job kicks off the process of committing all changes and updating existing languages using the new templates.

Pootle takes care of the bulk of this with the following commands (pootle/update.sh):

/usr/bin/pootle commit_to_vcs --project boinctrunk
/usr/bin/pootle update_from_vcs --project boinctrunk
/usr/bin/pootle update_against_templates --project boinctrunk
/usr/bin/pootle refresh_stats --project boinctrunk

Post Translation Updates

After all the latest updates have been committed the compiled PO files need to be updated. The end of the pootle/update.sh file executes boinc/locale/updatetrans.sh which handles compiling the PO files into MO files.

Converting the Android PO file back into the native Android localization system XML files involves executing:

a2po export -v