[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new proposal: Translating Debian packages' descriptions

On Tue, 4 Sep 2001, Martin Quinson wrote:

> On Tue, Sep 04, 2001 at 02:52:40PM +0200, Simon Richter wrote:
> > On Tue, 4 Sep 2001, Michael Bramer wrote:
> >
> > > After I read some more mails and write some comments myself, IMHO it
> > > is time to write a newer hopefully better proposal. Not all is new.
> > > But I add some new thoughs and some parts from some comments.
> >
> > We can reduce the download size by 50% by letting the ddts database decide
> > which translations are still up to date and pack only those into the
> > downloadable file. It won't be a .po file, but it will be smaller.

> You can also have the ddts building po files with only the uptodate
> translations in it. So, it will be smaller, and you still can use the
> gettext mecanism.

This is a very good point that I think hasn't received enough attention yet.
The gettext mechanism of resolving translations is an important one to make
use of, but it /doesn't/ have to take place on the end user machine.  We have
an additional, guaranteed-unique index that we can use on description
translations: the package name and version.

The end user needs exactly one translated description per language for each
package name and version that's present in the Debian archive.  If there is
more than one translation for the same original text, one is out of date --
drop it.  If there are translations that don't match the descriptions on any
packages in the current archive, discard them -- they don't belong in any file
that we're sending to users.  If there are packages installed on a system that
are no longer present in the archive, the translated descriptions should be
stored on the local system: it should not be expected that the archive will
keep track of these outdated translations.

With such a structure, it doesn't matter what the precise lookup mechanism is
for finding the translations on the end user machine.  The translations can
still be stored in .po files if you like -- gettext is very nice, after all --
and use full text of the original description as the key for lookups, as is
done with most gettext stuff.  Or you can use package_version-deb.version as
the key, which is bound to be a little more efficient.  Or you can use any
other mechanism that can look up the translation based on the
(language,package,version) tuple -- including storing the requested
translations in {the,a} Packages.gz file and in /var/lib/dpkg/available.

This is not such a complicated thing that "reinventing the wheel" is

Steve Langasek
postmodern programmer

Reply to: