summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
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/interactive
parent68a1a2a6f2b9fdb1fd0c833cd9b3d8dcb9d8fd5c (diff)
downloaddrakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.gz
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.bz2
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.xz
drakx-backup-do-not-use-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/interactive')
-rw-r--r--perl-install/interactive/http.pm10
-rw-r--r--perl-install/interactive/newt.pm4
-rw-r--r--perl-install/interactive/stdio.pm34
3 files changed, 24 insertions, 24 deletions
diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm
index cc48ee19a..826a6da5c 100644
--- a/perl-install/interactive/http.pm
+++ b/perl-install/interactive/http.pm
@@ -101,8 +101,8 @@ sub ask_fromW {
print "</table>\n";
print $q->p();
- print $q->submit(-name => 'ok_submit', -value => $common->{ok} || _("Ok"));
- print $q->submit(-name => 'cancel_submit', -value => $common->{cancel} || _("Cancel")) if $common->{cancel} || !exists $common->{ok};
+ print $q->submit(-name => 'ok_submit', -value => $common->{ok} || N("Ok"));
+ print $q->submit(-name => 'cancel_submit', -value => $common->{cancel} || N("Cancel")) if $common->{cancel} || !exists $common->{ok};
print $q->hidden('state'), $q->hidden('uid');
print $q->end_form, $q->end_html;
@@ -116,8 +116,8 @@ sub ask_fromW {
last if $q->param('uid') == $uid;
open_stdout(); # re-open for writing
- cont_stdout(_("Error"));
- print $q->h1(_("Error")), $q->p("Sorry, you can't go back");
+ cont_stdout(N("Error"));
+ print $q->h1(N("Error")), $q->p("Sorry, you can't go back");
goto redisplay;
}
each_index {
@@ -150,7 +150,7 @@ sub wait_message_nextW {
}
sub wait_message_endW {
my ($o, $w) = @_;
- p(_("Done"));
+ p(N("Done"));
print "\n" . CGI::p();
}
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 43b58aa62..836fc0030 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -191,9 +191,9 @@ sub ask_fromW_real {
my ($b1, $b2) = map { simplify_string($_) }
(exists $common->{ok} ?
($common->{ok}, $common->{cancel}) :
- ($::isWizard ? _("Next") : _("Ok"), $common->{cancel} || ($::isWizard ? _("<- Previous") : _("Cancel"))));
+ ($::isWizard ? N("Next") : N("Ok"), $common->{cancel} || ($::isWizard ? N("<- Previous") : N("Cancel"))));
#- b1 is always displayed, so giving it some label :-(
- $b1 ||= $::isWizard ? _("Next") : _("Ok");
+ $b1 ||= $::isWizard ? N("Next") : N("Ok");
my @b2 = if_($b2, $b2);
my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar($::isWizard ? (@b2, $b1) : ($b1, @b2));
($ok, $cancel) = ($cancel, $ok) if $::isWizard;
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm
index 635adfb83..10e749205 100644
--- a/perl-install/interactive/stdio.pm
+++ b/perl-install/interactive/stdio.pm
@@ -26,8 +26,8 @@ sub good_choice {
my ($def_s, $max) = @_;
my $i;
do {
- defined $i and print _("Bad choice, try again\n");
- print _("Your choice? (default %s) ", $def_s);
+ defined $i and print N("Bad choice, try again\n");
+ print N("Your choice? (default %s) ", $def_s);
$i = readln();
} until (!$i || check_it($i, $max));
$i;
@@ -36,7 +36,7 @@ sub good_choice {
sub ask_fromW {
my ($o, $common, $l, $l2) = @_;
- add2hash_($common, { ok => _("Ok"), cancel => _("Cancel") }) if !exists $common->{ok};
+ add2hash_($common, { ok => N("Ok"), cancel => N("Cancel") }) if !exists $common->{ok};
ask_fromW_begin:
@@ -51,7 +51,7 @@ ask_fromW_begin:
if ($e->{type} eq 'entry') {
my $t = "\t$e->{label} $e->{text}\n";
if ($already_entries) {
- length($already_entries) > 1 and print _("Entries you'll have to fill:\n%s", $already_entries);
+ length($already_entries) > 1 and print N("Entries you'll have to fill:\n%s", $already_entries);
$already_entries = 1;
print $t;
} else {
@@ -67,7 +67,7 @@ ask_fromW_begin:
if ($e->{type} eq 'bool') {
print "$e->{text} $e->{label}\n";
- print _("Your choice? (0/1, default `%s') ", ${$e->{val}} || '0');
+ print N("Your choice? (0/1, default `%s') ", ${$e->{val}} || '0');
my $i = readln();
if ($i ne '') {
to_bool($i) != to_bool(${$e->{val}}) and $common->{callbacks}{changed}->($ind);
@@ -92,8 +92,8 @@ ask_fromW_begin:
print "Setting to <", $i ? ${$e->{list}}[$i-1] : ${$e->{val}}, ">\n";
$i and ${$e->{val}} = ${$e->{list}}[$i-1], $common->{callbacks}{changed}->($ind);
} elsif ($e->{type} eq 'button') {
- print _("Button `%s': %s", $e->{label}, may_apply($e->{format}, ${$e->{val}})), " $e->{text}\n";
- print _("Do you want to click on this button?");
+ print N("Button `%s': %s", $e->{label}, may_apply($e->{format}, ${$e->{val}})), " $e->{text}\n";
+ print N("Do you want to click on this button?");
my $i = readln();
($i && $i !~ /^n/i) and $e->{clicked_may_quit}(), $common->{callbacks}{changed}->($ind);
} elsif ($e->{type} eq 'label') {
@@ -102,7 +102,7 @@ ask_fromW_begin:
print $t;
} elsif ($e->{type} eq 'entry') {
print "$e->{label} $e->{text}\n";
- print _("Your choice? (default `%s'%s) ", ${$e->{val}}, ${$e->{val}} ne '' ? _(" enter `void' for void entry") : '');
+ print N("Your choice? (default `%s'%s) ", ${$e->{val}}, ${$e->{val}} ne '' ? N(" enter `void' for void entry") : '');
my $i = readln();
${$e->{val}} = $i || ${$e->{val}};
${$e->{val}} = '' if ${$e->{val}} eq 'void';
@@ -120,10 +120,10 @@ ask_fromW_begin:
$predo_widget->($_) foreach @$l;
if (listlength(@$l) > 30) {
my $ll = listlength(@$l);
- print _("=> There are many things to choose from (%s).\n", $ll);
+ print N("=> There are many things to choose from (%s).\n", $ll);
ask_fromW_handle_verylonglist:
- print _(
-"Please choose the first number of the 10-range you wish to edit,
+ print
+N("Please choose the first number of the 10-range you wish to edit,
or just hit Enter to proceed.
Your choice? ");
my $i = readln();
@@ -136,18 +136,18 @@ Your choice? ");
}
my $lab;
- each_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print _("=> Notice, a label changed:\n%s", $lab) }
+ each_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print N("=> Notice, a label changed:\n%s", $lab) }
grep { $_->{type} eq 'label' } @$l;
my $i;
- if (listlength(@$l) != 1 || $common->{ok} ne _("Ok") || $common->{cancel} ne _("Cancel")) {
- print "[1] ", $common->{ok} || _("Ok");
+ if (listlength(@$l) != 1 || $common->{ok} ne N("Ok") || $common->{cancel} ne N("Cancel")) {
+ print "[1] ", $common->{ok} || N("Ok");
$common->{cancel} and print " [2] $common->{cancel}";
- @$l and print " [9] ", _("Re-submit");
+ @$l and print " [9] ", N("Re-submit");
print "\n";
do {
- defined $i and print _("Bad choice, try again\n");
- print _("Your choice? (default %s) ", $common->{focus_cancel} ? $common->{cancel} : $common->{ok});
+ defined $i and print N("Bad choice, try again\n");
+ print N("Your choice? (default %s) ", $common->{focus_cancel} ? $common->{cancel} : $common->{ok});
$i = readln() || ($common->{focus_cancel} ? "2" : "1");
} until (check_it($i, 9));
$i == 9 and goto ask_fromW_begin;