[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.97,1.98"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Fri Sep 2 16:00:35 UTC 2005


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

Modified Files:
	Man.pm 
Log Message:
Translate the .ta argument.
Sometime the size of the tabulation is given as the size of a word.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- Man.pm	2 Sep 2005 15:50:59 -0000	1.97
+++ Man.pm	2 Sep 2005 16:00:33 -0000	1.98
@@ -1497,7 +1497,15 @@
 # .ta T N   Set tabs after every position that is a multiple of N.
 # .ta n1 n2 ... nn T r1 r2 ... rn
 #           Set  tabs at positions n1, n2, ..., nn, [...]
-$macro{'ta'}=\&untranslated;
+$macro{'ta'}=sub {
+    # In some cases, a ta request can contain a translatable argument.
+    # FIXME: detect those cases (something like 5i does not need to be
+    # translated)
+    my ($self,$m)=(shift,shift);
+    my $line = "@_";
+    $line =~ s/^ +//;
+    $self->pushline($m." ".$self->translate($line,$self->{ref},'ta')."\n");
+};
 # .ti +N    Temporary indent next line (default scaling indicator m).
 $macro{'ti'}=\&untranslated;
 




More information about the Po4a-commits mailing list