summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-05-11 23:18:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-05-11 23:18:21 +0000
commitfcf8e1b52fcf5e81c5548e0b77df71f4d95430e4 (patch)
tree498491d25a0290e232f236927a37dccdc233ac27 /perl-install/any.pm
parent76fdde3ca84a2cb6ce204e973f2386ac0738957b (diff)
downloaddrakx-backup-do-not-use-fcf8e1b52fcf5e81c5548e0b77df71f4d95430e4.tar
drakx-backup-do-not-use-fcf8e1b52fcf5e81c5548e0b77df71f4d95430e4.tar.gz
drakx-backup-do-not-use-fcf8e1b52fcf5e81c5548e0b77df71f4d95430e4.tar.bz2
drakx-backup-do-not-use-fcf8e1b52fcf5e81c5548e0b77df71f4d95430e4.tar.xz
drakx-backup-do-not-use-fcf8e1b52fcf5e81c5548e0b77df71f4d95430e4.zip
use lang::analyse_locale_name() and lang::analyse_locale_name()
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 5eff5c9b2..4abda68be 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -685,8 +685,11 @@ sub selectCountry {
my $country = $locale->{country};
my @countries = lang::list_countries(exclude_non_installed => !$::isInstall);
- my @best = uniq map { if_((/^\Q$locale->{lang}/ || substr($_, 0, 2) eq substr($locale->{lang}, 0, 2))
- && /.._(..)/, $1) } @lang::locales;
+ my @best = uniq grep {
+ my $h = lang::analyse_locale_name($_);
+ if_($h->{main} eq lang::locale_to_main_locale($locale->{lang}) && $h->{country},
+ $h->{country});
+ } @lang::locales;
@best == 1 and @best = ();
my ($other, $ext_country);