Updating translations using Launchpad

This document describes how to update the translations in an Evergreen branch by pulling them from Launchpad, as well as update the files to be translated in Launchpad by updating the POT files in the Evergreen master branch.

Prerequisites

You must install all of the Python prerequisites required for building translations, per http://evergreen-ils.org/dokuwiki/doku.php?id=evergreen-admin:customizations:i18n

If you are using a supported operating system, you can use this simple command to install the necessary dependencies:

make -f Open-ILS/src/extras/Makefile.install <osname>-translator

Otherwise, install the following dependencies using the method that works best for your system. For python packages, you will want to use the python 3 version:

Updating the translations

  1. Check out the latest translations from Launchpad by branching the Bazaar repository:

    bzr branch lp:~denials/evergreen/translation-export

    This creates a directory called "translation-export".

  2. Ensure you have an updated Evergreen release branch.

  3. Run the build/i18n/scripts/update_pofiles script to copy the translations into the right place and avoid any updates that are purely metadata (dates generated, etc).

  4. Commit the lot! And backport to whatever release branches need the updates.

  5. Build updated POT files:

    cd build/i18n
    make newpot

    This will extract all of the strings from the latest version of the files in Evergreen.

  6. (This part needs automation): Then, via the magic of git diff and git add, go through all of the changed files and determine which ones actually have string changes. Recommended approach is to re-run git diff after each git add.

  7. Commit the updated POT files and backport to the pertinent release branches.