summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-08 15:53:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-08 15:53:01 +0000
commit85fbbce70f17538cb4a9c5a1ad1a212f2e96487c (patch)
tree9d57cae958b79db19e6e83aa19eeed6e9b348a81 /perl-install
parent4d5530fe42b7ef35e362af65c1ff03102d4ceb27 (diff)
downloaddrakx-85fbbce70f17538cb4a9c5a1ad1a212f2e96487c.tar
drakx-85fbbce70f17538cb4a9c5a1ad1a212f2e96487c.tar.gz
drakx-85fbbce70f17538cb4a9c5a1ad1a212f2e96487c.tar.bz2
drakx-85fbbce70f17538cb4a9c5a1ad1a212f2e96487c.tar.xz
drakx-85fbbce70f17538cb4a9c5a1ad1a212f2e96487c.zip
further cleanup
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/lang.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 9b4efa365..29fba2f23 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -460,13 +460,18 @@ our @locales = qw(aa_DJ aa_ER aa_ER@saaho aa_ET af_ZA am_ET an_ES ar_AE ar_BH ar
sub standard_locale {
my ($lang, $country, $prefer_lang) = @_;
- member("${lang}_${country}", @locales) and return "${lang}_${country}";
- $prefer_lang && member($lang, @locales) and return $lang;
- my $main_locale = locale_to_main_locale($lang);
- if ($main_locale ne $lang) {
- standard_locale($main_locale, $country, $prefer_lang);
+
+ if (member("${lang}_${country}", @locales)) {
+ "${lang}_${country}";
+ } elsif ($prefer_lang && member($lang, @locales)) {
+ $lang;
} else {
- '';
+ my $main_locale = locale_to_main_locale($lang);
+ if ($main_locale ne $lang) {
+ standard_locale($main_locale, $country, $prefer_lang);
+ } else {
+ '';
+ }
}
}