summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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