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

Martin Quinson po4a-devel@lists.alioth.debian.org
Mon, 16 Aug 2004 00:07:56 +0000


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

Modified Files:
	Man.pm 
Log Message:
use dgettext

Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Man.pm	15 Aug 2004 20:07:42 -0000	1.31
+++ Man.pm	16 Aug 2004 00:07:54 -0000	1.32
@@ -242,7 +242,7 @@
 @ISA = qw(Locale::Po4a::TransTractor);
 @EXPORT = qw();#  new initialize);
 use Locale::Po4a::TransTractor;
-use Locale::gettext qw(gettext);
+use Locale::gettext qw(dgettext);
 
 use File::Spec;
 use Getopt::Std;
@@ -280,7 +280,7 @@
 sub this_macro_needs_args {
     my ($macroname,$ref,$args)=@_;
     unless (length($args)) {
-	die sprintf(gettext(
+	die sprintf(dgettext("po4a",
 		"po4a::man: %s: macro %s called without arguments.\n".
 		"po4a::man: Even if placing the macro arguments on the next line is authorized\n".
 		"po4a::man: by man(7), handling this would make the po4a parser too complicate.\n".
@@ -303,7 +303,7 @@
     $str =~ s/\\f([SBI])(([^\\]*\\[^f])?.*?)\\f([PR])/$1<$2>/sg;
     $str =~ s/\\fR(.*?)\\f[RP]/$1/sg;
     if ($str =~ /\\f[RSBI]/) {
-	die sprintf(gettext(
+	die sprintf(dgettext("po4a",
 		"po4a::man: %s: Nested font modifiers, ie, something like:\n".
 		"po4a::man:  \\fB bold text \\fI italic text \\fR back to roman\n".
 		"po4a::man: This is not supported, modify the original page to something like:\n".
@@ -385,7 +385,7 @@
 	    $done .= $first  if ($lvl > 0);
 	    $rest=substr($rest,1);
 	}
-	die sprintf("po4a::man: %s: ".gettext("Unbalanced '<' and '>' in '%s'"),$ref||$self->{ref},$transstr)."\n"
+	die sprintf("po4a::man: %s: ".dgettext("po4a","Unbalanced '<' and '>' in '%s'"),$ref||$self->{ref},$transstr)."\n"
 	    if ($lvl > 0);
 	$done .= "\\fR$rest";
 	$str=$done;
@@ -477,13 +477,13 @@
 	}
 	$self->{ref}="$ref";
 #	print STDERR "LINE=$line<<\n";
-	die sprintf("po4a::man: %s: ".gettext("Escape sequence \\c encountered. This is not handled yet.")
+	die sprintf("po4a::man: %s: ".dgettext("po4a","Escape sequence \\c encountered. This is not handled yet.")
 			    ,$ref)."\n"
 	    if ($line =~ /\\c/);
 
 
 	if ($line =~ /^\./) {
-	    die sprintf("po4a::man: ".gettext("Unparsable line: %s"),$line)."\n"
+	    die sprintf("po4a::man: ".dgettext("po4a","Unparsable line: %s"),$line)."\n"
 		unless ($line =~ /^\.+\\*?(\\\")(.*)/ ||
 			$line =~ /^\.([BI])(\W.*)/ ||
 			$line =~ /^\.(\S*)(.*)/);
@@ -517,7 +517,7 @@
 			print STDERR "End of an escaped sequence\n"
 			    if ($debug{'splitargs'});
 			unless(length($elem)){
-				die sprintf(gettext(
+				die sprintf(dgettext("po4a",
 					"po4a::man: %s: Escaped space at the end of macro arg. With high\n".
 					"po4a::man: probability, it won't do the trick with po4a (because of\n".
 					"po4a::man: wrapping). You may want to remove it and use the .nf/.fi groff\n".
@@ -605,34 +605,34 @@
 	    if ($macro eq '\"' ||
 		$macro eq '"') {
 		if ($line =~ /Pod::Man/) {
-		    warn gettext("This file was generated with Pod::Man. Translate the pod file with the pod module of po4a.")."\n";
+		    warn dgettext("po4a","This file was generated with Pod::Man. Translate the pod file with the pod module of po4a.")."\n";
 		    exit 0;
 		} elsif ($line =~ /generated by help2man/)    {
-		    warn gettext("This file was generated with help2man. Translate the source file with the regular gettext.")."\n";
+		    warn dgettext("po4a","This file was generated with help2man. Translate the source file with the regular gettext.")."\n";
 		} elsif ($line =~ /with docbook-to-man/)      { 
-		    warn gettext("This file was generated with docbook-to-man. Translate the source file with the sgml module of po4a.")."\n";
+		    warn dgettext("po4a","This file was generated with docbook-to-man. Translate the source file with the sgml module of po4a.")."\n";
 		    exit 0;
 		} elsif ($line =~ /generated by docbook2man/) { 
-		    warn gettext("This file was generated with docbook2man. Translate the source file with the sgml module of po4a.")."\n";
+		    warn dgettext("po4a","This file was generated with docbook2man. Translate the source file with the sgml module of po4a.")."\n";
 		    exit 0;
 		} elsif ($line =~ /created with latex2man/)   { 
-		    warn sprintf(gettext(
+		    warn sprintf(dgettext("po4a",
 					"This file was generated with %s.\n".
 					"You should translate the source file, but continuing anyway."
 					),"latex2man")."\n";
 		} elsif ($line =~ /Generated by db2man.xsl/)  { 
-		    warn sprintf(gettext(
+		    warn sprintf(dgettext("po4a",
 					"This file was generated with %s.\n".
 					"You should translate the source file, but continuing anyway."
 					),"db2man.xsl")."\n";
 		} elsif ($line =~ /generated automatically by mtex2man/)  {
-		    warn sprintf(gettext(
+		    warn sprintf(dgettext("po4a",
 					"This file was generated with %s.\n".
 					"You should translate the source file, but continuing anyway."
 					),"mtex2man")."\n";
 		} elsif ($line =~ /THIS FILE HAS BEEN AUTOMATICALLY GENERATED.  DO NOT EDIT./ ||
 		         $line =~ /DO NOT EDIT/i || $line =~ /generated/i) {
-		    warn sprintf(gettext(
+		    warn sprintf(dgettext("po4a",
 					"This file contains the line '%s'.\n".
 					"You should translate the source file, but continuing anyway."
 					),"$line")."\n";
@@ -664,7 +664,7 @@
 	    # Special case:
 	    #  .Dd => Indicates that this is a mdoc page
 	    if ($macro eq 'Dd') {
-		die "po4a::man: ".gettext(
+		die "po4a::man: ".dgettext("po4a",
 			"This page seems to be a mdoc(7) formated one. This is not supported (yet).")."\n";
 	    }
 		
@@ -676,7 +676,7 @@
 		&{$macro{$macro}}(@args);
 	    } else {
 		$self->pushline($line."\n");
-		die sprintf(gettext(
+		die sprintf(dgettext("po4a",
 		    "po4a::man: Unknown macro '%s' (at %s).\n".
 		    "po4a::man: Remove it from the document, or provide a patch to the po4a team."
 				),$line,$ref)."\n";
@@ -899,7 +899,7 @@
 $macro{'ad'}=\&untranslated;
 # .de macro Define or redefine macro until .. is encountered.
 $macro{'de'}=sub {
-    die "po4a::man: ".gettext("This page defines a new macro with '.de'. Since po4a is not a real groff parser, this is not supported.")."\n";
+    die "po4a::man: ".dgettext("po4a","This page defines a new macro with '.de'. Since po4a is not a real groff parser, this is not supported.")."\n";
 };
 # .ds stringvar anything
 #                 Set stringvar to anything.
@@ -923,8 +923,8 @@
 # .if cond anything  If cond then anything; otherwise do nothing.
 $macro{'ie'}=$macro{'if'}=sub {
     die sprintf("po4a::man: ".
-	  gettext("This page uses conditionals with '%s'. Since po4a is not a real groff parser, this is not supported.",
-	        $_[1]))."\n";
+	  dgettext("po4a","This page uses conditionals with '%s'. Since po4a is not a real groff parser, this is not supported."),
+	        $_[1])."\n";
 };
 # .in  N    Change indent according to N (default scaling indicator m).
 $macro{'in'}=\&untranslated;