merge master templates file and PO files
see also :
debconf-gettextize - debconf-updatepo
DIR ] [-o
FILE ] [-e
STRING ] master
add an example, a script, a trick and tips
po2debconf debian/netcfg-common.templates ) \
(echo ; po2debconf
po2debconf debian/netcfg-common.templates )\
reads all PO files and a single
templates file, and produces a Debconf templates file
containing all translations, similar to the one produced by
debconf-mergetemplate(1) (from the
PO files are by default searched in the
po subdirectory below the location of the master
To help the
language code transition for Norwegian Bokmål, the
no and nb language codes are handled
specially. If no.po exists, it should be renamed to
nb.po. Using nb.po will make both
"-nb" translations available in the
with a number sign ("#") are comments in
templates files. They are useful to give hints to
translators, and are discarded by po2debconf. Special
comments have been introduced in
"po-debconf" 1.0. They are in the
The "#flag:partial" is the only directive
interpreted by po2debconf. Normally when a field is
composed of several paragraphs (like
"_Description"), it is translated if all
paragraphs are translated. When a field contains
"#flag:partial", translated strings may
be mixed with untranslated strings.
Display a usage summary and
Process in verbose mode.
Set directory for
PO files. Default is to search
PO files in the po subdirectory below
the location of the master file.
Set output filename (default is
Convert encoding. Argument can
take 3 values: "utf8" (convert to
UTF-8 ), "po" (do
not change encoding) and "popular"
(convert encoding of input files depending on their
language; the "PODEBCONF_ENCODINGS"
environment variable must point to a name of a file
containing the encoding map).
Such a filename
# Number is comment sign
encoding used to be "popular", and has
been switched to "utf8" since po-debconf
Since debconf 1.2.0, templates format has changed, encoding is
part of field names, i.e. they are
When older debconf encounter such fields, they are silently
ignored, which means that original text is displayed.
If present, a po/output file can override defaults for
encoding and output format. It contains a single line with two
fields. The first field is the output format (currently valid
values are 1 for fields in the form
"foo-lang", and 2 for
the second field is the encoding, e.g.
echo '2 utf8' > po/output
let po2debconf convert text to UTF-8 .
When encoding is set to "po" or "utf8", output
format is always set to 2, so that older debconf do not try to
display text with wrong encodings.
Denis Barbier <barbier[:at:]linuxfr[:dot:]org>