From ad6d41d9fd97f0ea3ec106ee5d61f3a8c1481aed Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Thu, 7 Mar 2002 18:30:25 +0000 Subject: corrected the locale->keyboard list building --- perl-install/keyboard.pm | 8 ++++---- 1 file 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) = @_; -- cgit v1.2.1