diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-14 12:25:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-14 12:25:00 +0000 |
commit | 891947e23e895cf6fdd465e2c7a36c885a0bf73e (patch) | |
tree | 46da3062212a9becbc0f4709f462db50ea81e821 /perl-install/any.pm | |
parent | 8fd384c7c95a38f252fb10b93effb7b8399d8c54 (diff) | |
download | drakx-891947e23e895cf6fdd465e2c7a36c885a0bf73e.tar drakx-891947e23e895cf6fdd465e2c7a36c885a0bf73e.tar.gz drakx-891947e23e895cf6fdd465e2c7a36c885a0bf73e.tar.bz2 drakx-891947e23e895cf6fdd465e2c7a36c885a0bf73e.tar.xz drakx-891947e23e895cf6fdd465e2c7a36c885a0bf73e.zip |
- localedrake, drakx-finish-install:
o fix proposing Belgium when lang is "nl" and locales-fr is not installed
(same for Canada with lang "fr" and locales-en not installed) (#36413)
nb:
- removed restricting countries to installed locales in list_countries(),
since c2locale is wrong for countries like CA or BE which have more than one
lang
- country_to_locales() is replaced with countries_to_locales() to avoid
redoing the same computation all the time
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index fa8d3c158..b0da2a94a 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1034,11 +1034,12 @@ sub selectCountry { my ($in, $locale) = @_; my $country = $locale->{country}; - my @countries = lang::list_countries(exclude_non_installed => !$::isInstall); + my $country2locales = lang::countries_to_locales(exclude_non_installed => !$::isInstall); + my @countries = keys %$country2locales; my @best = grep { find { - lang::locale_to_main_locale($_) eq lang::locale_to_main_locale($locale->{lang}); - } lang::country_to_locales($_); + $_->{main} eq lang::locale_to_main_locale($locale->{lang}); + } @{$country2locales->{$_}}; } @countries; @best == 1 and @best = (); |