[Po4a-devel] [patch] PO headers inconsistency
bouzim at gmail.com
Fri Jul 30 12:39:52 UTC 2010
On 2010/7/30 intrigeri wrote:
> there is a tiny inconsistency in the way po4a writes PO headers.
> When it creates a PO file, it writes in there:
> "Content-Transfer-Encoding: ENCODING"
> ... on the other hand, at other times, e.g. when updating a PO file,
> this header field is replaced by:
> "Content-Transfer-Encoding: ENCODING\n"
> This is probably only annoying for VCS repositories history, e.g. when
> using a multi-lingual ikiwiki thanks to the po plugin I wrote,
> that heavily uses po4a.
> In this case, this tiny inconsistency triggers a double commit of PO
> files when a page is added to the wiki. This bug was reported by Joey
> The attached one-line patch fixes this "bug". It would be pretty nice
> if it was applied on time to be shipped in Squeeze.
You are right, Po.pm should write the same POT file as xgettext. I
just had a look at gettext sources, gettext-tools/src/ChangeLog.0
contains this entry:
* xgettext.c (construct_header): Replace ENCODING with 8-bit.
And indeed xgettext prints "8bit\n" (without hyphen) instead of
"ENCODING\n", this needs more investigation. It seems also that
recent xgettext prints a "Language: \n" line.
More information about the Po4a-devel