summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/localedrake
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/localedrake')
-rw-r--r--perl-install/standalone/localedrake32
1 files changed, 17 insertions, 15 deletions
diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake
index e89804d3f..9e6d97ba9 100644
--- a/perl-install/standalone/localedrake
+++ b/perl-install/standalone/localedrake
@@ -21,48 +21,50 @@ if (defined $klang) {
$klang or exit(-1);
my $lang = member($klang, lang::list_langs()) ? $klang : 'en_US';
my $country = member($kcountry, lang::list_countries()) ? $kcountry : 'US';
- my $locale = lang::read('', $>);
+ my $locale = lang::read($>);
$klang and $locale->{lang} = $lang;
$kcountry and $locale->{country} = $country;
- lang::write('', $locale, $>, 'dont_touch_kde_files') if $apply;
+ lang::write($locale, $>, 'dont_touch_kde_files') if $apply;
#- help KDE defaulting to the right charset
print lang::charset2kde_charset(lang::l2charset($lang)), "\n";
exit(0);
}
-my $locale = lang::read('', $>);
+my $locale = lang::read($>);
my $in = 'interactive'->vnew;
-sub select_language() {
- $locale->{lang} = any::selectLanguage($in, $locale->{lang});
-}
+$ugtk2::wm_icon = "localedrake";
+$::Wizard_title = N("LocaleDrake");
+
sub select_country() {
any::selectCountry($in, $locale);
}
eval {
+ local $::isWizard = 1;
+ local $::Wizard_no_previous = 1;
language:
- select_language() or goto the_end;
+ my $old_lang = $locale->{lang};
+ $locale->{lang} = any::selectLanguage($in, $locale->{lang});
+ $locale->{IM} = lang::get_default_im($locale->{lang}) if $old_lang ne $locale->{lang};
+ undef $::Wizard_no_previous;
select_country() or goto language;
};
if ($@) {
if ($@ =~ /^one lang only/) {
- select_country() or goto the_end;
- } else {
+ select_country() or $in->exit(0);
+ } elsif ($@ !~ /wizcancel/) {
die;
+ } else {
+ $in->exit(0);
}
}
-lang::write('', $locale, $>);
+lang::write($locale, $>);
if ($>) {
if (my $wm = any::running_window_manager()) {
$in->ask_okcancel('', N("The change is done, but to be effective you must logout"), 1)
and any::ask_window_manager_to_logout($wm);
}
}
-
-the_end:
-$in->exit(0);
-
-