summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/lang.pm6
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;