diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-06-05 21:23:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-06-05 21:23:50 +0000 |
commit | ba3766567c585e7e344cff2dc9c258dc14d34c86 (patch) | |
tree | 0a8d10ff7c230596ae7934a71a0e93942d2aa6da /perl-install/lang.pm | |
parent | bb13f6d7bd095907b71ed6f6049d7210c11d703d (diff) | |
download | drakx-ba3766567c585e7e344cff2dc9c258dc14d34c86.tar drakx-ba3766567c585e7e344cff2dc9c258dc14d34c86.tar.gz drakx-ba3766567c585e7e344cff2dc9c258dc14d34c86.tar.bz2 drakx-ba3766567c585e7e344cff2dc9c258dc14d34c86.tar.xz drakx-ba3766567c585e7e344cff2dc9c258dc14d34c86.zip |
(countries_to_locales) further fix listing locales (#58543 bis, from
herton too)
localedrake expects YET in anoter placeS that we always have xx_XX and
xx_XX.UTF-8.
But since 2010.1, the locales package was changed to only provide
default glibc locales (plus only some new locales which are
exceptions), before we had redundant but always a xx_XX dir created.
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r-- | perl-install/lang.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm index f48e05320..9f7d95ab8 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -185,7 +185,7 @@ sub l2language { exists $langs{$_[0]} && $langs{$_[0]}[5] } sub is_locale_installed { my ($locale) = @_; - my @ctypes = glob "/usr/share/locale/" . l2locale($locale) . "{,.*}/LC_CTYPE"; + my @ctypes = glob "/usr/share/locale/" . $locale . "{,.*}/LC_CTYPE"; foreach my $ctype (@ctypes) { -e $ctype && return 1 } 0; } @@ -193,7 +193,7 @@ sub is_locale_installed { sub list_langs { my (%options) = @_; my @l = keys %langs; - $options{exclude_non_installed} ? grep { is_locale_installed($_) } @l : @l; + $options{exclude_non_installed} ? grep { is_locale_installed(l2locale($_)) } @l : @l; } sub text_direction_rtl() { @@ -536,7 +536,7 @@ sub countries_to_locales { my $may_add = sub { my ($locale, $country) = @_; if ($options{exclude_non_installed}) { - -e "/usr/share/locale/$locale/LC_CTYPE" or return; + is_locale_installed($locale) or return; } my $h = analyse_locale_name($locale) or internal_error(); push @{$country2locales{$country || $h->{country}}}, $h; |