summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-08-22 15:03:23 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-08-22 15:03:23 +0000
commit280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a (patch)
treeb8e4f00c43f3e1d40e62bad755ebfbe441d2cf0a /perl-install
parent3dd16eeaa33dbb8756c48f157933c191316e6829 (diff)
downloaddrakx-280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a.tar
drakx-280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a.tar.gz
drakx-280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a.tar.bz2
drakx-280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a.tar.xz
drakx-280e5cea92d4c21b1149ab9e27a7fb2a9b53b22a.zip
translate default value in help tooltips too
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksec23
1 files changed, 12 insertions, 11 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index eac6ea205..ebbed15c2 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -39,6 +39,17 @@ use security::l10n;
my ($w, %fields);
+############################ I18N ###################################
+my %inv_translations = map { translate($_) => $_ } N_("ALL"), N_("LOCAL"), N_("NONE"), N_("default"), N_("default"), N_("ignore"), N_("no"), N_("yes");
+my %translations = reverse %inv_translations;
+
+sub to_i18n { map { $translations{$_} || $_ } @_ }
+sub from_i18n { $inv_translations{$_[0]} || $_[0] }
+sub resize { gtkset_size_request($_[0], 50, -1) }
+
+%fields = security::l10n::fields();
+my %inv_fields = reverse %fields;
+
# factorize this with rpmdrake and harddrake2
sub wait_msg {
my $mainw = ugtk2->new('wait', (modal => 1, if_(!$::isEmbedded, transient => $w->{rwindow})));
@@ -103,23 +114,13 @@ sub new_nonedit_combo {
sub set_help_tip {
my ($entry, $default, $opt) = @_;
my $help = $security::help::help{$opt};
- gtkset_tip(new Gtk2::Tooltips, $entry, formatAlaTeX($help) . "\n" . N("(default value: %s)", $default));
+ gtkset_tip(new Gtk2::Tooltips, $entry, formatAlaTeX($help) . "\n" . N("(default value: %s)", to_i18n($default)));
}
my $msec = new security::msec;
$w = ugtk2->new('draksec');
my $window = $w->{window};
-%fields = security::l10n::fields();
-my %inv_fields = reverse %fields;
-
-############################ I18N ###################################
-my %inv_translations = map { translate($_) => $_ } N_("ALL"), N_("LOCAL"), N_("NONE"), N_("default"), N_("default"), N_("ignore"), N_("no"), N_("yes");
-my %translations = reverse %inv_translations;
-
-sub to_i18n { map { $translations{$_} || $_ } @_ }
-sub from_i18n { $inv_translations{$_[0]} || $_[0] }
-sub resize { gtkset_size_request($_[0], 50, -1) }
############################ MAIN WINDOW ###################################
# Set different options to Gtk2::Window