summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-02-08 22:09:29 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-02-08 22:09:29 +0000
commit7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9 (patch)
tree71e2baa4516d151f4462c692502a3a7dff5ef4df /perl-install/install_steps.pm
parentdd9a661c53728a4ea265882a1029c9b323cd6d3c (diff)
downloaddrakx-backup-do-not-use-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar
drakx-backup-do-not-use-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.gz
drakx-backup-do-not-use-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.bz2
drakx-backup-do-not-use-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.tar.xz
drakx-backup-do-not-use-7fa65d931c24bd00a7d9ec9b26adaf7ad80023b9.zip
language/country selection change:
- first install step is selection of your language, in your language; it uses images for that - language->country is probed, the selection of the country is possible if there was a problem, in the Summary step - in the $o big structure, we now use $o->{locale} which contains three keys: lang, country and utf8 - lang.pm has been cleaned and rewritten a bit - keyboard probing now done only on language (because this step is at the beginning of the install) - timezone probing done on country, if use changes country before timezone in the Summary, re-probe timezone accordingly
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm29
1 files changed, 17 insertions, 12 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 724b5f99c..d5c7b5854 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -88,31 +88,36 @@ sub set_help { 1 }
#------------------------------------------------------------------------------
sub selectLanguage {
my ($o) = @_;
- lang::set($o->{lang}, !$o->isa('interactive::gtk'));
- $o->{langs} ||= { $o->{lang} => 1 };
+ lang::set($o->{locale}{lang}, !$o->isa('interactive::gtk'));
+ $o->{locale}{langs} ||= { $o->{locale}{lang} => 1 };
- log::l("selectLanguage: pack_langs ", lang::pack_langs($o->{langs}));
+ if (!exists $o->{locale}{country}) {
+ lang::l2locale($o->{locale}{lang}) =~ /^.._(..)/;
+ $o->{locale}{country} = $1;
+ }
+
+ log::l("selectLanguage: pack_langs ", lang::pack_langs($o->{locale}{langs}));
#- for auto_install compatibility with old $o->{keyboard} containing directly $o->{keyboard}{KEYBOARD}
$o->{keyboard} = { KEYBOARD => $o->{keyboard} } if $o->{keyboard} && !ref($o->{keyboard});
if (!$o->{keyboard} || $o->{keyboard}{unsafe}) {
- $o->{keyboard} = keyboard::from_usb() || keyboard::lang2keyboard($o->{lang});
+ $o->{keyboard} = keyboard::from_usb() || keyboard::lang2keyboard($o->{locale}{lang});
$o->{keyboard}{unsafe} = 1;
keyboard::setup($o->{keyboard}) if !$::live;
}
addToBeDone {
- lang::write_langs($o->{prefix}, $o->{langs});
+ lang::write_langs($o->{prefix}, $o->{locale}{langs});
} 'formatPartitions' unless $::g_auto_install;
addToBeDone {
- lang::write($o->{prefix}, $o->{lang});
+ lang::write($o->{prefix}, $o->{locale});
} 'installPackages' unless $::g_auto_install;
}
#------------------------------------------------------------------------------
sub selectKeyboard {
my ($o) = @_;
- $o->{keyboard}{KBCHARSET} = lang::lang2charset($o->{lang});
+ $o->{keyboard}{KBCHARSET} = lang::l2charset($o->{locale}{lang});
keyboard::setup($o->{keyboard});
addToBeDone {
@@ -165,7 +170,7 @@ sub doPartitionDisksAfter {
}
fs::set_removable_mntpoints($o->{all_hds});
- fs::set_all_default_options($o->{all_hds}, $o->{useSupermount}, $o->{security}, lang::fs_options($o->{lang}))
+ fs::set_all_default_options($o->{all_hds}, $o->{useSupermount}, $o->{security}, lang::fs_options($o->{locale}))
if !$o->{isUpgrade};
$o->{fstab} = [ fsedit::get_all_fstab($o->{all_hds}) ];
@@ -454,14 +459,14 @@ EOF
$o->install_urpmi;
- if ($o->{lang} =~ /^(zh_TW|th|vi|be|bg)/) {
+ if ($o->{locale}{lang} =~ /^(zh_TW|th|vi|be|bg)/) {
#- skip since we don't have the right font (it badly fails at least for zh_TW)
- } elsif (my $LANG = lang::lang2LANG($o->{lang})) {
- my $kde_charset = lang::charset2kde_charset(lang::lang2charset($o->{lang}));
+ } else {
+ my $kde_charset = lang::charset2kde_charset(lang::l2charset($o->{locale}{lang}));
my $welcome = c::to_utf8(N("Welcome to %s", '%n'));
substInFile {
s/^(GreetString)=.*/$1=$welcome/;
- s/^(Language)=.*/$1=$LANG/;
+ s/^(Language)=.*/$1=$o->{locale}{lang}/;
if (!member($kde_charset, 'iso8859-1', 'iso8859-15')) {
#- don't keep the default for those
s/^(StdFont)=.*/$1=*,12,5,$kde_charset,50,0/;