[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.40,1.41

Martin Quinson po4a-devel@lists.alioth.debian.org
Fri, 24 Sep 2004 13:52:53 +0000


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

Modified Files:
	Man.pm 
Log Message:
Add nekral to the authors; update copyright date; do change hyphen to minus only where it's allowed

Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- Man.pm	24 Sep 2004 13:44:37 -0000	1.40
+++ Man.pm	24 Sep 2004 13:52:51 -0000	1.41
@@ -219,11 +219,12 @@
 =head1 AUTHORS
 
  Denis Barbier <barbier@linuxfr.org>
+ Nicolas François <nicolas.francois@centraliens.net>
  Martin Quinson <martin.quinson@tuxfamily.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2002 by SPI, inc.
+Copyright 2002, 2003, 2004 by SPI, inc.
 
 This program is free software; you may redistribute it and/or modify it
 under the terms of GPL (see COPYING file).
@@ -311,9 +312,12 @@
 		" %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)
+    # Kill minus sign/hyphen difference.
+    # Aestetic of printed man pages may suffer, but:
+    #  * they are translator-unfriendly
+    #  * they break when using utf8 (for obscure reasons)
+    #  * they forbid the searches, since keybords don't have hyphen key
+    #  * they forbid copy/paste, since options need minus sign, not hyphen
     $str =~ s|\\-|-|sg;
     # Groff bestiary
     $str =~ s/\\\*\(lq/``/sg;
@@ -358,7 +362,11 @@
 
     # Post formating, so that groff see the strange chars
     $str =~ s|\\-|-|sg; # in case the translator added some of them manually
-    $str =~ s|-|\\-|sg;
+    # change hyphens to minus signs
+    # (this shouldn't be done for \s-<number> font size modifiers)
+    if (! (defined $self->{type} && $self->{type} eq "so")) {
+        $str =~ s/(?<!\\s)-/\\-/sg; # (?<!pattern) means "not preceded by pattern"
+    }
 
     # No . on first char, or nroff will think it's a macro
     $str =~ s/\n([.'"])/ $1/mg; #'