diff options
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 1955a96dd..e55b866ed 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -49,16 +49,16 @@ sub selectLanguage($) { my ($o) = @_; $o->{lang} = lang::text2lang($o->ask_from_list("Language", - _("Which language do you want?"), + _("Which language do you want?"), # the translation may be used for the help - [ lang::list() ], + [ lang::list() ], lang::lang2text($o->{lang}))); install_steps::selectLanguage($o); } #------------------------------------------------------------------------------ sub selectKeyboard($) { my ($o) = @_; - $o->{keyboard} = + $o->{keyboard} = keyboard::text2keyboard($o->ask_from_list_("Keyboard", _("Which keyboard do you have?"), [ keyboard::list() ], @@ -70,9 +70,9 @@ sub selectKeyboard($) { sub selectPath($) { my ($o) = @_; $o->{isUpgrade} = - $o->ask_from_list_(_("Install/Upgrade"), + $o->ask_from_list_(_("Install/Upgrade"), _("Is this an install or an upgrade?"), - [ __("Install"), __("Upgrade") ], + [ __("Install"), __("Upgrade") ], $o->{isUpgrade} ? "Upgrade" : "Install") eq "Upgrade"; install_steps::selectPath($o); @@ -121,7 +121,7 @@ sub choosePartitionsToFormat($$) { install_steps::choosePartitionsToFormat($o, $fstab); my @l = grep { $_->{mntpoint} && isExt2($_) || isSwap($_) && !$::beginner } @$fstab; - my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"), + my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"), [ map { $_->{mntpoint} || type2name($_->{type}) . " ($_->{device})" } @l ], [ map { \$_->{toFormat} } @l ]); defined @r or die "cancel"; @@ -155,7 +155,7 @@ sub configureNetwork($) { __("Reconfigure network now"), __("Don't set up networking"), ); - $r = $o->ask_from_list_(_("Network Configuration"), + $r = $o->ask_from_list_(_("Network Configuration"), _("LAN networking has already been configured. Do you want to:"), [ @l ]); $r ||= "Don't"; @@ -164,7 +164,7 @@ sub configureNetwork($) { $o->ask_yesorno(_("Network Configuration"), _("Do you want to configure LAN (not dialup) networking for your installed system?")) or $r = "Don't"; } - + if ($r =~ /^Don't/) { $o->{netc}{NETWORKING} = "false"; } elsif ($r !~ /^Keep/) { @@ -182,7 +182,7 @@ sub configureNetwork($) { delete $o->{netc}{GATEWAY}; $last = $intf; } - #- { + #- { #- my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain...")); #- network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf}); #- } @@ -222,14 +222,14 @@ sub configureNetworkNet { my ($o, $netc, $intf, @devices) = @_; $netc->{dnsServer} ||= network::dns($intf->{IPADDR}); $netc->{GATEWAY} ||= network::gateway($intf->{IPADDR}); - + $o->ask_from_entries_ref(_("Configuring network"), _("Please enter your host name. Your host name should be a fully-qualified host name, such as ``mybox.mylab.myco.com''. Also give the gateway if you have one"), [_("Host name:"), _("DNS server:"), _("Gateway:"), !$::beginner ? _("Gateway device:") : ()], - [(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)), + [(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)), {val => \$netc->{GATEWAYDEV}, list => \@devices}] ); } @@ -249,12 +249,12 @@ sub timeConfig { #------------------------------------------------------------------------------ sub printerConfig($) { my ($o) = @_; - $o->{printer}{want} = + $o->{printer}{want} = $o->ask_yesorno(_("Printer"), _("Would you like to configure a printer?"), $o->{printer}{want}); return if !$o->{printer}{want}; - + unless (($::testing)) { printer::set_prefix($o->{prefix}); pkgs::select($o->{packages}, $o->{packages}{'rhs-printfilters'}); @@ -262,39 +262,39 @@ sub printerConfig($) { } printer::read_printer_db(); - + $o->{printer}{complete} = 0; if ($::expert) { #std info #Don't wait, if the user enter something, you must remember it $o->ask_from_entries_ref(_("Standard Printer Options"), - _("Every print queue (which print jobs are directed to) needs a -name (often lp) and a spool directory associated with it. What + _("Every print queue (which print jobs are directed to) needs a +name (often lp) and a spool directory associated with it. What name and directory should be used for this queue?"), [_("Name of queue:"), _("Spool directory:")], [\$o->{printer}{QUEUE}, \$o->{printer}{SPOOLDIR}], - changed => sub - { - $o->{printer}{SPOOLDIR} + changed => sub + { + $o->{printer}{SPOOLDIR} = "$printer::spooldir/$o->{printer}{QUEUE}" unless $_[0]; }, ); } - - $o->{printer}{str_type} = + + $o->{printer}{str_type} = $o->ask_from_list_(_("Select Printer Connection"), _("How is the printer connected?"), [keys %printer::printer_type], ${$o->{printer}}{str_type}, ); $o->{printer}{TYPE} = $printer::printer_type{$o->{printer}{str_type}}; - + if ($o->{printer}{TYPE} eq "LOCAL") { { my $w = $o->wait_message(_("Test ports"), _("Detecting devices...")); eval { modules::load("lp");modules::load("parport_probe"); }; } - + my @port = (); my @parport = detect_devices::whatPrinter(); eval { modules::unload("parport_probe") }; @@ -319,21 +319,21 @@ name and directory should be used for this queue?"), #-TAKE A GOODDEFAULT TODO } elsif ($o->{printer}{TYPE} eq "REMOTE") { - return if !$o->ask_from_entries_ref(_("Remote lpd Printer Options"), - _("To use a remote lpd print queue, you need to supply -the hostname of the printer server and the queue name + return if !$o->ask_from_entries_ref(_("Remote lpd Printer Options"), + _("To use a remote lpd print queue, you need to supply +the hostname of the printer server and the queue name on that server which jobs should be placed in."), [_("Remote hostname:"), _("Remote queue:")], [\$o->{printer}{REMOTEHOST}, \$o->{printer}{REMOTEQUEUE}], ); - + } elsif ($o->{printer}{TYPE} eq "SMB") { return if !$o->ask_from_entries_ref( _("SMB/Windows 95/NT Printer Options"), - _("To print to a SMB printer, you need to provide the -SMB host name (this is not always the same as the machines -TCP/IP hostname) and possibly the IP address of the print server, as -well as the share name for the printer you wish to access and any + _("To print to a SMB printer, you need to provide the +SMB host name (this is not always the same as the machines +TCP/IP hostname) and possibly the IP address of the print server, as +well as the share name for the printer you wish to access and any applicable user name, password, and workgroup information."), [_("SMB server host:"), _("SMB server IP:"), _("Share name:"), _("User name:"), _("Password:"), @@ -349,24 +349,24 @@ applicable user name, password, and workgroup information."), } return 0; }, - + ); } else {#($o->{printer}{TYPE} eq "NCP") { return if !$o->ask_from_entries_ref(_("NetWare Printer Options"), - _("To print to a NetWare printer, you need to provide the -NetWare print server name (this is not always the same as the machines -TCP/IP hostname) as well as the print queue name for the printer you + _("To print to a NetWare printer, you need to provide the +NetWare print server name (this is not always the same as the machines +TCP/IP hostname) as well as the print queue name for the printer you wish to access and any applicable user name and password."), - [_("Printer Server:"), _("Print Queue Name:"), + [_("Printer Server:"), _("Print Queue Name:"), _("User name:"), _("Password:")], [\$o->{printer}{NCPHOST}, \$o->{printer}{NCPQUEUE}, \$o->{printer}{NCPUSER}, {val => \$o->{printer}{NCPPASSWD}, hidden => 1}], ); } - - - $o->{printer}{DBENTRY} = + + + $o->{printer}{DBENTRY} = $printer::descr_to_db{ $o->ask_from_list_(_("Configure Printer"), _("What type of printer do you have?"), @@ -379,7 +379,7 @@ wish to access and any applicable user name and password."), #-paper size conf - $o->{printer}{PAPERSIZE} = + $o->{printer}{PAPERSIZE} = $o->ask_from_list_(_("Paper Size"), _("Paper Size"), \@printer::papersize_type, @@ -411,20 +411,20 @@ wish to access and any applicable user name and password."), my @col = map { "$_->{DEPTH} $_->{DESCR}" } @list_col; my %col_to_depth = map { ("$_->{DEPTH} $_->{DESCR}", $_->{DEPTH}) } @list_col; my %depth_to_col = reverse %col_to_depth; - + if (@list_col) { my $is_uniprint = $db_entry{GSDRIVER} eq "uniprint"; if ($is_uniprint) { - $o->{printer}{BITSPERPIXEL} = + $o->{printer}{BITSPERPIXEL} = $col_to_depth{$o->ask_from_list_ (_("Configure Uniprint Driver"), _("You may now configure the uniprint options for this printer."), \@col, $depth_to_col{$o->{printer}{BITSPERPIXEL}}, )}; - + } else { - $o->{printer}{BITSPERPIXEL} = + $o->{printer}{BITSPERPIXEL} = $col_to_depth{$o->ask_from_list_ (_("Configure Color Depth"), _("You may now configure the color options for this printer."), @@ -451,7 +451,7 @@ sub setRootPassword($) { $o->ask_from_entries_ref(_("Set root password"), _("Set root password"), [_("Password"), _("Password (again)")], - [{ val => \$sup->{password}, hidden => 1}, + [{ val => \$sup->{password}, hidden => 1}, { val => \$sup->{password2}, hidden => 1}], complete => sub { $sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("You must enter the same password"), _("Please try again") ]), return (1,1); @@ -463,7 +463,7 @@ sub setRootPassword($) { } #------------------------------------------------------------------------------ -#-addUser +#-addUser #------------------------------------------------------------------------------ sub addUser($) { my ($o) = @_; @@ -476,7 +476,7 @@ sub addUser($) { _("Add user"), _("Enter a user"), [ _("Real name"), _("User name"), _("Password"), _("Password (again)"), _("Shell") ], - [ \$u->{realname}, \$u->{name}, + [ \$u->{realname}, \$u->{name}, {val => \$u->{password}, hidden => 1}, {val => \$u->{password2}, hidden => 1}, {val => \$u->{shell}, list => \@shells, not_edit => !$::expert}, ], @@ -505,7 +505,7 @@ sub addUser($) { sub createBootdisk { my ($o, $first_time) = @_; my @l = detect_devices::floppies(); - + if ($first_time || @l == 1) { $o->ask_yesorno('', _("A custom bootdisk provides a way of booting into your Linux system without @@ -518,8 +518,8 @@ failures. Would you like to create a bootdisk for your system?"), !$o->{mkbootdi } else { @l or die _("Sorry, no floppy drive available"); - $o->{mkbootdisk} = $o->ask_from_list('', - _("Choose the floppy drive you want to use to make the bootdisk"), + $o->{mkbootdisk} = $o->ask_from_list('', + _("Choose the floppy drive you want to use to make the bootdisk"), [ @l, "Cancel" ], $o->{mkbootdisk}); return if $o->{mkbootdisk} eq "Cancel"; } @@ -534,10 +534,10 @@ sub setupBootloader($) { my ($o) = @_; my @l = (__("First sector of drive"), __("First sector of boot partition")); - $o->{bootloader}{onmbr} = - $o->ask_from_list_(_("Lilo Installation"), - _("Where do you want to install the bootloader?"), - \@l, + $o->{bootloader}{onmbr} = + $o->ask_from_list_(_("Lilo Installation"), + _("Where do you want to install the bootloader?"), + \@l, $l[!$o->{bootloader}{onmbr}] ) eq $l[0]; @@ -547,9 +547,9 @@ sub setupBootloader($) { my @entries = grep { $_->{liloLabel} } @{$o->{fstab}}; $o->ask_from_entries_ref('', -_("The boot manager Mandrake uses can boot other -operating systems as well. You need to tell me -what partitions you would like to be able to boot +_("The boot manager Mandrake uses can boot other +operating systems as well. You need to tell me +what partitions you would like to be able to boot and what label you want to use for each of them."), [map {"$_->{device}" . type2name($_->{type})} @entries], [map {\$_->{liloLabel}} @entries], @@ -560,7 +560,7 @@ and what label you want to use for each of them."), } #------------------------------------------------------------------------------ -sub exitInstall { +sub exitInstall { my ($o) = @_; $o->ask_warn('', _("Congratulations, installation is complete. @@ -578,15 +578,15 @@ install chapter of the Official Linux Mandrake User's Guide.")); sub loadModule { my ($o, $type) = @_; my @options; - - my $l = $o->ask_from_list('', - _("What %s card have you?", $type), + + my $l = $o->ask_from_list('', + _("What %s card have you?", $type), [ modules::text_of_type($type) ]) or return; my $m = modules::text2driver($l); my @names = modparm::get_options_name($m); - if ((!defined @names || @names > 0) && $o->ask_from_list('', + if ((!defined @names || @names > 0) && $o->ask_from_list('', _("In some cases, the %s driver needs to have extra information to work properly, although it normally works fine without. Would you like to specify extra options for it or allow the driver to probe your machine for the @@ -611,7 +611,7 @@ For example you can have ``io=0x300 irq=7''", $l), } eval { modules::load($m, $type, @options) }; if ($@) { - $o->ask_yesorno('', + $o->ask_yesorno('', _("Loading of module %s failed Do you want to try again with other parameters?", $l)) or return; goto ASK; @@ -623,8 +623,8 @@ Do you want to try again with other parameters?", $l)) or return; sub load_thiskind { my ($o, $type) = @_; my $w; - modules::load_thiskind($type, sub { - $w = $o->wait_message('', + modules::load_thiskind($type, sub { + $w = $o->wait_message('', [ _("Installing driver for %s card %s", $type, $_->[0]), $::beginner ? () : _("(module %s)", $_->[1]) ]); @@ -638,10 +638,10 @@ sub setup_thiskind { return if $auto && (@l || !$at_least_one); while (1) { my $msg = @l ? - [ _("Found %s %s interfaces", join(", ", map { $_->[0] } @l), $type), + [ _("Found %s %s interfaces", join(", ", map { $_->[0] } @l), $type), _("Do you have another one?") ] : _("Do you have an %s interface?", $type); - + my $opt = [ __("Yes"), __("No") ]; push @$opt, __("See hardware info") if $::expert; my $r = "Yes"; |