1DEBCONF-GETTEXTIZE(1)             po-debconf             DEBCONF-GETTEXTIZE(1)
2
3
4

NAME

6       debconf-gettextize - extract translations of debconf templates into PO
7       files
8

SYNOPSIS

10       debconf-gettextize [-v] [-h] [--podir=DIR] [--choices] [--merge] master
11       [master ...]
12

DESCRIPTION

14       The /var/lib/dpkg/info/*.templates files read by debconf contain
15       English text and translations in the same file.  But in source
16       packages, translations are managed in separate files to help
17       translators.  In the initial implementation, a master templates file
18       contained only English text, and templates.xx files contained both
19       original and translated strings for the language xx.  The debconf-
20       mergetemplate program was merging master and translated templates
21       files.
22
23       The new implementation with "po-debconf" is based on "gettext".
24       Maintainers mark translatable fields by prepending them with an
25       underscore, English strings are automatically extracted into a POT
26       file, translators work on normal PO files, and po2debconf generates a
27       merged templates file with the same structure.
28
29       The debconf-gettextize program was initially designed to help migrating
30       to the new implementation.
31
32       • It reads a list of master files and their associated translations,
33         and generates po/*.po files for each language containing translated
34         strings.
35
36       • Each input file receives an ".old" suffix, and a new master file
37         overwrites the old one; it is identical to the previous master file
38         except that an underscore is prepended to translatable fields.
39         Developers can then choose which fields translators have to work on
40         and which ones are skipped because their values are not locale-
41         dependent.
42
43       • A po/POTFILES.in file is also created, it contains the list of
44         templates files debconf-updatepo has to process.
45
46       Typically the debconf-gettextize program must be run only once when
47       transforming from the first implementation to the "po-debconf" format,
48       but it can also be used afterwards to transform a "_Choices" field into
49       "__Choices" (or vice-versa) without losing translations, when using the
50       "--merge" flag (alongside with "--choices" or not).  The desired
51       template containing the "_Choices" or "__Choices" fields to modify has
52       to be copied into a temporary template file, which is passed to
53       debconf-gettextize as an argument.  Then the following steps are
54       performed:
55
56       1. po2debconf is run on this template file to generate a translated
57          templates file.
58
59       2. This translated templates file is processed as described above and
60          PO files are generated.
61
62       3. Newly created PO files are merged with existing ones.
63
64       When PO files are merged, "_Choices" fields have to be replaced by
65       "__Choices" (or vice-versa) in the original templates file before
66       running debconf-updatepo, otherwise new translations will be fuzzy.
67

OPTIONS

69       -h, --help
70           Display a usage summary for the program and exit.
71
72       -v, --verbose
73           Process in verbose mode.
74
75       --podir=DIR
76           Set directory for PO files.  Default is to search for PO files in
77           the po subdirectory below the location of the first master file.
78
79       --choices
80           By default, debconf-gettextize replaces "Choices" fields by
81           "_Choices".  With this flag, "__Choices" fields are written
82           instead.
83
84       --merge
85           When this flag is set, the strings are merged with existing PO
86           files.  The templates files and po/POTFILES.in are not modified.
87

CAVEATS

89       The "Default" field is special when template type is "Select" or
90       "Multiselect", because a value has to be chosen amongst the English
91       list of choices, even for localized values.  Normally this field must
92       not be changed, but in rare circumstances localized values are
93       meaningful (e.g. to choose the default language of an application).  In
94       order to let translators know that this localized "Default" field is
95       special, you must by convention call it "_DefaultChoice" instead of
96       "_Default".
97

SEE ALSO

99       debconf-updatepo(1), po2debconf(1), debconf-devel(7), po-debconf(7).
100

AUTHORS

102         Denis Barbier <barbier@linuxfr.org>
103         Martin Quinson <martin.quinson@ens-lyon.fr>
104
105
106
107                                  2022-07-22             DEBCONF-GETTEXTIZE(1)
Impressum