comparison packaging/README.linux-installer-l10n @ 822:71cdd4b2f038

Added documentation on l10n of the linux installer on how to update.
author Sascha Wilde <wilde@intevation.de>
date Fri, 18 Jul 2014 18:20:56 +0200
parents
children 96ecd345c961
comparison
equal deleted inserted replaced
821:6e300f749a6d 822:71cdd4b2f038
1 ----------------------------------------------------------------------
2 Localization of the GNU/Linux Installer
3 ----------------------------------------------------------------------
4
5 The GNU/Linux Installer uses a simple custom i18n implementation for
6 localization. Currently English (default) and German messages are
7 supported:
8
9 All messages in the Installer are written in English, a associative
10 array L10N_DE holds a German translations for the message strings.
11
12 If locale is set to any de_* localization (following the same
13 semantics as GNU gettext) and a German translation for the particular
14 message is available it will be printed in German, otherwise the
15 original English message will be used.
16
17
18 Relevant files
19 --------------
20
21 * linux-installer.inc.in :
22
23 Linux Installer Template, written in bash. l10n-enabled messages
24 are printed using the function "getxt" or "fatal" (which in turn
25 uses getxt for output). The semantics are these of printf and all
26 messages are in English.
27
28 * linux-installer.l10n-de :
29
30 This file contains the associative array L10N_DE which has the
31 English messages as used in linux-installer.inc.in as keys and the
32 corresponding German strings as values.
33
34 * getxt-gen-l10n-array.sh :
35
36 A tool to update the file linux-installer.l10n-de. Detailed usage
37 is described in the commends at the head of the file. It performs
38 the following steps:
39
40 1. collect all message strings used with "getxt" (or "fatal") in the
41 source file.
42
43 2. sort and remove any duplicates
44
45 3. merge with existing translations in the array file
46
47 4. write updated array to array file
48
49
50 How to update translations
51 --------------------------
52
53 When any messages in "linux-installer.inc.in" were changed or added
54 the array file "linux-installer.l10n-de" needs to be updated:
55
56 1. Edit "linux-installer.inc.in" (obviously)
57
58 2. Update the array file using getxt-gen-l10n-array.sh in the
59 packaging source directory (the directory containing this README):
60
61 $ ./getxt-gen-l10n-array.sh linux-installer.inc.in L10N_DE linux-installer.l10n-de
62
63 the associative array "L10N_DE" in "linux-installer.l10n-de" will
64 now contain entries for all new or changed messaged with empty
65 strings for the German translations.
66
67 CAVEAT: this means that if you change a message the translation
68 for the old message will be removed from "linux-installer.l10n-de"!
69 If you (slightly) change messages instead of adding or removing you
70 might want to keep a copy of the old version of
71 "linux-installer.l10n-de", so you can use the old translations as a
72 reference.
73
74 3. Edit "linux-installer.l10n-de" and add the missing translations.
75 They are best found by searching for empty strings, which are
76 denoted by two consecutive quotation marks: "" in your editor.
77
78 That's all. Don't forget to commit "linux-installer.l10n-de" along
79 with your changes to "linux-installer.inc.in".

http://wald.intevation.org/projects/trustbridge/