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/proxy.pm | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'perl-install/proxy.pm') diff --git a/perl-install/proxy.pm b/perl-install/proxy.pm index b01a7b9bf..84ccbfa33 100644 --- a/perl-install/proxy.pm +++ b/perl-install/proxy.pm @@ -26,26 +26,26 @@ sub main { begin: $::isWizard = 1; $::Wizard_no_previous = 1; - $in->ask_okcancel(_("Proxy configuration"), - _("Welcome to the proxy configuration utility.\n\nHere, you'll be able to set up your http and ftp proxies\nwith or without login and password\n" + $in->ask_okcancel(N("Proxy configuration"), + N("Welcome to the proxy configuration utility.\n\nHere, you'll be able to set up your http and ftp proxies\nwith or without login and password\n" ), 1); # http proxy step_http_proxy: undef $::Wizard_no_previous; $proxy_cfg->{http_url} ||= "http://www.proxy.com/"; - $in->ask_from(_("Proxy configuration"), - _("Please fill in the http proxy informations\nLeave it blank if you don't want an http proxy"), - [ { label => _("URL"), val => \$proxy_cfg->{http_url} }, - { label => _("port"), val => \$proxy_cfg->{http_port} } + $in->ask_from(N("Proxy configuration"), + N("Please fill in the http proxy informations\nLeave it blank if you don't want an http proxy"), + [ { label => N("URL"), val => \$proxy_cfg->{http_url} }, + { label => N("port"), val => \$proxy_cfg->{http_port} } ], complete => sub { if ($proxy_cfg->{http_url} && $proxy_cfg->{http_url} !~ /^http:/) { - $in->ask_warn('', _("Url should begin with 'http:'")); + $in->ask_warn('', N("Url should begin with 'http:'")); return (1,0); } if ($proxy_cfg->{http_port} && $proxy_cfg->{http_port} !~ /^\d+$/) { - $in->ask_warn('', _("The port part should be numeric")); + $in->ask_warn('', N("The port part should be numeric")); return (1,1); } 0; @@ -55,18 +55,18 @@ sub main { # ftp proxy step_ftp_proxy: $proxy_cfg->{ftp_url} ||= "ftp://ftp.proxy.com/"; - $in->ask_from(_("Proxy configuration"), - _("Please fill in the ftp proxy informations\nLeave it blank if you don't want an ftp proxy"), - [ { label => _("URL"), val => \$proxy_cfg->{ftp_url} }, - { label => _("port"), val => \$proxy_cfg->{ftp_port} } + $in->ask_from(N("Proxy configuration"), + N("Please fill in the ftp proxy informations\nLeave it blank if you don't want an ftp proxy"), + [ { label => N("URL"), val => \$proxy_cfg->{ftp_url} }, + { label => N("port"), val => \$proxy_cfg->{ftp_port} } ], complete => sub { if ($proxy_cfg->{ftp_url} && $proxy_cfg->{ftp_url} !~ /^(ftp|http):/) { - $in->ask_warn('', _("Url should begin with 'ftp:' or 'http:'")); + $in->ask_warn('', N("Url should begin with 'ftp:' or 'http:'")); return (1,0); } if ($proxy_cfg->{ftp_port} && $proxy_cfg->{ftp_port} !~ /^\d+$/) { - $in->ask_warn('', _("The port part should be numeric")); + $in->ask_warn('', N("The port part should be numeric")); return (1,1); } 0; @@ -75,17 +75,17 @@ sub main { # proxy login/passwd step_login: - $in->ask_from(_("Proxy configuration"), - _("Please enter proxy login and password, if any.\nLeave it blank if you don't want login/passwd"), - [ { label => _("login"), val => \$proxy_cfg->{login} }, + $in->ask_from(N("Proxy configuration"), + N("Please enter proxy login and password, if any.\nLeave it blank if you don't want login/passwd"), + [ { label => N("login"), val => \$proxy_cfg->{login} }, { - label => _("password"), val => \$proxy_cfg->{passwd}, hidden => 1 }, + label => N("password"), val => \$proxy_cfg->{passwd}, hidden => 1 }, { - label => _("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 } + label => N("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 } ], complete => sub { if ($proxy_cfg->{passwd} ne $proxy_cfg->{passwd2}) { - $in->ask_warn('', _("The passwords don't match. Try again!")); + $in->ask_warn('', N("The passwords don't match. Try again!")); return(1,1); } 0; -- cgit v1.2.1