bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: ommiting header causes multibyte errors


From: Bruno Haible
Subject: Re: ommiting header causes multibyte errors
Date: Thu, 7 Jun 2007 16:04:45 +0200
User-agent: KMail/1.5.4

Hello,

> >> If I run xgettext with --omit-header it gives errors:
> 
> > This is normal. A POT or PO file that does not carry a character encoding
> > specification in the header entry is assumed to be in ASCII. xgettext 
> > notices
> > that its output would violate this rule and gives a warning and an error.
> 
> In that case I would have appreciated this being documented near the 
> option for it, it would have saved me quite a bit of time.

OK, I'll mention this in the doc:

--- xgettext.texi       8 Aug 2006 11:33:46 -0000       1.21
+++ xgettext.texi       7 Jun 2007 13:54:56 -0000       1.22
@@ -408,7 +410,8 @@
 
 @item --omit-header
 @opindex address@hidden, @code{xgettext} option}
-Don't write header with @samp{msgid ""} entry.
+Don't write header with @samp{msgid ""} entry.  Note that using this option
+will lead to an error if the resulting file would not entirely be in ASCII.
 
 @cindex testing @file{.po} files for equivalence
 This is useful for testing purposes because it eliminates a source


> Actually, perhaps ever better: generate a minimal header whenever the 
> source is non-ascii, and the option is on, since in that case the header 
> is required rather then containing optional data.

This is not really better, because if xgettext produces a minimal header
despite of --omit-header, it is most likely not what the user wanted.

> Also, aesthetically, it looks bad to have a field which is empty, but looks 
> like it should have something.

When the format of PO files was specified 12 years ago, aesthetics did play
a role (which is why breaking long strings into lines is possible), but
  msgid ""
was not considered ugly.

> > msgmerge is not a tool for concatenating PO files. It's a tool for merging
> > updated translations from a translator with an updated POT file from the
> > programmer.
> 
> That's what I'm doing with it. I have an existing .po file, and I'm 
> merging in new strings from my program.
> ...
> I just don't want the extra fields to appear in the file. I need to send 
> it to someone very non-technical and I want the absolute minimum in the 
> file.

Can you tell more: What is the non-technical person going to do with the
file? Reading it? Reviewing it? Editing it? What kind of tool is he/she using
for this purpose?

I'm asking because it sounds like some other format might be better suited
than the PO file format.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]