Translating Debian packages' descriptions
i'm starting a new thread to make a summary. Whenever i use translation, i
mean a translation of the text contained in a Description field of a
What is proposed :
- the translations collected by the ddts may be packaged and
installed in a directory that i'll call "desc.d" for the
moment (packages would be per language, ie package-description-<lang>)
- those translations could be thrown in the packages themselves
on a regular basis, ie the package itself would install the
translations in another file in "desc.d"
This does allow the maintainer to control the descriptions, because
those provided by the package itself would have an higher priority.
- an update tool would merge the translations available in the "desc.d"
directory and create a "package-description.mo" files containing all
the translations (of a single language)
- dpkg, apt, dselect just needs to be modified to call dgettext
on the english description to get back a translated description
(which will be found in "package-description.mo" by gettext itself)
That's pretty easy.
The real drawbacks that have been identified :
- whenever there's a new package, people won't have the translation
unless the package-description-<lang> package has been already
(the same applies if an already existing package has changed its
- people following unstable may loose some translations for some
old packages installed and where the description changed
Those drawbacks are real, but you should think about we wanna
achieve and what is important for us. There may have been other drawbacks
identified but they were not specific to this system but always
generic problems related to translations (encoding, delay to update
translation, and so on, they are of no interest here, we have always had
to face them and it can continue this way).
My opinion on all this :
For the first drawback, there's no solution I can think of. However
what is truly important I think is that a stable release has package
descriptions as much translated as possible. And since package description
don't change in a stable release, there's no problem and there's also no
new packages added to stable.
If unstable/testing users loose a description from time to time when
their package is either not up-to-date or too much recent (ie with a
modified description not yet updated in all languages), I don't
consider that as a problem. In the contrary, it's a good way for them
to recall that this translation of the description is missing or needs to
be updated ;)
For the second drawback, we may adapt the update tool to scan for
installed packages and keep the corresponding translations in a separate
file. Of course, if they have an old .deb lying around and install it
after, they won't have a translated description either. But it's so
anecdotic that I can't understand that we would refuse the proposed scheme
and keep the actual state (that is no translations at all!) just
because of that.
I undertstand that including all the translations in the control file
itself and in the Packages files is the ultimate solution. But it's not
acceptable actually. Just because of the size issue. Packages files are
already big enough (hello modem users!). One day we'll probably switch to
that, and it can even be quite easy if Joey Hess accepts something
like a dh_installl10ndesc for debhelper.
Also, I like that we use the gettext mechanism because at least we
have no translated description when it has been updated instead of
an outdated description. Better have a correct english description
than a wrong translated one. This problem is common with debconf
 For example, using my "fr" environnment I could'n reconfigure
debconf to use the Gnome frontend, it wasn't listed in the
proposed choices because the french translation was outdated and
didn't include the new Gnome frontend. The contrary can happen,
a choice has been removed but my french translation does still
propose it :(
I should have submitted a bug about this so that we can find a
solution for debconf ...
Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/
Le bouche à oreille du Net : http://www.beetell.com
Naviguer sans se fatiguer à chercher : http://www.deenoo.com
Formation Linux et logiciel libre : http://www.logidee.com