bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] msgmerge --diff-to-previous (feature request)


From: Alexander Potashev
Subject: Re: [bug-gettext] msgmerge --diff-to-previous (feature request)
Date: Sun, 30 Oct 2011 21:19:50 +0400

2011/10/30 Ineiev <address@hidden>:
> When msgmerge is invoked with just --diff-to-previous, it will insert
> just diffs:
>
> #, fuzzy
> #| msgid_diff "(diff to previous msgid)"
> #| msgid_plural_diff "(diff to previous msgid_plural)"
> msgid "(current msgid)"
> ...

That's interesting... I'm afraid, some programs that use their own .po
parsers might fail.

What I have checked with the above msgid_diff/msgid_plural_diff lines:
1. Lokalize (not sure about the version, must be around KDE SC 4.7.*)
with its own parser.
It thinks of concatenated msgid_diff+msgid_plural_diff as of plain "#|
msgid" and "#| msg_plurals". In your case it thinks that the previous
original text for the message was "(diff to previous msgid) (diff to
previous msgid_plural)" for both singular (msgid) and plural
(msgid_plural) forms.
2. My custom program that uses po_file_read() from libgettextpo-0.18.1.1.
po_file_read() reports 3 errors.

> When there is no --diff-to-previous option, msgmerge behaves like
> before the patch.
>
> # If the diffs go into
>>
>> "previous" ("#|"-d) messages, that may be unexpected for some
>> translators and software.
>
> I thought they just would avoid --diff-to-previous; would it be better
> if the diffs went into messages prefixed with "#<some-other-character>"?

«#* msgid "(diff to previous msgid)"» gets accepted silently by
Lokalize and even by libgettextpo-0.18.1.1. May be "#*" already means
something?

>> I suggest adding "diffed-to-previous" flags
>> to all messages that contain wdiffs in previous msgid/msgctxts, or
>> adding a per-file flag into the .po header.
>
> I may not understand all usage scenarios, but there is
> no similar "previous" flag, is it?

No, you're right. I just thought about other possible ways to write
wdiffs into .po files.


-- 
Alexander Potashev



reply via email to

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