[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.69,1.70

Nicolas FRAN??OIS po4a-devel@lists.alioth.debian.org
Sun, 28 Nov 2004 14:03:50 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv18386/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
Change "" to \(dq in quoted macro arguments. \(dq will be converted back to
a single double quote for the translator.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- Man.pm	27 Nov 2004 01:08:56 -0000	1.69
+++ Man.pm	28 Nov 2004 14:03:47 -0000	1.70
@@ -767,6 +767,8 @@
             $buffer .= " ".$elem;
             print STDERR "Continuation of a quote\n"
                 if ($debug{'splitargs'});
+            # Inside a quoted argument, "" indicates a double quote
+            while ($buffer =~ s/^"([^"]*?)""/"$1\\(dq/) {}
             # print "buffer=$buffer.\n";
             if ($buffer =~ m/^"(.*)"(.+)$/) {
                 print STDERR "End of quote, with stuff after it\n"
@@ -804,6 +806,8 @@
             print STDERR "Quoted, no space\n"
                 if ($debug{'splitargs'});
             my $a = $1;
+            # Inside a quoted argument, "" indicates a double quote
+            $a =~ s/""/\\(dq/g;
             $a =~ s/\xA0/\\ /g;
             push @args,$a;
         } elsif ($elem =~ m/^"/) { #") {
@@ -824,6 +828,8 @@
         }
     }
     if (length($buffer)) {
+        # Inside a quoted argument, "" indicates a double quote
+        while ($buffer =~ s/^"([^"]*?)""/"$1\\(dq/) {}
         $buffer=~ s/"//g;
         $buffer =~ s/\xA0/\\ /g;
         push @args,$buffer;