[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert Plaintext.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert Plaintext.pm |
Date: |
Sat, 11 Dec 2010 17:03:22 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/12/11 17:03:17
Modified files:
tp/Texinfo/Convert: Plaintext.pm
Log message:
Use a translatable string for @email formatting.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.32&r2=1.33
Patches:
Index: Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- Plaintext.pm 11 Dec 2010 16:23:15 -0000 1.32
+++ Plaintext.pm 11 Dec 2010 17:03:17 -0000 1.33
@@ -774,22 +774,30 @@
}
} elsif ($root->{'cmdname'} eq 'email') {
# nothing is output for email, instead the command is substituted.
-
my @email_contents;
if ($root->{'extra'} and $root->{'extra'}->{'brace_command_contents'}) {
+ my $name;
+ my $email;
if (scalar (@{$root->{'extra'}->{'brace_command_contents'}}) == 2
and defined($root->{'extra'}->{'brace_command_contents'}->[-1])) {
- @email_contents =
(@{$root->{'extra'}->{'brace_command_contents'}->[1]},
- {'text' => ' '});
+ $name = $root->{'extra'}->{'brace_command_contents'}->[1];
}
if (defined($root->{'extra'}->{'brace_command_contents'}->[0])) {
- push @email_contents, {'cmdname' => 'indicateurl',
- 'args' => [ { 'type' => 'brace_command_arg',
- 'contents' =>
$root->{'extra'}->{'brace_command_contents'}->[0],
- } ],
- 'extra' => {'brace_command_contents' =>
[$root->{'extra'}->{'brace_command_contents'}->[0]] } };
+ $email = $root->{'extra'}->{'brace_command_contents'}->[0];
}
- unshift @{$self->{'current_contents'}->[-1]}, @email_contents;
+ my $prepended;
+ if ($name and $email) {
+ $prepended = $self->gdt('{name} @indicateurl{{email}}',
+ {'name' => $name, 'email' => $email});
+ } elsif ($email) {
+ $prepended = $self->gdt('@indicateurl{{email}}',
+ {'email' => $email});
+ } elsif ($name) {
+ $prepended = {'contents' => $name};
+ } else {
+ return '';
+ }
+ unshift @{$self->{'current_contents'}->[-1]}, $prepended;
}
return '';
} elsif ($command eq 'uref' or $command eq 'url') {