Hi Nathan,

Nathan Scott [2006-06-29 12:02 +1000]:
> > The POT file created by the acl package is broken since it does not
> > have a proper header.
> 
> Well, that doesn't strictly make it "broken", but no matter.

Well, true, but since it is meant to be a template for translators, it
should have a template header, since .po files need to have a header.
Also, the header is necessary to state the creation date, so that
automated tools have a chance of handling it properly.

> > We fixed this by removing the --omit-header
> > argument to xgettext and also updating the POT file on package build,
> > so that it is always current.
> 
> Hmm. AFAICT, this isn't fixing the original problem.  Reading
> https://launchpad.net/distros/ubuntu/+source/acl/+bug/40365
> it seems there's valuable metadata that needs to be extracted
> from the .pot header, like charset, creation date, etc.

Indeed this happens automatically. The charset of the POT file is
irrelevant as long as it only contains ASCII. As soon as it doesn't,
it needs to be filled in, of course (xgettext should be able to do
this with --from-code, but I never tried it so far).

> When we auto-generate a header it means the "placeholder" fields
> (see below) are not being filled in, and creation date becomes
> simply "last build date", etc - heres the generated header...

So, this header looks fine for a template, what should be wrong about
it? It shows everything a translator needs to fill in, and has the
correct date.

> I guess a better way to approach this would be to have a separate
> file which contains just the header, with filled-in details, and
> then produce a .pot file during the build using the current macros,
> and finally install a .pot file with the two concatenated together.

If you want to do it this way, I see no problems with it (as long as
you update the date). However, it seems to be a bit overkill.

> Your patch also doesn't consider the general case for building
> on platforms where xgettext is not installed, its assuming it
> is always there.

Oh, good catch! Sorry, I forgot the gettext build-dependency.

> Do you have time to attempt fixing some of these?  

So far the only missing bit is the gettext build dep, which is trivial
to fix.

> If not, can
> you explain to me which of the .pot header fields are important
> for the Ubuntu translation folks, and which are not, and I'll
> attempt to find some time to address these issues for you.

Basically, the header must have a corerct format and a current date
(from last build).

> ps: I look after 5 source packages which use this same Makefile
> system (acl/attr/xfsprogs/xfsdump/dmapi), so we may as well take
> the time to fix it properly, once - here in acl - and I'll then
> ensure the changes get propogated to the rest of them too.

Ah, I remember changing these packages, too (I didn't file back then,
since I had to process a large number of packages in a very short
time).

BTW, since Debian does not have language packs (yet), are you aware of
Rosetta's export function? This will give you a tarball with updated
translations which you can stick into po/, so that Debian users
benefit from updated translations as well.

Thank you for your cooperation!

Martin

-- 
Martin Pitt              http://www.piware.de
Ubuntu Developer   http://www.ubuntulinux.org
Debian Developer        http://www.debian.org

Attachment: signature.asc
Description: Digital signature

Reply via email to