summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet7
-rw-r--r--mdkonline.pm10
2 files changed, 11 insertions, 6 deletions
diff --git a/mdkapplet b/mdkapplet
index ddb11fc7..fab05682 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -827,11 +827,6 @@ sub prepare_add_restricted() {
my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_RESTRICTED});
return if $warn_me;
my $w = new_portable_dialog(N("New medium available"));
- my %strings = (
- PowerPack => N("Mandriva PowerPack"),
- Server => N("Mandriva Enterprise Server"),
- );
- my $product = $product_id->{product};
my $res =
fill_n_run_portable_dialog(
$w,
@@ -839,7 +834,7 @@ sub prepare_add_restricted() {
get_banner(N("New medium available")),
gtknew('Label_Left', text =>
N("You use '%s' distribution and therefore have privileged access to additional software.",
- $strings{$product} || $product) . "\n\n" .
+ translate_product()) . "\n\n" .
N("Do you want to install this additional software repository?"), @common),
gtknew('CheckButton', text => N("Do not ask me next time"), active_ref => \$warn_me),
create_okcancel($w, N("Next"), N("Cancel")),
diff --git a/mdkonline.pm b/mdkonline.pm
index b605e976..5b7906e7 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -36,6 +36,7 @@ our @EXPORT = qw(fork_exec
get_stale_upgrade_filename
is_enterprise_media_supported
is_restricted_media_supported
+ translate_product
xml2perl
$product_id
$root);
@@ -79,6 +80,15 @@ sub fork_exec {
run_program::raw({ detach => 1 }, @_);
}
+sub translate_product() {
+ my %strings = (
+ PowerPack => N("Mandriva PowerPack"),
+ Server => N("Mandriva Enterprise Server"),
+ );
+ my $product = $product_id->{product};
+ $strings{$product} || $product;
+}
+
sub get_banner {
my ($o_title) = @_;
Gtk2::Banner->new(