[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Convert/HTML.pm t/init/icons...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Convert/HTML.pm t/init/icons... |
Date: |
Sun, 04 Sep 2011 14:56:35 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/04 14:56:35
Modified files:
tp/Texinfo/Convert: HTML.pm
Added files:
tp/t/init : icons.init
Log message:
Use the correct button name in alt in about text, to have it translated.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.145&r2=1.146
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/init/icons.init?cvsroot=texinfo&rev=1.1
Patches:
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -b -r1.145 -r1.146
--- Texinfo/Convert/HTML.pm 4 Sep 2011 13:26:23 -0000 1.145
+++ Texinfo/Convert/HTML.pm 4 Sep 2011 14:56:35 -0000 1.146
@@ -1827,12 +1827,16 @@
}
} elsif ($button eq ' ') {
# handle space button
+ # FIXME for the alt, the second button_icon_img argument, we don't use
+ # the button name (we do it for other buttons). This doesn't matter much
+ # however, as ' ' is not translated in BUTTON_NAMES.
if ($self->get_conf('ICONS') and $self->get_conf('ACTIVE_ICONS')
- and defined($self->get_conf('ACTIVE_ICONS')->{' '})) {
+ and defined($self->get_conf('ACTIVE_ICONS')->{$button})
+ and $self->get_conf('ACTIVE_ICONS')->{$button} ne '') {
$active = &{$self->{'button_icon_img'}}($self, $button,
$self->get_conf('ACTIVE_ICONS')->{' '});
} else {
- $active = $self->get_conf('BUTTONS_TEXT')->{' '};
+ $active = $self->get_conf('BUTTONS_TEXT')->{$button};
}
} else {
my $href = $self->_element_direction($self->{'current_element'},
@@ -5706,15 +5710,16 @@
foreach my $button (@{$self->get_conf('SECTION_BUTTONS')}) {
next if ($button eq ' ' or ref($button) eq 'CODE' or ref($button) eq
'SCALAR'
or ref($button) eq 'ARRAY');
+ my $button_name = $self->get_conf('BUTTONS_NAME')->{$button};
$about .= " <tr>\n <td align=\"center\">";
$about .=
($self->get_conf('ICONS') &&
$self->get_conf('ACTIVE_ICONS')->{$button} ?
- &{$self->{'button_icon_img'}}($self, $button,
+ &{$self->{'button_icon_img'}}($self, $button_name,
$self->get_conf('ACTIVE_ICONS')->{$button}) :
' [' . $self->get_conf('BUTTONS_TEXT')->{$button} . '] ');
$about .= "</td>\n";
$about .=
-" <td align=\"center\">".$self->get_conf('BUTTONS_NAME')->{$button}."</td>
+" <td align=\"center\">".$button_name."</td>
<td>".$self->get_conf('BUTTONS_GOTO')->{$button}."</td>
<td>".$self->get_conf('BUTTONS_EXAMPLE')->{$button}."</td>
</tr>
Index: t/init/icons.init
===================================================================
RCS file: t/init/icons.init
diff -N t/init/icons.init
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/init/icons.init 4 Sep 2011 14:56:35 -0000 1.1
@@ -0,0 +1,60 @@
+
+set_from_init_file('ICONS', 1);
+
+
+# insert here name of icon images for buttons
+# Icons are used, if ICONS and resp. value are set
+%ACTIVE_ICONS =
+ (
+ 'Top', 'a_top.png',
+ 'Contents', 'a_tableofcon.png',
+ 'Overview', 'a_tableofcon.png',
+ 'Index', 'a_index.png',
+ 'This', '',
+ 'Back', 'a_left.png',
+ 'FastBack', 'a_leftdouble.png',
+ 'Prev', 'a_left.png',
+ 'Up', 'a_up.png',
+ 'Next', 'a_right.png',
+ 'NodeUp', 'a_up.png',
+ 'NodeNext', 'a_right.png',
+ 'NodePrev', 'a_left.png',
+ 'NodeForward', 'a_right.png',
+ 'NodeBack', 'a_left.png',
+ 'Forward', 'a_right.png',
+ 'FastForward', 'a_rightdouble.png',
+ 'About' , 'a_help.png',
+ 'First', '',
+ 'Last', '',
+ ' ', ''
+ );
+
+# insert here name of icon images for these, if button is inactive
+%PASSIVE_ICONS =
+ (
+ 'Top', 'a_top_na.png',
+ 'Contents', 'a_tableofcon_na.png',
+ 'Overview', 'a_tableofcon_na.png',
+ 'Index', 'a_index_na.png',
+ 'This', '',
+ 'Back', 'a_left_na.png',
+ 'FastBack', 'a_leftdouble_na.png',
+ 'Prev', 'a_left_na.png',
+ 'Up', 'a_up_na.png',
+ 'Next', 'a_right_na.png',
+ 'NodeUp', 'a_up_na.png',
+ 'NodeNext', 'a_right_na.png',
+ 'NodePrev', 'a_left_na.png',
+ 'NodeForward', 'a_right_na.png',
+ 'NodeBack', 'a_left_na.png',
+ 'Forward', 'a_right_na.png',
+ 'FastForward', 'a_rightdouble_na.png',
+ 'About' , 'a_help_na.png',
+ 'First', '',
+ 'Last', '',
+ );
+
+set_from_init_file('ACTIVE_ICONS', \%ACTIVE_ICONS);
+set_from_init_file('PASSIVE_ICONS', \%PASSIVE_ICONS);
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp Texinfo/Convert/HTML.pm t/init/icons...,
Patrice Dumas <=