[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.135,1.136"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Fri Apr 14 18:51:14 UTC 2006


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

Modified Files:
	Man.pm 
Log Message:
There were failures when groff and mdoc pages were translated at the same
time.
The groff macros can't be erased this way, and we must switch back to
groff mode when we find a .TH macro.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- Man.pm	9 Apr 2006 23:33:07 -0000	1.135
+++ Man.pm	14 Apr 2006 18:51:12 -0000	1.136
@@ -1525,6 +1525,7 @@
     my ($th,$title,$section,$date,$source,$manual)=@_;
     #Preamble#.TH      title     section   date     source   manual
 #    print STDERR "TH=$th;titre=$title;sec=$section;date=$date;source=$source;manual=$manual\n";
+    $mdoc_mode = 0;
     $self->push_docheader();
     $self->pushmacro($th,
 		     $self->t($title),
@@ -2044,11 +2045,18 @@
     my ($self,$macroname,$macroarg)=(shift,shift,join(" ", at _));
 
     $mdoc_mode = 1;
-    # Erase the current macro definitions
-    %macro=();
-    %inline=();
-    %no_wrap_begin=();
-    %no_wrap_end=();
+
+# FIXME: It would be nice if we could switch from one set of macros to the
+# other.
+#
+# This does not work at this time. If we erase the current set of macros,
+# po4a fails when a configuration file uses both mdoc and groff pages.
+#
+#    # Erase the current macro definitions
+#    %macro=();
+#    %inline=();
+#    %no_wrap_begin=();
+#    %no_wrap_end=();
     # Use the mdoc macros
     define_mdoc_macros();
 




More information about the Po4a-commits mailing list