]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/modules/development/pages/updating_translations_launchpad.adoc
LP2061136 - Stamping 1405 DB upgrade script
[Evergreen.git] / docs / modules / development / pages / updating_translations_launchpad.adoc
1 = Updating translations using Launchpad =
2 :toc:
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 You must install all of the Python prerequisites required for building
10 translations, per
11 http://evergreen-ils.org/dokuwiki/doku.php?id=evergreen-admin:customizations:i18n
12
13 If you are using a supported operating system, you can use this simple command to 
14 install the necessary dependencies:
15
16 [source, bash]
17 ------------------------------------------------------------------------------
18 make -f Open-ILS/src/extras/Makefile.install <osname>-translator
19 ------------------------------------------------------------------------------
20
21 Otherwise, install the following dependencies using the method that works
22 best for your system.  For python packages, you will want to use the python 3
23 version:
24
25 * https://bitbucket.org/izi/polib/wiki/Home[polib]
26 * http://translate.sourceforge.net[translate-toolkit]
27 * http://pypi.python.org/pypi/python-Levenshtein/[levenshtein]
28 * http://pypi.python.org/pypi/setuptools[setuptools]
29 * http://pypi.python.org/pypi/simplejson/[simplejson]
30 * http://lxml.de/[lxml]
31
32 == Updating the translations ==
33
34 . Check out the latest translations from Launchpad by branching the Bazaar
35 repository:
36 +
37 [source,bash]
38 ------------------------------------------------------------------------------
39 bzr branch lp:~denials/evergreen/translation-export
40 ------------------------------------------------------------------------------
41 +
42 This creates a directory called "translation-export".
43 +
44 . Ensure you have an updated Evergreen release branch.
45 . Run the `build/i18n/scripts/update_pofiles` script to copy the translations
46   into the right place and avoid any updates that are purely metadata (dates
47   generated, etc).
48 . Commit the lot! And backport to whatever release branches need the updates.
49 . Build updated POT files:
50 +
51 [source,bash]
52 ------------------------------------------------------------------------------
53 cd build/i18n
54 make newpot
55 ------------------------------------------------------------------------------
56 +
57 This will extract all of the strings from the latest version of the files in
58 Evergreen.
59 +
60 . (This part needs automation): Then, via the magic of `git diff` and `git add`,
61 go through all of the changed files and determine which ones actually have
62 string changes. Recommended approach is to re-run `git diff` after each
63 `git add`.
64 . Commit the updated POT files and backport to the pertinent release branches.