diff options
Diffstat (limited to 'perl-install/standalone/localedrake')
| -rwxr-xr-x[-rw-r--r--] | perl-install/standalone/localedrake | 54 | 
1 files changed, 19 insertions, 35 deletions
diff --git a/perl-install/standalone/localedrake b/perl-install/standalone/localedrake index 5517ad5d1..231c528ea 100644..100755 --- a/perl-install/standalone/localedrake +++ b/perl-install/standalone/localedrake @@ -12,7 +12,7 @@ use any;  my ($klang, $kcountry, $apply);  foreach (@ARGV) { -    $apply = /--apply/; +    $apply = 1 if /--apply/;      $klang = $1 if /--kde_lang=(.*)/;      $kcountry = uc($1) if /--kde_country=(.*)/;  } @@ -24,7 +24,7 @@ if (defined $klang) {      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_and_install($locale, do_pkgs_standalone->new, $>, 'dont_touch_kde_files') if $apply;      #- help KDE defaulting to the right charset      print lang::charset2kde_charset(lang::l2charset($lang)), "\n"; @@ -34,40 +34,24 @@ if (defined $klang) {  my $locale = lang::read($>);  my $in = 'interactive'->vnew; -$ugtk2::wm_icon = "localedrake"; +$ugtk3::wm_icon = "localedrake";  $::Wizard_title = N("LocaleDrake"); -sub select_country() { -    any::selectCountry($in, $locale);   +any::selectLanguage_and_more_standalone($in, $locale); + +if ($>) { +    my @required_packages = lang::IM2packages($locale); +    my @missing_packages = difference2(\@required_packages, [ $in->do_pkgs->are_installed(@required_packages) ]); +    $in->ask_warn(N("Warning"), +		  N("You should install the following packages: %s",  +		    join( +			#-PO: the following is used to combine packages names. eg: "initscripts, harddrake, yudit" +			N(", "), +			@missing_packages, +		    ), +		) +	      ) if @missing_packages;  } +lang::write_and_install($locale, $in->do_pkgs, $>); -eval { -    local $::isWizard = 1; -  language: -    local $::Wizard_no_previous = 1; -    my $old_lang = $locale->{lang}; -    $in->{locale} = $locale; -    $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 $in->exit(0); -    } elsif ($@ !~ /wizcancel/) { -	die; -    } else { -        $in->exit(0); -    } -} - -lang::write($locale, $>); - -my $msg = N("The change is done, but to be effective you must logout"); -if (my $wm = $> && any::running_window_manager()) { -    $in->ask_yesorno('', $msg, 1) -      and any::ask_window_manager_to_logout($wm); -} else { -    $in->ask_warn('', $msg); -} +any::ask_for_X_restart($in);  | 
