summaryrefslogtreecommitdiffstats
path: root/_irpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-02 10:27:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-02 10:27:20 +0000
commit391e1909ebed4c603be02f5766d9e686dd2eddae (patch)
tree2d7600bca47921bfa21f7c8f7909e7f958a54fc2 /_irpm
parentab18e550dddce9519cc42bfa1c3353066fc7b7f4 (diff)
downloadurpmi-391e1909ebed4c603be02f5766d9e686dd2eddae.tar
urpmi-391e1909ebed4c603be02f5766d9e686dd2eddae.tar.gz
urpmi-391e1909ebed4c603be02f5766d9e686dd2eddae.tar.bz2
urpmi-391e1909ebed4c603be02f5766d9e686dd2eddae.tar.xz
urpmi-391e1909ebed4c603be02f5766d9e686dd2eddae.zip
use perl-Locale-gettext instead of perl-gettext
(ie. Locale::gettext instead of Locale::GetText)
Diffstat (limited to '_irpm')
-rwxr-xr-x_irpm23
1 files changed, 10 insertions, 13 deletions
diff --git a/_irpm b/_irpm
index ac4c2b35..5ea04672 100755
--- a/_irpm
+++ b/_irpm
@@ -2,13 +2,10 @@
# for i18n
use POSIX;
-use Locale::GetText;
+use Locale::gettext;
setlocale (LC_ALL, "");
-Locale::GetText::textdomain ("urpmi");
-
-import Locale::GetText I_;
-*i18n = *I_;
+textdomain ("urpmi");
$automatic = 0;
$timeout = 15;
@@ -18,7 +15,7 @@ $BASE = "$DIR/autoirpm";
$INSTALL_SCRIPT_REP = "$BASE.scripts";
$rpm = shift @ARGV;
-print STDERR "autoirpm: ", i18n("installing $rpm\n");
+print STDERR "autoirpm: ", gettext("installing $rpm\n");
`xtest`;
$X = ($? == 0);
@@ -28,18 +25,18 @@ $SIG{ALRM} = sub { $pid and kill 9, $pid; not_found(); };
alarm $timeout;
if (!$automatic) {
- $interactive_mesg = i18n("Automatic installation of packages...\nYou requested installation of package $rpm\n") . i18n("Is it OK?");
+ $interactive_mesg = gettext("Automatic installation of packages...\nYou requested installation of package $rpm\n") . gettext("Is it OK?");
if ($X) {
- my $ok = i18n("Ok");
- my $cancel = i18n("Cancel");
+ my $ok = gettext("Ok");
+ my $cancel = gettext("Cancel");
($pid = fork) or exec "gmessage", "-default", $ok, "-buttons", "$ok:0,$cancel:2", $interactive_mesg;
wait();
$? and not_found();
} else {
if (isatty(0)) {
- $noexpr = i18n("Nn");
- $yesexpr = i18n("Yy");
- print $interactive_mesg, i18n(" (Y/n) ");
+ $noexpr = gettext("Nn");
+ $yesexpr = gettext("Yy");
+ print $interactive_mesg, gettext(" (Y/n) ");
<STDIN> =~ /[$yesexpr]/ or not_found();
} else {
# Arghhh not in automatic and no way to contact the user... dying
@@ -58,7 +55,7 @@ fork or exec $urpmi, "--comment", $ARGV[0], $rpm; wait;
not_found();
sub not_found {
- print STDERR i18n("$rpm: command not found\n");
+ print STDERR gettext("$rpm: command not found\n");
exit 127;
}