[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.30,1.31

Martin Quinson po4a-devel@lists.alioth.debian.org
Sun, 15 Aug 2004 20:07:44 +0000


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

Modified Files:
	Man.pm 
Log Message:
some more comments; convert groff non breaking space to ascii one on the fly

Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- Man.pm	15 Aug 2004 19:58:13 -0000	1.30
+++ Man.pm	15 Aug 2004 20:07:42 -0000	1.31
@@ -312,9 +312,15 @@
 		" %s"),$ref,$origstr)."\n";
     }
 
+    # kill minus sign/hyphen difference. Aestetic of printed man pages may suffer,
+    # but they are translator-unfriendly, and break when using utf8
+    # (didn't understand exactly why/when/how)
     $str =~ s|\\-|-|sg;
+    # Groff bestiary
     $str =~ s/\\\*\(lq/``/sg;
     $str =~ s/\\\*\(rq/''/sg;
+    # Change groff non-breaking space to ascii one
+    $str =~ s|\\ |\xA0|sg;
     
 # The next commented loop should take care of badly nested font modifiers,
 #  if only it worked ;)
@@ -358,6 +364,8 @@
     # No . on first char, or nroff will think it's a macro
     $str =~ s/\n([.'"])/ $1/mg; #'
 
+    # Change ascii non-breaking space to groff one
+    $str =~ s|\xA0|\\ |sg;
     # No nbsp (said "\ " in groff on the last pos of the line, or groff adds
     # an extra space
     $str =~ s/\\ \n/\\ /sg;