On Thu, Nov 25, 2004 at 12:27:46AM +0100, Nicolas François wrote:
The Po unescape function replace ([^\\])\\n by $1\n
I think it should instead replace "even number of \ followed by \n"
thus s/([^\\](\\\\)*)\\n/$1\n/g;
(I'm joining Po.pm.escape.patch)
If you think it is the right way to fix this issue, then I will also
change other similar regular expressions in this module (there are many
others).
Yes, I think so. At least, I cannot think of any better solution. Simply,
make sure to add some comments around the regexp since it becomes quite
hairly.
The second issue is one of the problems detected by the WDIFF
category of
the testsuite (some text is present in the original, but not in the
translation, or the contrary).
If a man page contains something like that (in a wrapped paragraph):
\fP
foo
then the font stack may "delay" the font modifier, and po4a generates the
following paragraph: "\nfoo". The result of gettext with this msgid is
always a null string.
This is a good ol' bug of testing the string instead of testing the
existance of the string. The little brother of testing the string instead of
testing its length. Your fix is exactly what we need, thanks a lot.
I will fix the Man module so that the empty line will be pushed
without
translation, but the Po module may need the second patch.
Yeah, kill that beast, please.
Both patches work, but I'm not sure of my perl and I would prefer
you have
a look at them.
Well, not much to say about one liner patches. They look good. As I said,
they just miss some comments.
Thank you very much,
Mt.