summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-03-07 18:30:25 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-03-07 18:30:25 +0000
commitad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed (patch)
tree855ee8ac35e6caf1434a076cb9d8ff55017f20fb
parent8f40903b27cdafb7bab649a3c314312376191f95 (diff)
downloaddrakx-ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed.tar
drakx-ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed.tar.gz
drakx-ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed.tar.bz2
drakx-ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed.tar.xz
drakx-ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed.zip
corrected the locale->keyboard list building
-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 7306bc255..b28fa55b7 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -336,16 +336,16 @@ sub unpack_keyboards {
}
sub lang2keyboards {
my @li = sort { $b->[1] <=> $a->[1] } map { @$_ } map {
- #- first try with the 5 first chars of LANG; if it fails try with
- #- with the 2 first chars of LANG, it still not good, with "us".
- unpack_keyboards($lang2keyboard{substr($_, 0, 5)}) || [ [ ($keyboards{substr($_, 0, 2)} ? $_ : "us") => 100 ] ];
+ #- first try with the 5 first chars of LANG; if it fails then try with
+ #- with the 2 first chars of LANG before resorting to default.
+ unpack_keyboards($lang2keyboard{substr($_, 0, 5)}) || unpack_keyboards($lang2keyboard{substr($_, 0, 2)}) || [ [ ($keyboards{$_} ? $_ : "us") => 100 ] ];
} @_;
\@li;
}
sub lang2keyboard {
my ($l) = @_;
my $kb = lang2keyboards($l)->[0][0];
- $keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us.
+ $keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboard mapping to us.
}
sub usb2drakxkbd {
my ($cc) = @_;