From 9091151d546e5d749b47e2efce3ff651784fcc8c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 6 Nov 2002 13:20:21 +0000 Subject: 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! --- perl-install/network/tools.pm | 64 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'perl-install/network/tools.pm') 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) { -- cgit v1.2.1