4.4. Debconf-updatepo and po-debconf tools

Tools in the po-debconf package are mostly aimed for maintainers use. The central tool is the debconf-updatepo utility. This utility should be run each time a change happens in debconf templates, i.e. most often the files names *.templates in the debian/ directory of the package source tree.

debconf-updatepo looks for all files listed in the debian/po/POTFILES.in and search in these files for translatable strings. Instructions on how to set a debconf string as translatable are given in the po-debconf(7) man page. This can be summarised as "just put an underscore character before the field names".

All translatable strings are written by debconf-updatepo in a "template file" named debian/po/templates.pot. In the same time, all PO files that are present in debian/po are updated with regards of the new strings.

Changed strings are marked fuzzy (thus keeping the old translation) or untranslated. In such case, the old translation is kept as obsolete entries et the end of the PO files.

"fuzzy" strings translations are never used. When a debconf template includes more than one fuzzy string, the whole template will be shown untranslated to users.

Maintainers should run debconf-updatepo as soon as they change templates. Some i18n maintainers recommend running it in the package clean target to ensure that all PO files AND the POT file are up-to-date. There is nothing worse than a package with obsolete files. Some other maintainers rule against running debconf-updatepo in the clean target as this is likely to modify files in the debian/ directory.

Rebuilding the templates file that will be shipped with the package, as of debian/<package>/DEBIAN/templates is the job of po2debconf. This utility is auto-magically called by dh_installdebconf for developers that use debhelper tools. This is actually a very good argument for using debhelper tools for packages that use debconf.

The final templates file uses the encoding defined in debian/po/output. The default value is "utf8". It is highly recommended to use "utf8" in all cases. There is actually no good reason to use anything else. This will not affect the way the templates will be displayed, even in non UTF-8 environments.

4.4.1. The podebconf-report-po utility

The podebconf-report-po utility is aimed to send notices about needed updates to all translators who have incomplete files (at least one fuzzy or untranslated string).

Using it before planning an upload of a package with modified templates is strongly recommended. Translators do not really like to discover changes and needed updates after a package has been uploaded.

When using this utility, maintainers should remember that many translation teams need time for their internal QA processes to take place. Leaving only a few days for translators to update their work, especially when important changes occurred, is nearly similar to a call for bad translations.