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

Re: new proposal: Translating Debian packages' descriptions

On Wed, Sep 05, 2001 at 01:40:47AM +0200, Richard Atterer wrote:
> On Tue, Sep 04, 2001 at 08:55:32PM +0200, Michael Bramer wrote:
> > On Tue, Sep 04, 2001 at 07:59:47PM +0200, Richard Atterer wrote:
> > 
> > > > 2.) get the .po/.mo files on the system
> > > [snip]
> > > >    If we don't like this process on the client all the time, we can
> > > >    produce Descriptions-XX.po files and the clinet must only
> > > >    download this file and save this in the right dir. But this file
> > > >    will include the orignal description and with this it has the
> > > >    double size and download time.
> > > 
> > > I don't know enough about gettext - am I assuming correctly that in
> > > the .mo file, the English translation is replaced with a checksum or
> > > similar, so you do not need to store the complete English translation?
> > 
> > see in the info page from gettext.
> [snip]
> > You see in the mo file is the orignal description.
> OK, then why do you say above "But [the .po] will include the orignal
> description and with this it has the double size"? Doubled size
> compared to what? Packages-XX?

Oh, I will explain:

We can make two things: 
1.) Description-XX file

  In this file are only the Packagname and the Description (and maybe
  the version), like:
   !Package: foo
   !Description: trans of bar of foo
   ! trans of first line
   !Package: foo2
   !Description: trans of headline of foo2
   ! trans of first section of foo2

  You see this file will not have the orignal description. Apt must
  combine this file with the normal Packages file and make with the
  orignal description of the Packages file a .po file.

  (The .po file must have the orignal description.)

2.) Description-XX.po file

  This is a normal po file. This File have the orignal description
  with the translation, like:
   !msgid "bar of foo\n"
   ! "first line"
   !msgstr "trans of bar of foo\n"
   ! "trans of first line"
   !msgid "headline of foo2\n"
   ! "first section of foo2"
   !msstr "trans of headline of foo2\n"
   ! "trans of first section of foo2"

  You see this file has the double size. But the client must not
  generate the .po file. It must only copy this file in the right

You understand it now?

> > if dpkg use gettext, dpkg show the translation of all textes in the
> > mo file. And if you use apt-get update you have the translation of
> > all packages (from the apt source) in the .mo file.
> Right, the Descriptions-XX.po.gz needs to contain all translations.
> Sorry, I mixed things up.
> (BTW, wouldn't it make sense to represent the English translation only
> with a checksum in Descriptions-XX? We'd save a lot of space...)

yes, I make this with the ddts. But gettext don't work like this. If
you use gettext (like other programs), you must have a .po file, make
a .mo with this file and only use it. 

You can use your own way (like checksum, etc.) and don't use gettext.
But now you must re-inventing the wheel, with all gettext features.

And in Descriptions-XX we don't need checksum, we have the package
name and maybe the version. With this we can assign the translation to
the orignal description.

> What do you think of my main point: Since we already have an override
> facility with the Descriptions-XX.po.gz, why should we bother
> introducing another override mechanism which modifies the
> control.tar.gz? OK, dpkg --info will not work until the maintainer
> catches up, but most people use dselect or "apt-cache show".

If we use my proposal, the information in control.tar.gz will only
used by dpkg --info and from katie to produce the Description-XX[.po]

All other outputs use gettext and no special files from dpkg, control,

Michael Bramer  -  a Debian Linux Developer http://www.debian.org
PGP: finger grisu@db.debian.org  -- Linux Sysadmin   -- Use Debian Linux
"Every use of Linux is a proper use of Linux."
              -- John "Maddog" Hall, Keynote at the Linux Kongress in Cologne

Attachment: pgpnxwADLzZ56.pgp
Description: PGP signature

Reply to: