summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
commit9091151d546e5d749b47e2efce3ff651784fcc8c (patch)
tree2be2bec5e60f21ffe431eeef74095896ae5efe7f /perl-install/network
parent68a1a2a6f2b9fdb1fd0c833cd9b3d8dcb9d8fd5c (diff)
downloaddrakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.gz
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.bz2
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.xz
drakx-9091151d546e5d749b47e2efce3ff651784fcc8c.zip
replace "_" with "N" and "__" with "N_"
rationale: - currently, we use _("xxx") as a shorthand for gettext("xxx"). It also used to call xgettext with --keyword=_ - alas, function &_ is global and not by package (notice esp. that _ is not exported in common.pm) - this lead to big ugly pb with packages defining their own &_, overriding common.pm's &_ - a fix is to set @::textdomains to add a new domain (the default being "libDrakX") but relying on the global "_" is still dangerous!
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm26
-rw-r--r--perl-install/network/drakfirewall.pm24
-rw-r--r--perl-install/network/ethernet.pm34
-rw-r--r--perl-install/network/isdn.pm42
-rw-r--r--perl-install/network/modem.pm26
-rw-r--r--perl-install/network/netconnect.pm90
-rw-r--r--perl-install/network/network.pm52
-rw-r--r--perl-install/network/shorewall.pm4
-rw-r--r--perl-install/network/tools.pm64
9 files changed, 181 insertions, 181 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 7516a70de..57eb93ff7 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -16,18 +16,18 @@ sub configure {
my ($netcnx, $netc, $intf, $first_time) = @_;
$::isInstall and $in->set_help('configureNetworkADSL');
conf_adsl_step1:
- # my $type = $in->ask_from_list_(_("Connect to the Internet"),
- # _("The most common way to connect with adsl is pppoe.
+ # my $type = $in->ask_from_list_(N("Connect to the Internet"),
+ # N("The most common way to connect with adsl is pppoe.
# Some connections use pptp, a few ones use dhcp.
- # If you don't know, choose 'use pppoe'"), [__("use pppoe"), __("use pptp"), __("use dhcp"), __("Alcatel speedtouch usb"), __("ECI Hi-Focus")]) or return;
+ # If you don't know, choose 'use pppoe'"), [N_("use pppoe"), N_("use pptp"), N_("use dhcp"), N_("Alcatel speedtouch usb"), N_("ECI Hi-Focus")]) or return;
my @l = (
- [__("use pppoe"),
- __("use pptp"),
- __("use dhcp"),
- __("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected")]
+ [N_("use pppoe"),
+ N_("use pptp"),
+ N_("use dhcp"),
+ N_("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected")]
);
- my $type = $in->ask_from_list_(_("Connect to the Internet"),
- _("The most common way to connect with adsl is pppoe.
+ my $type = $in->ask_from_list_(N("Connect to the Internet"),
+ N("The most common way to connect with adsl is pppoe.
Some connections use pptp, a few ones use dhcp.
If you don't know, choose 'use pppoe'"), @l) or return;
$type =~ s/use //;
@@ -38,8 +38,8 @@ If you don't know, choose 'use pppoe'"), @l) or return;
adsl_conf($netcnx->{"adsl_$type"}, $netc, $intf, $type) or goto conf_adsl_step1;
#-network::configureNetwork($prefix, $netc, $in, $intf, $first_time);
# if ($::isStandalone and $netc->{NET_DEVICE}) {
-# $in->ask_yesorno(_("Network interface"),
-# _("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1)
+# $in->ask_yesorno(N("Network interface"),
+# N("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1)
# and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}");
# }
}
@@ -151,10 +151,10 @@ user "$adsl->{login}"
['ppp-compress-26', 'ppp_deflate']);
$::isStandalone and modules::write_conf($prefix);
$in->do_pkgs->what_provides("speedtouch_mgmt") and $in->do_pkgs->install('speedtouch_mgmt');
- -e "$prefix/usr/share/speedtouch/mgmt.o" or $in->ask_warn('', _('You need the alcatel microcode.
+ -e "$prefix/usr/share/speedtouch/mgmt.o" or $in->ask_warn('', N("You need the alcatel microcode.
Download it at
http://www.speedtouchdsl.com/dvrreg_lx.htm
-and copy the mgmt.o in /usr/share/speedtouch'));
+and copy the mgmt.o in /usr/share/speedtouch"));
}
if ($adsl_type eq 'eci') {
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm
index 55e4af694..7e1e225aa 100644
--- a/perl-install/network/drakfirewall.pm
+++ b/perl-install/network/drakfirewall.pm
@@ -9,12 +9,12 @@ use common;
my @all_servers =
(
{
- name => _("Web Server"),
+ name => N("Web Server"),
pkg => 'apache apache-mod_perl boa',
ports => '80/tcp 443/tcp',
},
{
- name => _("Domain Name Server"),
+ name => N("Domain Name Server"),
pkg => 'bind',
ports => '53/tcp 53/udp',
},
@@ -29,12 +29,12 @@ my @all_servers =
ports => '20/tcp 21/tcp',
},
{
- name => _("Mail Server"),
+ name => N("Mail Server"),
pkg => 'sendmail postfix qmail',
ports => '25/tcp',
},
{
- name => _("POP and IMAP Server"),
+ name => N("POP and IMAP Server"),
pkg => 'imap courier-imap-pop',
ports => '109/tcp 110/tcp 143/tcp',
},
@@ -108,7 +108,7 @@ sub get_ports {
sub set_ports {
my ($disabled, $ports) = @_;
- my $shorewall = network::shorewall::read() || network::shorewall::default_interfaces() or die _("No network card");
+ my $shorewall = network::shorewall::read() || network::shorewall::default_interfaces() or die N("No network card");
$shorewall->{disabled} = $disabled;
$shorewall->{ports} = $$ports;
@@ -126,13 +126,13 @@ sub get_conf {
} elsif (my $shorewall = network::shorewall::read()) {
$shorewall->{disabled}, from_ports(\$shorewall->{ports});
} else {
- $in->ask_okcancel('', _("drakfirewall configurator
+ $in->ask_okcancel('', N("drakfirewall configurator
This configures a personal firewall for this Mandrake Linux machine.
For a powerful dedicated firewall solution, please look to the
specialized MandrakeSecurity Firewall distribution."), 1) or return;
- $in->ask_okcancel('', _("drakfirewall configurator
+ $in->ask_okcancel('', N("drakfirewall configurator
Make sure you have configured your Network/Internet access with
drakconnect before going any further."), 1) or return;
@@ -149,14 +149,14 @@ sub choose {
my @l = grep { $_->{on} || !$_->{hide} } @all_servers;
$in->ask_from_({
- messages => _("Which services would you like to allow the Internet to connect to?"),
- advanced_messages => _("You can enter miscellaneous ports.
+ messages => N("Which services would you like to allow the Internet to connect to?"),
+ advanced_messages => N("You can enter miscellaneous ports.
Valid examples are: 139/tcp 139/udp.
Have a look at /etc/services for information."),
callbacks => {
complete => sub {
if (my $invalid_port = check_ports_syntax($unlisted)) {
- $in->ask_warn('', _("Invalid port given: %s.
+ $in->ask_warn('', N("Invalid port given: %s.
The proper format is \"port/tcp\" or \"port/udp\",
where port is between 1 and 65535.", $invalid_port));
return 1;
@@ -164,9 +164,9 @@ where port is between 1 and 65535.", $invalid_port));
},
}},
[
- { text => _("Everything (no firewall)"), val => \$disabled, type => 'bool' },
+ { text => N("Everything (no firewall)"), val => \$disabled, type => 'bool' },
(map { { text => $_->{name}, val => \$_->{on}, type => 'bool', disabled => sub { $disabled } } } @l),
- { label => _("Other ports"), val => \$unlisted, advanced => 1, disabled => sub { $disabled } }
+ { label => N("Other ports"), val => \$unlisted, advanced => 1, disabled => sub { $disabled } }
]) or return;
$disabled, to_ports([ grep { $_->{on} } @l ], $unlisted);
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index beade3468..82b5ff82f 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -18,12 +18,12 @@ sub configure_cable {
$::isInstall and $in->set_help('configureNetworkCable');
$netcnx->{type}='cable';
# $netcnx->{cable}={};
- # $in->ask_from_entries_ref(_("Cable connection"),
- # _("Please enter your host name if you know it.
+ # $in->ask_from_entries_ref(N("Cable connection"),
+ # N("Please enter your host name if you know it.
# Some DHCP servers require the hostname to work.
# Your host name should be a fully-qualified host name,
# such as ``mybox.mylab.myco.com''."),
- # [_("Host name:")], [ \$netcnx->{cable}{hostname} ]);
+ # [N("Host name:")], [ \$netcnx->{cable}{hostname} ]);
if ($::expert) {
my @m = (
{ description => "dhcpcd",
@@ -33,8 +33,8 @@ sub configure_cable {
{ description => "dhcp-client",
c => 4},
);
- if (my $f = $in->ask_from_listf(_("Connect to the Internet"),
- _("Which dhcp client do you want to use?
+ if (my $f = $in->ask_from_listf(N("Connect to the Internet"),
+ N("Which dhcp client do you want to use?
Default is dhcpcd"),
sub { $_[0]{description} },
\@m)) {
@@ -85,12 +85,12 @@ sub conf_network_card {
any::load_category($in, 'network/main|usb', !$::expert, 1);
my @all_cards = conf_network_card_backend($netc, $intf, $type, undef, $ipadr, $netadr);
my $interface;
- @all_cards == () and $in->ask_warn('', _("No ethernet network adapter has been detected on your system.
+ @all_cards == () and $in->ask_warn('', N("No ethernet network adapter has been detected on your system.
I cannot set up this connection type.")) and return;
@all_cards == 1 and $interface = $all_cards[0][0] and goto l1;
again :
- $interface = $in->ask_from_list(_("Choose the network interface"),
- _("Please choose which network adapter you want to use to connect to Internet"),
+ $interface = $in->ask_from_list(N("Choose the network interface"),
+ N("Please choose which network adapter you want to use to connect to Internet"),
[ map { $_->[0] . ($_->[1] ? " (using module $_->[1])" : "") } @all_cards ]
) or return;
defined $interface or goto again;
@@ -99,8 +99,8 @@ I cannot set up this connection type.")) and return;
my $device = conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface);
# if ( $::isStandalone and !($type eq "dhcp")) {
-# $in->ask_yesorno(_("Network interface"),
-# _("I'm about to restart the network device:\n") . $device . _("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device");
+# $in->ask_yesorno(N("Network interface"),
+# N("I'm about to restart the network device:\n") . $device . N("\nDo you agree?"), 1) and configureNetwork2($in, $prefix, $netc, $intf) and system("$prefix/sbin/ifdown $device;$prefix/sbin/ifup $device");
# }
1;
}
@@ -165,8 +165,8 @@ sub go_ethernet {
$netc->{NET_INTERFACE}=$netc->{NET_DEVICE};
configureNetwork($netc, $intf, $first_time) or return;
# if ( $::isStandalone and $netc->{NET_DEVICE}) {
-# $in->ask_yesorno(_("Network interface"),
-# _("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1) and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}");
+# $in->ask_yesorno(N("Network interface"),
+# N("I'm about to restart the network device %s. Do you agree?", $netc->{NET_DEVICE}), 1) and system("$prefix/sbin/ifdown $netc->{NET_DEVICE}; $prefix/sbin/ifup $netc->{NET_DEVICE}");
# }
1;
}
@@ -175,7 +175,7 @@ sub configureNetwork {
my ($netc, $intf, $first_time) = @_;
local $_;
any::load_category($in, 'network/main|usb|pcmcia', !$::expert, 1) or return;
- my @l = detect_devices::getNet() or die _("no network card found");
+ my @l = detect_devices::getNet() or die N("no network card found");
my @all_cards = conf_network_card_backend ($netc, $intf, undef, undef, undef, undef);
configureNetwork_step_1:
@@ -191,7 +191,7 @@ sub configureNetwork {
$n_card++;
}
#- {
- #- my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain..."));
+ #- my $wait = $o->wait_message(N("Hostname"), N("Determining host name and domain..."));
#- network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf});
#- }
$last or return;
@@ -199,12 +199,12 @@ sub configureNetwork {
$netc->{minus_one} = 1;
my $dhcp_hostname = $netc->{HOSTNAME};
$::isInstall and $in->set_help('configureNetworkHostDHCP');
- $in->ask_from(_("Configuring network"),
-_("Please enter your host name if you know it.
+ $in->ask_from(N("Configuring network"),
+N("Please enter your host name if you know it.
Some DHCP servers require the hostname to work.
Your host name should be a fully-qualified host name,
such as ``mybox.mylab.myco.com''."),
- [ { label => _("Host name"), val => \$netc->{HOSTNAME} }]) or goto configureNetwork_step_1;
+ [ { label => N("Host name"), val => \$netc->{HOSTNAME} }]) or goto configureNetwork_step_1;
$netc->{HOSTNAME} ne $dhcp_hostname and $netc->{DHCP_HOSTNAME} = $netc->{HOSTNAME};
} else {
configureNetworkNet($in, $netc, $last ||= {}, @l) or goto configureNetwork_step_1;
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 8dfeb0fdf..cd084bb2a 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -18,8 +18,8 @@ sub configure {
isdn_step_1:
defined $netc->{autodetect}{isdn}{id} and goto intern_pci;
$::isInstall and $in->set_help('configureNetworkISDN');
- my $e = $in->ask_from_list_(_("Network Configuration Wizard"),
- _("What kind is your ISDN connection?"), [ __("Internal ISDN card"), __("External ISDN modem")]
+ my $e = $in->ask_from_list_(N("Network Configuration Wizard"),
+ N("What kind is your ISDN connection?"), [ N_("Internal ISDN card"), N_("External ISDN modem")]
) or return;
if ($e =~ /card/) {
intern_pci:
@@ -41,8 +41,8 @@ sub configure {
sub isdn_write_config {
my ($isdn, $netc) = @_;
isdn_write_config_step_1:
- my $e = $in->ask_from_list_(_("Network Configuration Wizard"),
- _("Which ISDN configuration do you prefer?
+ my $e = $in->ask_from_list_(N("Network Configuration Wizard"),
+ N("Which ISDN configuration do you prefer?
* The Old configuration uses isdn4net. It contains powerful
tools, but is tricky to configure, and not standard.
@@ -51,7 +51,7 @@ sub isdn_write_config {
standard, but with less tools.
We recommand the light configuration.
-"), [ __("New configuration (isdn-light)"), __("Old configuration (isdn4net)")]
+"), [ N_("New configuration (isdn-light)"), N_("Old configuration (isdn4net)")]
) or return;
my ($rmpackage, $instpackage) = $e =~ /light/ ? ('isdn4net', 'isdn-light') : ('isdn-light', 'isdn4net');
if (!$::isStandalone) {
@@ -167,7 +167,7 @@ sub isdn_ask_info {
my ($isdn, $netc) = @_;
my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db";
$f = "$prefix$f" if !-e $f;
- my $str = $in->ask_from_treelist(_("ISDN Configuration"), _("Select your provider.\nIf it isn't listed, choose Unlisted."),
+ my $str = $in->ask_from_treelist(N("ISDN Configuration"), N("Select your provider.\nIf it isn't listed, choose Unlisted."),
'|', ['Unlisted - edit manually',
read_providers_backend($f)], 'Unlisted - edit manually')
or return;
@@ -180,13 +180,13 @@ sub isdn_ask_info {
sub isdn_ask_protocol {
my @toto = (
- { description => $::expert ? _("Europe protocol (EDSS1)") : _("Europe protocol"),
+ { description => $::expert ? N("Europe protocol (EDSS1)") : N("Europe protocol"),
protokol => 2},
- { description => $::expert ? _("Protocol for the rest of the world\nNo D-Channel (leased lines)") : _("Protocol for the rest of the world"),
+ { description => $::expert ? N("Protocol for the rest of the world\nNo D-Channel (leased lines)") : N("Protocol for the rest of the world"),
protokol => 3}
);
- my $e = $in->ask_from_listf(_("ISDN Configuration"),
- _("Which protocol do you want to use?"),
+ my $e = $in->ask_from_listf(N("ISDN Configuration"),
+ N("Which protocol do you want to use?"),
sub { $_[0]{description} },
\@toto) or return 0;
$e->{protokol};
@@ -197,31 +197,31 @@ sub isdn_ask {
#- ISDN card already detected
if (!$::expert && defined $netc->{autodetect}{isdn}{card_type}) {
- $in->ask_yesorno(_("ISDN Configuration"), _("Found \"%s\" interface do you want to use it ?",$netc->{autodetect}{isdn}{description}), 1) or return;
+ $in->ask_yesorno(N("ISDN Configuration"), N("Found \"%s\" interface do you want to use it ?",$netc->{autodetect}{isdn}{description}), 1) or return;
$isdn->{$_} = $netc->{autodetect}{isdn}{$_} foreach qw(description vendor id card_type driver type mem io io0 io1 irq firmware);
goto isdn_ask_step_3;
}
isdn_ask_step_1:
- my $e = $in->ask_from_list_(_("ISDN Configuration"),
- $label . "\n" . _("What kind of card do you have?"),
- [ __("ISA / PCMCIA"), __("PCI"), __("I don't know") ]
+ my $e = $in->ask_from_list_(N("ISDN Configuration"),
+ $label . "\n" . N("What kind of card do you have?"),
+ [ N_("ISA / PCMCIA"), N_("PCI"), N_("I don't know") ]
) or return;
if ($e =~ /PCI/) {
$isdn->{card_type} = 'pci';
} else {
- $in->ask_from_list_(_("ISDN Configuration"),
- _("
+ $in->ask_from_list_(N("ISDN Configuration"),
+ N("
If you have an ISA card, the values on the next screen should be right.\n
If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
"),
- [ __("Continue"), __("Abort") ]) eq 'Continue' or goto isdn_ask_step_1;
+ [ N_("Continue"), N_("Abort") ]) eq 'Continue' or goto isdn_ask_step_1;
$isdn->{card_type} = 'isa';
}
isdn_ask_step_2:
- $e = $in->ask_from_listf(_("ISDN Configuration"),
- _("Which is your ISDN card?"),
+ $e = $in->ask_from_listf(N("ISDN Configuration"),
+ N("Which is your ISDN card?"),
sub { $_[0]{description} },
[ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto isdn_ask_step_1;
$e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware);
@@ -240,7 +240,7 @@ sub isdn_detect {
log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n");
$isdn->{description} =~ s/\|/ -- /;
if ($isdn->{type} eq '') {
- isdn_ask($isdn, $netc, _("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or return;
+ isdn_ask($isdn, $netc, N("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or return;
} else {
isdn_detect_step_1:
$isdn->{protocol}=isdn_ask_protocol() or return;
@@ -249,7 +249,7 @@ sub isdn_detect {
isdn_write_config($isdn, $netc) or goto isdn_detect_step_2;
}
} else {
- isdn_ask($isdn, $netc, _("No ISDN PCI card found. Please select one on the next screen.")) or return;
+ isdn_ask($isdn, $netc, N("No ISDN PCI card found. Please select one on the next screen.")) or return;
}
$netc->{$_}='ippp0' foreach 'NET_DEVICE', 'NET_INTERFACE';
1;
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index e5134fa47..6bde79dff 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -36,20 +36,20 @@ sub pppConfig {
$mouse ||={};
$mouse->{device} ||= readlink "$prefix/dev/mouse";
$::isInstall and $in->set_help('selectSerialPort');
- $modem->{device} ||= $in->ask_from_listf('', _("Please choose which serial port your modem is connected to."),
+ $modem->{device} ||= $in->ask_from_listf('', N("Please choose which serial port your modem is connected to."),
\&mouse::serial_port2text,
[ grep { $_ ne $mouse->{device} } (mouse::serial_ports(), if_(-e '/dev/modem', '/dev/modem')) ]) || return;
$::isStandalone || $in->set_help('configureNetworkISP');
- $in->ask_from('', _("Dialup options"), [
-{ label => _("Connection name"), val => \$modem->{connection} },
-{ label => _("Phone number"), val => \$modem->{phone} },
-{ label => _("Login ID"), val => \$modem->{login} },
-{ label => _("Password"), val => \$modem->{passwd}, hidden => 1 },
-{ label => _("Authentication"), val => \$modem->{auth}, list => [ __("PAP"), __("Terminal-based"), __("Script-based"), __("CHAP") ] },
-{ label => _("Domain name"), val => \$modem->{domain} },
-{ label => _("First DNS Server (optional)"), val => \$modem->{dns1} },
-{ label => _("Second DNS Server (optional)"), val => \$modem->{dns2} },
+ $in->ask_from('', N("Dialup options"), [
+{ label => N("Connection name"), val => \$modem->{connection} },
+{ label => N("Phone number"), val => \$modem->{phone} },
+{ label => N("Login ID"), val => \$modem->{login} },
+{ label => N("Password"), val => \$modem->{passwd}, hidden => 1 },
+{ label => N("Authentication"), val => \$modem->{auth}, list => [ N_("PAP"), N_("Terminal-based"), N_("Script-based"), N_("CHAP") ] },
+{ label => N("Domain name"), val => \$modem->{domain} },
+{ label => N("First DNS Server (optional)"), val => \$modem->{dns1} },
+{ label => N("Second DNS Server (optional)"), val => \$modem->{dns2} },
]) or return;
$netc->{DOMAINNAME2} = $modem->{domain};
any::pppConfig($in, $modem, $prefix);
@@ -66,12 +66,12 @@ sub winmodemConfigure {
my $temp;
/Hcf/ and $temp = "hcf";
/Hsf/ and $temp = "hsf";
- $temp and $in->do_pkgs->what_provides("${temp}linmodem") and $type="${temp}linmodem";
+ $temp and $in->do_pkgs->what_provides("${temp}linmodem") and $type = "${temp}linmodem";
}
- $type || $in->ask_warn(_("Warning"), _("Your modem isn't supported by the system.
+ $type || $in->ask_warn(N("Warning"), N("Your modem isn't supported by the system.
Take a look at http://www.linmodems.org")) && return 1;
- my $e = $in->ask_from_list(_("Title"), _("\"%s\" based winmodem detected, do you want to install needed software ?", $type), [_("Install rpm"), _("Do nothing")]) or return 0;
+ my $e = $in->ask_from_list(N("Title"), N("\"%s\" based winmodem detected, do you want to install needed software ?", $type), [N("Install rpm"), N("Do nothing")]) or return 0;
$e =~ /rpm/ ? $in->do_pkgs->install($type) : return 1;
1;
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 4d29e2739..f515d85ef 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -26,24 +26,24 @@ sub intro {
read_net_conf($prefix, $netcnx, $netc);
if (!$::isWizard) {
if (connected()) {
- $text = _("You are currently connected to internet.") . (-e $disconnect_file ? _("\nYou can disconnect or reconfigure your connection.") : _("\nYou can reconfigure your connection."));
+ $text = N("You are currently connected to internet.") . (-e $disconnect_file ? N("\nYou can disconnect or reconfigure your connection.") : N("\nYou can reconfigure your connection."));
$connected = 1;
} else {
- $text = _("You are not currently connected to Internet.") . (-e $connect_file ? _("\nYou can connect to Internet or reconfigure your connection.") : _("\nYou can reconfigure your connection."));
+ $text = N("You are not currently connected to Internet.") . (-e $connect_file ? N("\nYou can connect to Internet or reconfigure your connection.") : N("\nYou can reconfigure your connection."));
$connected = 0;
}
my @l = (
- !$connected && -e $connect_file ? { description => _("Connect"),
+ !$connected && -e $connect_file ? { description => N("Connect"),
c => 1} : (),
- $connected && -e $disconnect_file ? { description => _("Disconnect"),
+ $connected && -e $disconnect_file ? { description => N("Disconnect"),
c => 2} : (),
- { description => _("Configure the connection"),
+ { description => N("Configure the connection"),
c => 3},
- { description => _("Cancel"),
+ { description => N("Cancel"),
c => 4},
);
- my $e = $in->ask_from_listf(_("Internet connection & configuration"),
- _($text),
+ my $e = $in->ask_from_listf(N("Internet connection & configuration"),
+ translate($text),
sub { $_[0]{description} },
\@l);
run_program::rooted($prefix, $connect_prog) if ($e->{c}==1);
@@ -91,21 +91,21 @@ sub pre_func {
$::Wizard_splash = 1;
require my_gtk;
my_gtk->import(qw(:wrappers));
- my $W = my_gtk->new(_("Network Configuration Wizard"));
+ my $W = my_gtk->new(N("Network Configuration Wizard"));
gtkadd($W->{window},
gtkpack_(new Gtk::VBox(0, 0),
1, write_on_pixmap(gtkpng ("drakconnect_step"),
20,200,
- _("We are now going to configure the %s connection.",_($text)),
+ N("We are now going to configure the %s connection.", translate($text)),
),
- 0, $W->create_okcancel(_("OK"))
+ 0, $W->create_okcancel(N("OK"))
)
);
$W->main;
$::Wizard_splash = 0;
} else {
#- for i18n : %s is the type of connection of the list: (modem, isdn, adsl, cable, local network);
- $in->ask_okcancel(_("Network Configuration Wizard"), _("\n\n\nWe are now going to configure the %s connection.\n\n\nPress OK to continue.",_($_[0])), 1);
+ $in->ask_okcancel(N("Network Configuration Wizard"), N("\n\n\nWe are now going to configure the %s connection.\n\n\nPress OK to continue.", translate($_[0])), 1);
}
undef $::Wizard_no_previous;
}
@@ -134,8 +134,8 @@ sub main {
my $direct_net_install;
if ($first_time && $::isInstall && ($in->{method} eq "ftp" || $in->{method} eq "http" || $in->{method} eq "nfs")) {
- (!($::expert || $noauto) or $in->ask_okcancel(_("Network Configuration"),
- _("Because you are doing a network installation, your network is already configured.
+ (!($::expert || $noauto) or $in->ask_okcancel(N("Network Configuration"),
+ N("Because you are doing a network installation, your network is already configured.
Click on Ok to keep your configuration, or cancel to reconfigure your Internet & Network connection.
"), 1)) and do {
$netcnx->{type}='lan';
@@ -160,22 +160,22 @@ ifdown eth0
step_1:
$::Wizard_no_previous=1;
my @profiles = get_profiles();
- $in->ask_from(_("Network Configuration Wizard"),
- _("Welcome to The Network Configuration Wizard.
+ $in->ask_from(N("Network Configuration Wizard"),
+ N("Welcome to The Network Configuration Wizard.
We are about to configure your internet/network connection.
If you don't want to use the auto detection, deselect the checkbox.
"),
[
- if_(@profiles > 1, { label => _("Choose the profile to configure"), val => \$netcnx->{PROFILE}, list => \@profiles }),
- { label => _("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' },
- if_($::isStandalone, { label => _("Expert Mode"), val => \$::expert, type => 'bool' }),
+ if_(@profiles > 1, { label => N("Choose the profile to configure"), val => \$netcnx->{PROFILE}, list => \@profiles }),
+ { label => N("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' },
+ if_($::isStandalone, { label => N("Expert Mode"), val => \$::expert, type => 'bool' }),
]
) or goto step_5;
undef $::Wizard_no_previous;
set_profile($netcnx);
if ($netc->{autodetection}) {
- my $w = $in->wait_message(_("Network Configuration Wizard"), _("Detecting devices..."));
+ my $w = $in->wait_message(N("Network Configuration Wizard"), N("Detecting devices..."));
detect($netc->{autodetect}, $::isInstall && ($in->{method} eq "ftp" || $in->{method} eq "http" || $in->{method} eq "nfs"));
}
@@ -186,24 +186,24 @@ If you don't want to use the auto detection, deselect the checkbox.
$conf{$_} = $netc->{autodetect}{$_} ? 1 : 0 foreach 'modem', 'winmodem', 'adsl', 'cable', 'lan';
$conf{isdn} = $netc->{autodetect}{isdn}{description} ? 1: 0;
# my @l = (
-# [_("Normal modem connection"), $netc->{autodetect}{modem}, __("detected on port %s"), \$conf{modem}],
-# [_("ISDN connection"), $netc->{autodetect}{isdn}{description}, __("detected %s"), \$conf{isdn}],
-# [_("ADSL connection"), $netc->{autodetect}{adsl}, __("detected"), \$conf{adsl}],
-# [_("Cable connection"), $netc->{autodetect}{cable}, __("cable connection detected"), \$conf{cable}],
-# [_("LAN connection"), $netc->{autodetect}{lan}, __("ethernet card(s) detected"), \$conf{lan}]
+# [N("Normal modem connection"), $netc->{autodetect}{modem}, N_("detected on port %s"), \$conf{modem}],
+# [N("ISDN connection"), $netc->{autodetect}{isdn}{description}, N_("detected %s"), \$conf{isdn}],
+# [N("ADSL connection"), $netc->{autodetect}{adsl}, N_("detected"), \$conf{adsl}],
+# [N("Cable connection"), $netc->{autodetect}{cable}, N_("cable connection detected"), \$conf{cable}],
+# [N("LAN connection"), $netc->{autodetect}{lan}, N_("ethernet card(s) detected"), \$conf{lan}]
# );
my $i = 0;
map { defined $set_default or do { $_->[1] and $set_default = $i }; $i++ } @l;
@l = (
-[_("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . _("detected on port %s", $netc->{autodetect}{modem})), \$conf{modem}],
-[_("Winmodem connection") . if_($netc->{autodetect}{winmodem}, " - " . _("detected")), \$conf{winmodem}],
-[_("ISDN connection") . if_($netc->{autodetect}{isdn}{description}, " - " . _("detected %s", $netc->{autodetect}{isdn}{description})), \$conf{isdn}],
-[_("ADSL connection") . if_($netc->{autodetect}{adsl}, " - " . _("detected")), \$conf{adsl}],
-[_("Cable connection") . if_($netc->{autodetect}{cable}, " - " . _("cable connection detected")), \$conf{cable}],
-[_("LAN connection") . if_($netc->{autodetect}{lan}, " - " . _("ethernet card(s) detected")), \$conf{lan}]
+[N("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . N("detected on port %s", $netc->{autodetect}{modem})), \$conf{modem}],
+[N("Winmodem connection") . if_($netc->{autodetect}{winmodem}, " - " . N("detected")), \$conf{winmodem}],
+[N("ISDN connection") . if_($netc->{autodetect}{isdn}{description}, " - " . N("detected %s", $netc->{autodetect}{isdn}{description})), \$conf{isdn}],
+[N("ADSL connection") . if_($netc->{autodetect}{adsl}, " - " . N("detected")), \$conf{adsl}],
+[N("Cable connection") . if_($netc->{autodetect}{cable}, " - " . N("cable connection detected")), \$conf{cable}],
+[N("LAN connection") . if_($netc->{autodetect}{lan}, " - " . N("ethernet card(s) detected")), \$conf{lan}]
);
$::isInstall and $in->set_help('configureNetwork');
- my $e = $in->ask_from(_("Network Configuration Wizard"), _("Choose the connection you want to configure"),
+ my $e = $in->ask_from(N("Network Configuration Wizard"), N("Choose the connection you want to configure"),
[ map { { label => $_->[0], val => $_->[1], type => 'bool' } } @l ],
changed => sub {
return if !$netc->{autodetection};
@@ -227,15 +227,15 @@ If you don't want to use the auto detection, deselect the checkbox.
my $nb = keys %{$netc->{internet_cnx}};
if ($nb < 1) {
} elsif ($nb > 1) {
- $in->ask_from(_("Network Configuration Wizard"),
- _("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")),
- [ { label => _("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} ]
+ $in->ask_from(N("Network Configuration Wizard"),
+ N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")),
+ [ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} ]
) or goto step_2;
} elsif ($nb == 1) {
$netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0];
}
member($netc->{internet_cnx_choice}, ('adsl', 'isdn')) and
- $netc->{at_boot} = $in->ask_yesorno(_("Network Configuration Wizard"), _("Do you want to start the connection at boot?"));
+ $netc->{at_boot} = $in->ask_yesorno(N("Network Configuration Wizard"), N("Do you want to start the connection at boot?"));
if ($netc->{internet_cnx_choice} ) {
write_cnx_script($netc);
$netcnx->{type} = $netc->{internet_cnx}{$netc->{internet_cnx_choice}}{type};
@@ -249,12 +249,12 @@ If you don't want to use the auto detection, deselect the checkbox.
network::configureNetwork2($in, $prefix, $netc, $intf);
my $network_configured = 1;
- if ($netconnect::need_restart_network && $::isStandalone and ($::expert or $in->ask_yesorno(_("Network configuration"),
- _("The network needs to be restarted"), 1))) {
+ if ($netconnect::need_restart_network && $::isStandalone and ($::expert or $in->ask_yesorno(N("Network configuration"),
+ N("The network needs to be restarted"), 1))) {
#- run_program::rooted($prefix, "/etc/rc.d/init.d/network stop");
if (!run_program::rooted($prefix, "/etc/rc.d/init.d/network restart")) {
$success = 0;
- $in->ask_okcancel(_("Network Configuration"), _("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network restart`), 0);
+ $in->ask_okcancel(N("Network Configuration"), N("A problem occured while restarting the network: \n\n%s", `/etc/rc.d/init.d/network restart`), 0);
}
}
@@ -264,17 +264,17 @@ If you don't want to use the auto detection, deselect the checkbox.
step_3:
- my $m = $success ? _("Congratulations, the network and Internet configuration is finished.
+ my $m = $success ? N("Congratulations, the network and Internet configuration is finished.
The configuration will now be applied to your system.
") . if_($::isStandalone && $in->isa('interactive_gtk'),
-_("After this is done, we recommend that you restart your X environment to avoid any hostname-related problems."))
- : _("Problems occured during configuration.
+N("After this is done, we recommend that you restart your X environment to avoid any hostname-related problems."))
+ : N("Problems occured during configuration.
Test your connection via net_monitor or mcc. If your connection doesn't work, you might want to relaunch the configuration.");
if ($::isWizard) {
$::Wizard_no_previous=1;
$::Wizard_finished=1;
- $in->ask_okcancel(_("Network Configuration"), $m, 1);
+ $in->ask_okcancel(N("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
} else { $::isStandalone and $in->ask_warn('', $m) }
@@ -343,8 +343,8 @@ fi
#- any::load_category($in, 'network/main|usb', !$::expert, 1);
#- $netc->{nb_cards} = listlength(detect_devices::getNet());
#- };
-#- ($netc->{nb_cards} - $netc->{minus_one} - (get_net_device($prefix) =~ /eth.+/ ? 1 : 0) > 0) and $in->ask_okcancel(_("Network Configuration"),
-#-_("Now that your Internet connection is configured,
+#- ($netc->{nb_cards} - $netc->{minus_one} - (get_net_device($prefix) =~ /eth.+/ ? 1 : 0) > 0) and $in->ask_okcancel(N("Network Configuration"),
+#-N("Now that your Internet connection is configured,
#-your computer can be configured to share its Internet connection.
#-Note: you need a dedicated Network Adapter to set up a Local Area Network (LAN).
#-
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 3e7f8222a..4c92ead01 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -192,7 +192,7 @@ sub addDefaultRoute {
sub sethostname {
my ($netc) = @_;
- syscall_('sethostname', $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!");
+ syscall_("sethostname", $netc->{HOSTNAME}, length $netc->{HOSTNAME}) or log::l("sethostname failed: $!");
}
sub resolv($) {
@@ -290,12 +290,12 @@ sub configureNetworkIntf {
}
if ($net_device eq $intf->{DEVICE}) {
$skip and return 1;
- $text = _("WARNING: this device has been previously configured to connect to the Internet.
+ $text = N("WARNING: this device has been previously configured to connect to the Internet.
Simply accept to keep this device configured.
Modifying the fields below will override this configuration.");
}
else {
- $text = _("Please enter the IP configuration for this machine.
+ $text = N("Please enter the IP configuration for this machine.
Each item should be entered as an IP address in dotted-decimal
notation (for example, 1.2.3.4).");
}
@@ -305,13 +305,13 @@ notation (for example, 1.2.3.4).");
my $onboot = 1;
my @fields = qw(IPADDR NETMASK);
$::isStandalone or $in->set_help('configureNetworkIP');
- $in->ask_from(_("Configuring network device %s", $intf->{DEVICE}),
- (_("Configuring network device %s", $intf->{DEVICE}) . ($module ? _(" (driver %s)", $module) : '') ."\n\n") .
+ $in->ask_from(N("Configuring network device %s", $intf->{DEVICE}),
+ (N("Configuring network device %s", $intf->{DEVICE}) . ($module ? N(" (driver %s)", $module) : '') ."\n\n") .
$text,
- [ { label => _("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } },
- { label => _("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } },
- { label => _("Automatic IP"), val => \$pump, type => "bool", text => _("(bootp/dhcp)") },
- if_($::expert, { label => _("Start at boot"), val => \$onboot, type => "bool" }),
+ [ { label => N("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } },
+ { label => N("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } },
+ { label => N("Automatic IP"), val => \$pump, type => "bool", text => N("(bootp/dhcp)") },
+ if_($::expert, { label => N("Start at boot"), val => \$onboot, type => "bool" }),
if_($intf->{wireless_eth},
{ label => "WIRELESS_MODE", val => \$intf->{WIRELESS_MODE}, list => [ "Ad-hoc", "Managed", "Master", "Repeater", "Secondary", "Auto"] },
{ label => "WIRELESS_ESSID", val => \$intf->{WIRELESS_ESSID} },
@@ -332,17 +332,17 @@ notation (for example, 1.2.3.4).");
return 0 if $pump;
for (my $i = 0; $i < @fields; $i++) {
unless (is_ip($intf->{$fields[$i]})) {
- $in->ask_warn('', _("IP address should be in format 1.2.3.4"));
+ $in->ask_warn('', N("IP address should be in format 1.2.3.4"));
return (1,$i);
}
return 0;
}
if ($intf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) {
- $in->ask_warn('', _('Freq should have the suffix k, M or G (for example, "2.46G" for 2.46 GHz frequency), or add enough \'0\'.'));
+ $in->ask_warn('', N("Freq should have the suffix k, M or G (for example, \"2.46G\" for 2.46 GHz frequency), or add enough \'0\'."));
return (1,6);
}
if ($intf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) {
- $in->ask_warn('', _('Rate should have the suffix k, M or G (for example, "11M" for 11M), or add enough \'0\'.'));
+ $in->ask_warn('', N("Rate should have the suffix k, M or G (for example, \"11M\" for 11M), or add enough \'0\'."));
return (1,8);
}
},
@@ -361,25 +361,25 @@ sub configureNetworkNet {
#- $netc->{GATEWAY} ||= gateway($intf->{IPADDR});
$::isInstall and $in->set_help('configureNetworkHost');
- $in->ask_from(_("Configuring network"),
-_("Please enter your host name.
+ $in->ask_from(N("Configuring network"),
+N("Please enter your host name.
Your host name should be a fully-qualified host name,
such as ``mybox.mylab.myco.com''.
You may also enter the IP address of the gateway if you have one"),
- [ { label => _("Host name"), val => \$netc->{HOSTNAME} },
- { label => _("DNS server"), val => \$netc->{dnsServer} },
- { label => _("Gateway (e.g. %s)", $gateway_ex), val => \$netc->{GATEWAY} },
+ [ { label => N("Host name"), val => \$netc->{HOSTNAME} },
+ { label => N("DNS server"), val => \$netc->{dnsServer} },
+ { label => N("Gateway (e.g. %s)", $gateway_ex), val => \$netc->{GATEWAY} },
if_(@devices > 1,
- { label => _("Gateway device"), val => \$netc->{GATEWAYDEV}, list => \@devices },
+ { label => N("Gateway device"), val => \$netc->{GATEWAYDEV}, list => \@devices },
),
],
complete => sub {
if ($netc->{dnsServer} and !is_ip($netc->{dnsServer})) {
- $in->ask_warn('', _("DNS server address should be in format 1.2.3.4"));
+ $in->ask_warn('', N("DNS server address should be in format 1.2.3.4"));
return 1;
}
if ($netc->{GATEWAY} and !is_ip($netc->{GATEWAY})) {
- $in->ask_warn('', _("Gateway address should be in format 1.2.3.4"));
+ $in->ask_warn('', N("Gateway address should be in format 1.2.3.4"));
return 1;
}
0;
@@ -393,14 +393,14 @@ sub miscellaneousNetwork {
$::isInstall and $in->set_help('configureNetworkProxy');
$u->{track_network_id} = detect_devices::isLaptop();
$::expert || $clicked and ($in->ask_from('',
- _("Proxies configuration"),
- [ { label => _("HTTP proxy"), val => \$u->{http_proxy} },
- { label => _("FTP proxy"), val => \$u->{ftp_proxy} },
- if_(!$no_track_net, { label => _("Track network card id (useful for laptops)"), val => \$u->{track_network_id}, type => "bool" }),
+ N("Proxies configuration"),
+ [ { label => N("HTTP proxy"), val => \$u->{http_proxy} },
+ { label => N("FTP proxy"), val => \$u->{ftp_proxy} },
+ if_(!$no_track_net, { label => N("Track network card id (useful for laptops)"), val => \$u->{track_network_id}, type => "bool" }),
],
complete => sub {
- $u->{http_proxy} =~ m,^($|http://), or $in->ask_warn('', _("Proxy should be http://...")), return 1,0;
- $u->{ftp_proxy} =~ m,^($|ftp://|http://), or $in->ask_warn('', _("Url should begin with 'ftp:' or 'http:'")), return 1,1;
+ $u->{http_proxy} =~ m,^($|http://), or $in->ask_warn('', N("Proxy should be http://...")), return 1,0;
+ $u->{ftp_proxy} =~ m,^($|ftp://|http://), or $in->ask_warn('', N("Url should begin with 'ftp:' or 'http:'")), return 1,1;
0;
}
) or return);
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 941d5673d..d93817e9e 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -23,8 +23,8 @@ sub check_iptables {
-x '/sbin/iptables' && listlength(`/sbin/iptables -t nat -nL`) > 8;
};
- !$existing_config || $in->ask_okcancel(_("Firewalling configuration detected!"),
- _("Warning! An existing firewalling configuration has been detected. You may need some manual fix after installation."));
+ !$existing_config || $in->ask_okcancel(N("Firewalling configuration detected!"),
+ N("Warning! An existing firewalling configuration has been detected. You may need some manual fix after installation."));
}
sub set_config_file {
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 8f81c4c1b..dba446beb 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -38,12 +38,12 @@ sub ask_connect_now {
my ($type) = @_;
$::Wizard_no_previous=1;
#- FIXME : code the exception to be generated by ask_yesorno, to be able to remove the $::Wizard_no_previous=1;
- if ($in->ask_yesorno(_("Internet configuration"),
- _("Do you want to try to connect to the Internet now?")
+ if ($in->ask_yesorno(N("Internet configuration"),
+ N("Do you want to try to connect to the Internet now?")
)) {
my $up;
{
- my $w = $in->wait_message('', _("Testing your connection..."), 1);
+ my $w = $in->wait_message('', N("Testing your connection..."), 1);
connect_backend();
my $s = 30;
$type =~ /modem/ and $s = 50;
@@ -53,14 +53,14 @@ sub ask_connect_now {
my $netc = {};
$up = connected();
}
- my $m = $up ? (_("The system is now connected to Internet.") .
- if_($::isInstall, _("For security reason, it will be disconnected now.")) ) :
- _("The system doesn't seem to be connected to internet.
+ my $m = $up ? (N("The system is now connected to Internet.") .
+ if_($::isInstall, N("For security reason, it will be disconnected now.")) ) :
+ N("The system doesn't seem to be connected to internet.
Try to reconfigure your connection.");
if ($::isWizard) {
$::Wizard_no_previous=1;
$::Wizard_finished=1;
- $in->ask_okcancel(_("Network Configuration"), $m, 1);
+ $in->ask_okcancel(N("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
} else { $in->ask_warn('', $m) }
@@ -79,29 +79,29 @@ sub read_providers_backend { my ($file) = @_; map { /(.*?)=>/ } catMaybeCompress
sub ask_info2 {
my ($cnx, $netc) = @_;
$::isInstall and $in->set_help('configureNetworkDNS');
- $in->ask_from(_("Connection Configuration"),
- _("Please fill or check the field below"),
+ $in->ask_from(N("Connection Configuration"),
+ N("Please fill or check the field below"),
[
- if__($cnx->{irq}, { label => _("Card IRQ"), val => \$cnx->{irq} }) ,
- if__($cnx->{mem}, { label => _("Card mem (DMA)"), val => \$cnx->{mem} }),
- if__($cnx->{io}, { label => _("Card IO"), val => \$cnx->{io} }),
- if__($cnx->{io0}, { label => _("Card IO_0"), val => \$cnx->{io0} }),
- if__($cnx->{io1}, { label => _("Card IO_1"), val => \$cnx->{io1} }),
- if__($cnx->{phone_in}, { label => _("Your personal phone number"), val => \$cnx->{phone_in} }),
- if__($netc->{DOMAINNAME2}, { label => _("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} }),
- if__($cnx->{phone_out}, { label => _("Provider phone number"), val => \$cnx->{phone_out} }),
- if__($netc->{dnsServer2}, { label => _("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }),
- if__($netc->{dnsServer3}, { label => _("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }),
- if__($cnx->{vpivci}, { label => _("Choose your country"), val => \$netc->{vpivci}, list => detect_timezone() }),
- if__($cnx->{dialing_mode}, { label => _("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}),
- if__($cnx->{speed}, { label => _("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}),
- if__($cnx->{huptimeout}, { label => _("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }),
- if__($cnx->{login}, { label => _("Account Login (user name)"), val => \$cnx->{login} }),
- if__($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd}, hidden => 1 }),
+ if__($cnx->{irq}, { label => N("Card IRQ"), val => \$cnx->{irq} }) ,
+ if__($cnx->{mem}, { label => N("Card mem (DMA)"), val => \$cnx->{mem} }),
+ if__($cnx->{io}, { label => N("Card IO"), val => \$cnx->{io} }),
+ if__($cnx->{io0}, { label => N("Card IO_0"), val => \$cnx->{io0} }),
+ if__($cnx->{io1}, { label => N("Card IO_1"), val => \$cnx->{io1} }),
+ if__($cnx->{phone_in}, { label => N("Your personal phone number"), val => \$cnx->{phone_in} }),
+ if__($netc->{DOMAINNAME2}, { label => N("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} }),
+ if__($cnx->{phone_out}, { label => N("Provider phone number"), val => \$cnx->{phone_out} }),
+ if__($netc->{dnsServer2}, { label => N("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }),
+ if__($netc->{dnsServer3}, { label => N("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }),
+ if__($cnx->{vpivci}, { label => N("Choose your country"), val => \$netc->{vpivci}, list => detect_timezone() }),
+ if__($cnx->{dialing_mode}, { label => N("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}),
+ if__($cnx->{speed}, { label => N("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}),
+ if__($cnx->{huptimeout}, { label => N("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }),
+ if__($cnx->{login}, { label => N("Account Login (user name)"), val => \$cnx->{login} }),
+ if__($cnx->{passwd}, { label => N("Account Password"), val => \$cnx->{passwd}, hidden => 1 }),
]
) or return;
if ($netc->{vpivci}) {
- foreach ([_("Netherlands"), '8_48'], [_("France"), '8_35'], [_("Belgium"), '8_35'], [_("Italy"), '8_35'], [_("United Kingdom"), '0_38'], [_("United States"), '8_35']) {
+ foreach ([N("Netherlands"), '8_48'], [N("France"), '8_35'], [N("Belgium"), '8_35'], [N("Italy"), '8_35'], [N("United Kingdom"), '0_38'], [N("United States"), '8_35']) {
$netc->{vpivci} eq $_->[0] and $netc->{vpivci} = $_->[1];
}
}
@@ -110,12 +110,12 @@ sub ask_info2 {
sub detect_timezone {
my %tmz2country = (
- 'Europe/Paris' => _("France"),
- 'Europe/Amsterdam' => _("Netherlands"),
- 'Europe/Rome' => _("Italy"),
- 'Europe/Brussels' => _("Belgium"),
- 'America/New_York' => _("United States"),
- 'Europe/London' => _("United Kingdom")
+ 'Europe/Paris' => N("France"),
+ 'Europe/Amsterdam' => N("Netherlands"),
+ 'Europe/Rome' => N("Italy"),
+ 'Europe/Brussels' => N("Belgium"),
+ 'America/New_York' => N("United States"),
+ 'Europe/London' => N("United Kingdom")
);
my %tm_parse = MDK::Common::System::getVarsFromSh('/etc/sysconfig/clock');
foreach (keys %tmz2country) {