]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/development/updating_translations_launchpad.adoc
Change all docs filenames to .adoc
[Evergreen.git] / docs / development / updating_translations_launchpad.adoc
1 Updating translations using Launchpad
2 =====================================
3
4 This document describes how to update the translations in an Evergreen branch
5 by pulling them from Launchpad, as well as update the files to be translated
6 in Launchpad by updating the POT files in the Evergreen master branch.
7
8 Prerequisites
9 -------------
10 You must install all of the Python prerequisites required for building
11 translations, per
12 http://evergreen-ils.org/dokuwiki/doku.php?id=evergreen-admin:customizations:i18n
13
14 * https://bitbucket.org/izi/polib/wiki/Home[polib]
15 * http://translate.sourceforge.net[translate-toolkit]
16 * http://pypi.python.org/pypi/python-Levenshtein/[levenshtein]
17 * http://pypi.python.org/pypi/setuptools[setuptools]
18 * http://pypi.python.org/pypi/simplejson/[simplejson]
19 * http://lxml.de/[lxml]
20
21 Updating the translations
22 -------------------------
23
24 . Check out the latest translations from Launchpad by branching the Bazaar
25 repository:
26 +
27 [source,bash]
28 ------------------------------------------------------------------------------
29 bzr branch lp:~denials/evergreen/translation-export
30 ------------------------------------------------------------------------------
31 +
32 This creates a directory called "translation-export".
33 +
34 . Ensure you have an updated Evergreen release branch.
35 . Run the `build/i18n/scripts/update_pofiles` script to copy the translations
36   into the right place and avoid any updates that are purely metadata (dates
37   generated, etc).
38 . Commit the lot! And backport to whatever release branches need the updates.
39 . Build updated POT files:
40 +
41 [source,bash]
42 ------------------------------------------------------------------------------
43 cd build/i18n
44 make newpot
45 ------------------------------------------------------------------------------
46 +
47 This will extract all of the strings from the latest version of the files in
48 Evergreen.
49 +
50 . (This part needs automation): Then, via the magic of `git diff` and `git add`,
51 go through all of the changed files and determine which ones actually have
52 string changes. Recommended approach is to re-run `git diff` after each
53 `git add`.
54 . Commit the updated POT files and backport to the pertinent release branches.