summaryrefslogtreecommitdiffstats
path: root/urpme
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2003-03-05 20:06:46 +0000
committerPablo Saratxaga <pablo@mandriva.com>2003-03-05 20:06:46 +0000
commitc19e3039a252f50b986a2e4b8e66817395f512ee (patch)
treed0c75c6e6f846cce50a722014c4b3bff92bcc7a7 /urpme
parentcbcfd7a1b9bbafeedfd483ae511da8529982147a (diff)
downloadurpmi-c19e3039a252f50b986a2e4b8e66817395f512ee.tar
urpmi-c19e3039a252f50b986a2e4b8e66817395f512ee.tar.gz
urpmi-c19e3039a252f50b986a2e4b8e66817395f512ee.tar.bz2
urpmi-c19e3039a252f50b986a2e4b8e66817395f512ee.tar.xz
urpmi-c19e3039a252f50b986a2e4b8e66817395f512ee.zip
changed name of _() function to N()
use of perl_checker to create pot file
Diffstat (limited to 'urpme')
-rw-r--r--urpme38
1 files changed, 19 insertions, 19 deletions
diff --git a/urpme b/urpme
index 0216393a..1110c177 100644
--- a/urpme
+++ b/urpme
@@ -26,26 +26,26 @@ use URPM::Resolve;
use urpm;
#- get I18N translation method.
-import urpm _;
+import urpm N;
my (@nextargv, $root, $test, $parallel, $auto, $matches, $maymatch, @l);
-my $askok = _("Is this OK?");
+my $askok = N("Is this OK?");
# Translator: Add here the keys which might be pressed in the "No"-case.
-my $noexpr = _("Nn");
+my $noexpr = N("Nn");
# Translator: Add here the keys which might be pressed in the "Yes"-case.
-my $yesexpr = _("Yy");
+my $yesexpr = N("Yy");
sub usage {
- print STDERR _("urpme version %s
+ print STDERR N("urpme version %s
Copyright (C) 1999, 2000, 2001, 2002 MandrakeSoft.
This is free software and may be redistributed under the terms of the GNU GPL.
usage:
-", $urpm::VERSION) . _(" --help - print this help message.
-") . _(" --auto - automatically select a package in choices.
-") . _(" --test - verify if the installation can be achieved correctly.
-") . _(" --parallel - distributed urpmi accross machines of alias.
-") . _(" -a - select all packages matching expression.
+", $urpm::VERSION) . N(" --help - print this help message.
+") . N(" --auto - automatically select a package in choices.
+") . N(" --test - verify if the installation can be achieved correctly.
+") . N(" --parallel - distributed urpmi accross machines of alias.
+") . N(" -a - select all packages matching expression.
");
exit(0);
}
@@ -61,7 +61,7 @@ while (defined($_ = shift @ARGV)) {
/^-(.*)$/ and do { foreach (split //, $1) {
/[\?h]/ and do { usage; next };
/a/ and do { $matches = 1; next };
- die _("urpme: unknown option \"-%s\", check usage with --help\n", $1); } next };
+ die N("urpme: unknown option \"-%s\", check usage with --help\n", $1); } next };
@nextargv and do { my $r = shift @nextargv; $r and $$r = $_; next };
push @l, $_;
}
@@ -80,37 +80,37 @@ my @toremove = $urpm->find_packages_to_remove($state, \@l,
test => $test, matches => $matches, auto => $auto,
callback_notfound => sub {
my $urpm = shift @_;
- $urpm->{fatal}(1, (@_ > 1 ? _("unknown packages") : _("unknown package")) .
+ $urpm->{fatal}(1, (@_ > 1 ? N("unknown packages") : N("unknown package")) .
': ' . join(', ', @_)); 0 },
callback_fuzzy => sub {
my $urpm = shift @_;
my $match = shift @_;
- $urpm->{fatal}(1, _("The following packages contain %s: %s",
+ $urpm->{fatal}(1, N("The following packages contain %s: %s",
$match, join(' ', @_))); 0 },
callback_base => sub {
my $urpm = shift @_;
foreach (@_) {
- $urpm->{error}(_("removing package %s will break your system", $_));
+ $urpm->{error}(N("removing package %s will break your system", $_));
} 0 },
- ) or $urpm->{fatal}(0, _("Nothing to remove"));
+ ) or $urpm->{fatal}(0, N("Nothing to remove"));
if ($test && $auto) {
- my $msg = _("Checking to remove the following packages");
+ my $msg = N("Checking to remove the following packages");
print STDOUT "$msg:\n" . join("\n", sort { $a cmp $b } @toremove) . "\n";
} elsif (@toremove > @l && !$auto) {
my $sum = 0;
foreach (@toremove) {
$sum += $state->{ask_remove}{$_}{size};
}
- my $msg = _("To satisfy dependencies, the following packages are going to be removed (%d MB)", toMb($sum));
- print STDOUT "$msg:\n" . join("\n", sort { $a cmp $b } @toremove) . "\n$askok" . _(" (Y/n) ");
+ my $msg = N("To satisfy dependencies, the following packages are going to be removed (%d MB)", toMb($sum));
+ print STDOUT "$msg:\n" . join("\n", sort { $a cmp $b } @toremove) . "\n$askok" . N(" (Y/n) ");
<STDIN> =~ /[$noexpr]/ and exit 0;
}
@l = $parallel ?
$urpm->parallel_remove(\@toremove, test => $test, translate_message => 1) :
$urpm->install(\@toremove, {}, {}, test => $test, translate_message => 1);
-@l and $urpm->{fatal}(2, _("Removing failed") . ":\n" . join("\n", map { "\t$_" } @l));
+@l and $urpm->{fatal}(2, N("Removing failed") . ":\n" . join("\n", map { "\t$_" } @l));
sub toMb {
my $nb = $_[0] / 1024 / 1024;