[Po4a-devel] [patch] PO headers inconsistency

Denis Barbier bouzim at gmail.com
Thu Aug 19 14:47:53 UTC 2010


On 2010/7/30 Denis Barbier wrote:
> On 2010/7/30 intrigeri wrote:
>> Hi,
>>
>> 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[1] thanks to the po plugin[2] 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
>> Hess:
>>
>>    http://ikiwiki.info/bugs/po:_double_commits_of_po_files/
>>
>> The attached one-line patch fixes this "bug". It would be pretty nice
>> if it was applied on time to be shipped in Squeeze.
>
> Hello,
>
> 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:
>  2001-03-22
>        * 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.

Hello intrigeri,

I forgot to get back to you about this issue, sorry.
As mentioned above, xgettext prints "8bit\n" instead of "ENCODING\n"
for a very long time, thus I decided to let po4a do the same.  This
change has been committed and will be shipped in po4a 0.40.1 (released
on 2010-08-25).  Can you please check current CVS and tell us quickly
if this change causes some trouble for you?
See https://alioth.debian.org/scm/?group_id=30267 you only need the po4a module.

Denis



More information about the Po4a-devel mailing list