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

Re: new proposal: Translating Debian packages' descriptions



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.

from the info page:
...
   Then, at offset O and offset T in the picture, two tables of string
descriptors can be found.  In both tables, each string descriptor uses
two 32 bits integers, one for the string length, another for the offset
of the string in the MO file, counting in bytes from the start of the
file.  The first table contains descriptors for the original strings,
and is sorted so the original strings are in increasing lexicographical
order.  The second table contains descriptors for the translated
strings, and is parallel to the first table: to find the corresponding
translation one has to access the array slot in the second array with
the same index.
...

You see in the mo file is the orignal description.

 
> >    Because of this I propose some solutions:
> > 
> >    1.) (very fast)
> > 
> >      put the translation as normal .po file in the
> >      /usr/share/desc-trans/<locale>/desc-trans.d/ dir. finish. 
> > 
> >      This don't need some extra work on dpkg etc.
> 
> Actually, I think this is completely sufficient. Let the maintainer
> include updated translations at his convenience in new uploads, and
> use the override mechanism for the Descriptions-XX.mo.gz files until
> he has done so.

Descriptions-XX.mo.gz? not Descriptions-XX.po.gz?

> Hm, but note that this means that dpkg will need to look first at
> Descriptions-XX.mo files downloaded by apt, and only then at the .po
> file in the package. Would that be a problem?

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. If you have installed the
package you have the translation in the .mo file to. 

Only a dpkg --info don't show the translated description with this
solution.

> >    2.) Put the translation in the control.tar.gz of the deb.
> [snip]

This can show the translation with --info!

> >    3.) Add the desc-trans.tar.gz in the deb ar as a own new element.
> [snip]

This can show the translation with --info!

this is the main difference from the user view of this three
solutions.

Gruss
Grisu
-- 
Michael Bramer  -  a Debian Linux Developer http://www.debian.org
PGP: finger grisu@db.debian.org  -- Linux Sysadmin   -- Use Debian Linux
Traue nie einer Computerzeitschrift mit schoenen Frauen auf dem Cover.
                            (Besim Karadeniz in de.comm.internet.misc)

Attachment: pgpYdsud1uHML.pgp
Description: PGP signature


Reply to: