Raphaël wrote: > On Tue, Mar 12, 2013 at 11:30:38AM +0900, Daiki Ueno wrote: > > Raphaël writes: > > >> /tmp/a.po: warning: Charset missing in header. > > >> Message conversion to user's charset will not work. > > >> /tmp/a.po:13: duplicate message definition... > > >> /tmp/a.po:2: ...this is the location of the first definition > > >> msguniq: found 1 fatal error > > > > > > IHMO this is a bug. > > > > Although the error message is not too intuitive, I suppose it is an > > intended behavior that msguniq treats the empty msgid specially. > [...] > > (As you know, the empty msgid is kind of reserved for PO file headers.) > > ok, thank you for the information. > > Is there a reference somewhere where is written that "applications must > not generate entries for the empty string"; so that I have a chance the > po-generator get fixed in the future ?
You can read at <http://www.gnu.org/software/gettext/manual/gettext.html#MO-Files>: """ the empty string in a PO file GNU gettext is usually translated into some system information attached to that particular MO file """ Also, from Debian's 'man 3 gettext' page: """ When an empty string is used for msgid, the functions may return a nonempty string. """ But maybe should be clearly documented that empty string is reserved because it represents the header, but I do not see why any program want to translate an empty string and I think this is the reason to not document it. However, I can write a new paragraph in the documentation to clarify that the empty string is reserved. Something like this (comments are welcome) at "3 The Format of PO Files": ------------------------------------------------------------------------ as PO mode takes care of them for her. + The entry with the empty string as msgid is a reserved entry called + "the header"*. Tools based on libgettextpo rely on its contents to + process the po file. A simple entry can look like this: ------------------------------------------------------------------------ (*) Is a link to http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry Best regards, Miguel
