texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp/Texinfo Common.pm Parser.pm Convert/...


From: Patrice Dumas
Subject: texinfo/tp/Texinfo Common.pm Parser.pm Convert/...
Date: Mon, 07 Jan 2013 21:42:18 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        13/01/07 21:42:18

Modified files:
        tp/Texinfo     : Common.pm Parser.pm 
        tp/Texinfo/Convert: Plaintext.pm 

Log message:
        Do not translate Info language elements in listoffloats.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.167&r2=1.168
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.409&r2=1.410
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.232&r2=1.233

Patches:
Index: Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -b -r1.167 -r1.168
--- Common.pm   18 Dec 2012 23:38:29 -0000      1.167
+++ Common.pm   7 Jan 2013 21:42:11 -0000       1.168
@@ -1304,8 +1304,6 @@
 
   my $prepended;
   if ($type) {
-  #print STDERR "AAAAAAA $root->{'extra'}->{'type'} "
-  #   .Data::Dumper->Dump([$root->{'extra'}->{'type'}]);
     if ($caption) {
       if (defined($root->{'number'})) {
         $prepended = $self->gdt('{float_type} {float_number}: ',

Index: Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -b -r1.409 -r1.410
--- Parser.pm   6 Jan 2013 21:28:33 -0000       1.409
+++ Parser.pm   7 Jan 2013 21:42:13 -0000       1.410
@@ -4295,6 +4295,8 @@
                   $self->_gather_previous_item($current, $command, $line_nr);
                   $misc = { 'cmdname' => $command, 'parent' => $current };
                   push @{$current->{'contents'}}, $misc;
+                  # since in the %misc_commands hash the entry for those 
+                  # commands is 'skipspace' we set $line_arg here.
                   $line_arg = 1;
                 } else {
                   $self->line_error (sprintf($self->__("address@hidden not 
meaningful inside address@hidden' block"), $command, $parent->{'cmdname'}), 
$line_nr);

Index: Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -b -r1.232 -r1.233
--- Convert/Plaintext.pm        22 Dec 2012 12:18:10 -0000      1.232
+++ Convert/Plaintext.pm        7 Jan 2013 21:42:15 -0000       1.233
@@ -2241,35 +2241,17 @@
         $lines_count += 2;
         foreach my $float 
(@{$self->{'floats'}->{$root->{'extra'}->{'type'}->{'normalized'}}}) {
           next if 
(!defined($float->{'extra'}->{'block_command_line_contents'}->[1]));
-          my $float_entry;
-          if ($root->{'extra'}->{'type'}->{'normalized'} ne '') {
-            if (exists ($float->{'number'})) {
-              $float_entry = 
-               $self->gdt('* {float_type} {float_number}: {float_label}.', 
-                {'float_type' => $root->{'extra'}->{'type'}->{'content'},
-                 'float_number' => $float->{'number'},
-                 'float_label' => 
$float->{'extra'}->{'block_command_line_contents'}->[1]});
-            } else {
-              $float_entry = $self->gdt('* {float_type}: {float_label}.', 
-                {'float_type' => $root->{'extra'}->{'type'}->{'content'},
-                 'float_label' => 
$float->{'extra'}->{'block_command_line_contents'}->[1]
-                 });
-            }
-          } else {
-            if (exists ($float->{'number'})) {
-              $float_entry = 
-               $self->gdt('*  {float_number}: {float_label}.', 
-                {'float_number' => $float->{'number'},
-                 'float_label' => 
$float->{'extra'}->{'block_command_line_contents'}->[1]});
-            } else {
-              $float_entry = $self->gdt('* : {float_label}.', 
-                {'float_label' => 
$float->{'extra'}->{'block_command_line_contents'}->[1]
-                 });
-            }
-          }
-          #print STDERR "$float ".$self->convert_line($float_entry)."\n";
+          my $float_label_text = $self->convert_line({'type' => '_code',
+             'contents' 
+                 => $float->{'extra'}->{'block_command_line_contents'}->[1]});
+          my $float_entry = $self->_float_type_number($float);
+          my $float_entry_text = ':';
+          if (defined($float_entry)) {
           $float_entry->{'type'} = 'frenchspacing';
-          my $float_line = $self->convert_line($float_entry);
+            $float_entry_text = $self->convert_line($float_entry);
+          }
+          # no translation here, this is required Info format.
+          my $float_line = "* $float_entry_text: $float_label_text.";
           my $line_width 
              = Texinfo::Convert::Unicode::string_width($float_line);
           if ($line_width > $listoffloat_entry_length) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]