summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-24 18:10:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-24 18:10:38 +0000
commite3b9af2efa018719c597a75e7baa116670579462 (patch)
treefa303c5990d1c827d01077eda766a0e281844225 /perl-install/keyboard.pm
parent5e65513637d653e2c9d3f5f121a7db348a240324 (diff)
downloaddrakx-e3b9af2efa018719c597a75e7baa116670579462.tar
drakx-e3b9af2efa018719c597a75e7baa116670579462.tar.gz
drakx-e3b9af2efa018719c597a75e7baa116670579462.tar.bz2
drakx-e3b9af2efa018719c597a75e7baa116670579462.tar.xz
drakx-e3b9af2efa018719c597a75e7baa116670579462.zip
use the langs chosen to know the keyboards to propose (and not only the main lang)
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index f6eb9842d..aefb6ef5a 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -336,10 +336,10 @@ sub unpack_keyboards {
} map { [ split ':' ] } split ' ', $k ];
}
sub lang2keyboards {
- my ($l) = @_;
- my $li = unpack_keyboards($lang2keyboard{substr($l, 0, 5)}) || [ $keyboards{$l} && $l || "us" ];
- $li->[0][1] ||= 100 if @$li;
- $li;
+ my @li = sort { $b->[1] <=> $a->[1] } map { @$_ } map {
+ unpack_keyboards($lang2keyboard{substr($_, 0, 5)}) || [ [ ($keyboards{$_} ? $_ : "us") => 100 ] ];
+ } @_;
+ \@li;
}
sub lang2keyboard {
my ($l) = @_;