PO2DEBCONF(1)
π PO2DEBCONF(1) β po-debconf π
okay bestie, gather round, because this is the glow-up your translation workflow has been waiting for π«Ά this one lives in the po-debconf family and honestly? iconic.
β¨ NAME β¨
po2debconf β merge master templates file and PO files π
πΈ SYNOPSIS πΈ
po2debconf [-v] [-h] [--podir=DIR] [-o FILE] [-e STRING] master
π¦ DESCRIPTION π¦
so like, this program reads all your PO files plus a single templates file, and it produces a Debconf templates file that's got all the translations baked in β basically the same energy as the one debconf-mergetemplate(1) spits out (that's the one from the "debconf-utils" package, iykyk). and where does it go looking for PO files? by default it searches in the po subdirectory below the location of the master file. cute, right?
now, for the Norwegian BokmΓ₯l language code transition, the no and nb language codes get special treatment π§ if no.po exists, it should be renamed to nb.po. using nb.po will make both "-no" and "-nb" translations available in the templates file. slay.
lines beginning with a number sign ("#") are comments in templates files. they're super useful for giving hints to translators, and po2debconf just discards them, no cap. but!! special comments have been introduced in "po-debconf" 1.0. they look like "#flag:directive". and the "#flag:partial" is the only directive that po2debconf actually interprets. here's the tea: normally when a field is composed of several paragraphs (like "__Choices" and "_Description"), it gets translated only if all paragraphs are translated. but when a field contains "#flag:partial", translated strings may be mixed with untranslated strings. periodt π
π OPTIONS π
-h,--helpβ display a usage summary and exit. bye bestie π-v,--verboseβ process in verbose mode. she's chatty and we love that β¨--podir=DIRβ set directory for PO files. default is to search PO files in theposubdirectory below the location of the master file.-o,--output=FILEβ set output filename (default is standard output).-e,--encoding=STRINGβ convert encoding. the argument can take 3 values:"utf8"β convert to UTF-8 π"po"β do not change encoding"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 looks like:
#
# Number is comment sign
#
cs ISO-8859-2
da ISO-8859-1
de ISO-8859-1
el ISO-8859-7
etc.
fun lore moment: the default encoding used to be"popular", and it has been switched to"utf8"since po-debconf0.9.0. glow-up fr fr π
π OUTPUT FORMAT π
since debconf 1.2.0, the templates format has changed β encoding is part of field names now, i.e. they're "foo-lang.encoding". and when older debconf encounters such fields? they are silently ignored, which means the original text gets 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 "foo-lang.encoding") and the second field is the encoding, e.g.
echo '2 utf8' > po/output
let po2debconf convert text to UTF-8. no cap π
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. protecting the elders, honestly π
π SEE ALSO π
π AUTHOR π
Denis Barbier <barbier@linuxfr.org> β legend behavior, honestly π
and that's the whole vibe, bestie β this page came straight out of po-debconf, dated 2025-12-07, and it's giving main character energy from start to finish. go translate something gorgeous π β¨
π¦ where this page comes from
- ubuntu resolute: po-debconf 1.0.22 Β· GPL-2.0-only OR GPL-2.0-or-later
- ubuntu stonking: po-debconf 1.0.22 Β· GPL-2.0-only OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms