diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-27 07:11:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-08-27 07:11:57 +0000 |
commit | a8ef01a2a557ca5db35c9a84c8db493e5bc6974b (patch) | |
tree | ffb3d28d13532238ec6ad12dafcce40ac4f7a4f4 /perl-install | |
parent | 4094fde48a94210ea45478924a73c3c7882b5739 (diff) | |
download | drakx-a8ef01a2a557ca5db35c9a84c8db493e5bc6974b.tar drakx-a8ef01a2a557ca5db35c9a84c8db493e5bc6974b.tar.gz drakx-a8ef01a2a557ca5db35c9a84c8db493e5bc6974b.tar.bz2 drakx-a8ef01a2a557ca5db35c9a84c8db493e5bc6974b.tar.xz drakx-a8ef01a2a557ca5db35c9a84c8db493e5bc6974b.zip |
(IM2packages)
- alter prototype: directly take a locale hash
- get lang from locale hash
- use it to install needed packages depending on locale (instead of
only generic ones depending on IM)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/lang.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm index de731a317..7b27b2174 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -656,9 +656,11 @@ my %IM2packages = ( ); sub IM2packages { - my ($im, $locale) = @_; + my ($locale) = @_; + my $im = $locale->{IM}; return if $im eq "None"; - my $packages = $IM2packages{$im}{$locale} || $IM2packages{$im}{generic}; + my $lang = analyse_locale_name($locale->{lang})->{main}; + my $packages = $IM2packages{$im}{$lang} || $IM2packages{$im}{generic}; return $packages ? @$packages : $im; } @@ -1031,7 +1033,7 @@ sub write { if ($locale->{IM}) { delete @$h{qw(GTK_IM_MODULE XIM XIM_PROGRAM XMODIFIERS)}; add2hash($h, $gtkqt_im{$locale->{IM}}); - my @packages = IM2packages($locale->{IM}); + my @packages = IM2packages($locale); if (@packages && $b_user_only) { require interactive; interactive->vnew->ask_warn(N("Warning"), @@ -1044,7 +1046,7 @@ sub write { ) ); } elsif(@packages) { - do_pkgs_standalone->new->install((IM2packages($locale->{IM}), )) ; + do_pkgs_standalone->new->install(IM2packages($locale)); } } |