From 31036c1f60a4bcd5fc0c1e8d28092fc98a32b631 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 7 Sep 2001 12:53:57 +0000 Subject: cleanup --- perl-install/install_any.pm | 1 + perl-install/keyboard.pm | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 8795046c0..56f469594 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -396,6 +396,7 @@ sub setPackages { foreach (map { substr($_, 0, 2) } lang::langs($o->{langs})) { pkgs::packageByName($o->{packages}, "locales-$_") or next; push @{$o->{default_packages}}, "locales-$_"; + $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; #- mainly for zh in case of zh_TW.Big5 } foreach (lang::langsLANGUAGE($o->{langs})) { $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 9be6cfb9e..3e43d4a65 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -21,6 +21,7 @@ use c; my $KMAP_MAGIC = 0x8B39C07F; #- a best guess of the keyboard layout, based on the choosen locale +#- beware only the first 5 characters are used my %lang2keyboard = ( 'af' => 'us_intl', @@ -281,13 +282,13 @@ sub unpack_keyboards { [ map { [ split ':' ] } split ' ', $k ]; } sub lang2keyboards { - my ($l) = substr($_[0], 0, 5); - my $li = unpack_keyboards($lang2keyboard{$l}) || [ $keyboards{$l} && $l || "us" ]; + my ($l) = @_; + my $li = unpack_keyboards($lang2keyboard{substr($l, 0, 5)}) || [ $keyboards{$l} && $l || "us" ]; $li->[0][1] ||= 100; $li; } sub lang2keyboard { - my ($l) = substr($_[0], 0, 5); + my ($l) = @_; my $kb = lang2keyboards($l)->[0][0]; $keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us. } @@ -377,7 +378,7 @@ sub write { my ($prefix, $keyboard, $charset, $isNotDelete) = @_; my $config = read_raw($prefix); - put_in_hash($config, { + put_in_hash($config, { KEYTABLE => keyboard2kmap($keyboard), KBCHARSET => $charset, }); -- cgit v1.2.1