Bug#298972: mkvmlinuz: Please switch to gettext-based debconf templates
Tags: patch l10n
Using the "new" gettext format for debconf templates helps for templates
translations. For instance, detecting outdated or untranslated strings
becomes considerably easier. It also keeps track of who did which
The attached patch does the required modifications:
- debian/control modification for dependencies:
build-dep: debhelper (>= 4.1.16) which depends on po-debconf
depend: debconf (>= 1.2.0) since old versions have problems with templates
specifying the encoding of their content
- Add 'debconf-updatepo' to the clean target of your debian/rules
(to make sure that the relevant files are ready for translation in the
distributed source packages, and thus help translators)
- execute "debconf-gettextize debian/*templates*". This does:
- generate po/ directory containing all the translation mecanism
- change the template file to mark some strings as translatable by putting
a _ before the field name.
- mark the right strings as translatable in the templates. This is a manual
check to make sure that fields containing stuff which cannot be
translated such as kernel module name, and the one not shown to the users
are not marked as translatable.
For more details, see po-debconf documentation, especially "man 7
This patch also document the most important modifications in the changelog.
Use this as a sample, and please feel free to change it to fit your taste.
If you want to give me credit for this, write my name but avoid to publish
my email address there since I already get enough spam.
Please note that the suggested modifications will make your
package a little bit harder to backport to earlier Debian releases. If
this is a concern to you, you may try to adopt the method used by the
openssh package and detailed by Colin Watson in
This patch does not includes this method as this would make it too
invasive, IMHO. So, preserving backportability is up to you...
While I was working on the convertion to po-debconf, I noticed that the
templates of your package may be easily improved by applying the advices
contained at the following address:
I applied the advices from this document concerning the short descriptions,
but you may want to change the long descriptions accordingly as well, for
example to make them clearer even to newbies. Don't get me wrong, I don't
want to criticize, I just want the template to reach a translatable state
(ie quite stable) rather soon.
Once the switch is achieved, and style improvements are done (if any), I
guess that you will receive translations of your templates rather soon. They
will consist in XX.po files where XX is the code of the language they
contain. Simply put them to debian/po, add a changelog entry, and your
package is ready for rebuilding and uploading after the usual checks.
If you modify your templates in the future, no action is absolutely
mandatory from you to take care of the translations (outdated translations
will be automatically discarded). But it is nicer to your translators and
your not english speaking users to include the updated translations in the
same upload. For that, run debconf-updatepo, and mail each translator the
XX.po file they provided you. Their adress can be found in the headers of
the po file. Wait a few days so that they can do their work, and put the new
version of the po file back in position in debian/po before upload.
Thanks for helping the translators, and thus your non english speaker
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
diff -ruN mkvmlinuz-13.old/debian/control mkvmlinuz-13/debian/control
--- mkvmlinuz-13.old/debian/control 2005-03-10 21:54:34.000000000 +0100
+++ mkvmlinuz-13/debian/control 2005-03-10 21:55:52.000000000 +0100
@@ -3,12 +3,12 @@
Maintainer: Debian Kernel Team <email@example.com>
Uploaders: Sven Luther <firstname.lastname@example.org>, Jens Schmalzing <email@example.com>
-Build-Depends: docbook-to-man, debhelper (>= 4.0.0)
+Build-Depends: docbook-to-man, debhelper (>= 4.1.16)
+Depends: binutils, debconf (>= 1.2.0)
Description: create a kernel to boot a PowerPC machine from Open Firmware
This little program takes a PowerPC Linux kernel as an uncompressed
diff -ruN mkvmlinuz-13.old/debian/mkvmlinuz.templates mkvmlinuz-13/debian/mkvmlinuz.templates
--- mkvmlinuz-13.old/debian/mkvmlinuz.templates 2005-03-10 21:54:34.000000000 +0100
+++ mkvmlinuz-13/debian/mkvmlinuz.templates 2005-03-10 21:58:12.000000000 +0100
@@ -2,6 +2,6 @@
-Description: select your bootloader.
- Your PowerPC arch supports more than one bootloader,
- please chose the one you want to use.
+_Description: Bootloader to use:
+ Your PowerPC sub-architecture supports more than one bootloader, please
+ select the one you want to use.
diff -ruN mkvmlinuz-13.old/debian/po/POTFILES.in mkvmlinuz-13/debian/po/POTFILES.in
--- mkvmlinuz-13.old/debian/po/POTFILES.in 1970-01-01 01:00:00.000000000 +0100
+++ mkvmlinuz-13/debian/po/POTFILES.in 2005-03-10 21:56:43.000000000 +0100
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] mkvmlinuz.templates
diff -ruN mkvmlinuz-13.old/debian/po/templates.pot mkvmlinuz-13/debian/po/templates.pot
--- mkvmlinuz-13.old/debian/po/templates.pot 1970-01-01 01:00:00.000000000 +0100
+++ mkvmlinuz-13/debian/po/templates.pot 2005-03-10 21:58:15.000000000 +0100
@@ -0,0 +1,39 @@
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2005-03-10 21:58+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+#. Type: select
+msgid "Bootloader to use:"
+#. Type: select
+"Your PowerPC sub-architecture supports more than one bootloader, please "
+"select the one you want to use."
diff -ruN mkvmlinuz-13.old/debian/rules mkvmlinuz-13/debian/rules
--- mkvmlinuz-13.old/debian/rules 2005-03-10 21:54:34.000000000 +0100
+++ mkvmlinuz-13/debian/rules 2005-03-10 21:56:26.000000000 +0100
@@ -30,6 +30,8 @@
rm -f build-stamp configure-stamp
rm -f mkvmlinuz.8