diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-02 10:27:20 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-02 10:27:20 +0000 |
commit | 391e1909ebed4c603be02f5766d9e686dd2eddae (patch) | |
tree | 2d7600bca47921bfa21f7c8f7909e7f958a54fc2 | |
parent | ab18e550dddce9519cc42bfa1c3353066fc7b7f4 (diff) | |
download | urpmi-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)
-rwxr-xr-x | _irpm | 23 | ||||
-rw-r--r-- | po/Makefile | 5 | ||||
-rw-r--r-- | urpm.pm | 6 | ||||
-rw-r--r-- | urpmi.spec | 8 |
4 files changed, 21 insertions, 21 deletions
@@ -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; } diff --git a/po/Makefile b/po/Makefile index bf766c58..91a7f125 100644 --- a/po/Makefile +++ b/po/Makefile @@ -26,9 +26,8 @@ clean: %.pot: $(POTFILES) ./create_placeholder $(POTFILES) - xgettext --default-domain=`basename $@ .pot` \ - --add-comments --keyword=__ --keyword=_ --keyword=N_ \ - --keyword=I_ --keyword=i18n \ + xgettext --default-domain=`basename $@ .pot` --add-comments \ + --keyword=__ --keyword=_ --keyword=N_ --keyword=gettext \ placeholder.h && \ mv `basename $@ .pot`.po $@ @@ -95,15 +95,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. use URPM; use POSIX; -use Locale::GetText; +use Locale::gettext(); #- I18N. setlocale (LC_ALL, ""); -Locale::GetText::textdomain ("urpmi"); +Locale::gettext::textdomain ("urpmi"); sub _ { my ($format, @params) = @_; - sprintf(Locale::GetText::I_($format), @params); + sprintf(Locale::gettext::gettext($format), @params); } #- create a new urpm object. @@ -2,13 +2,13 @@ Name: urpmi Version: 3.6 -Release: 4mdk +Release: 5mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate Summary: User mode rpm install Requires: eject webfetch perl-DateManip >= 5.40 -PreReq: perl-gettext rpmtools >= 4.3-2mdk perl-URPM >= 0.05-1mdk +PreReq: perl-Locale-gettext rpmtools >= 4.3-2mdk perl-URPM >= 0.05-1mdk BuildRequires: bzip2-devel gcc-c++ gettext rpm-devel rpmtools BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch @@ -144,6 +144,10 @@ fi %changelog +* Tue Jul 2 2002 Pixel <pixel@mandrakesoft.com> 3.6-5mdk +- use perl-Locale-gettext instead of perl-gettext + (ie. Locale::gettext instead of Locale::GetText) + * Fri Jun 28 2002 François Pons <fpons@mandrakesoft.com> 3.6-4mdk - increase retry count to 10 instead of 3 for rsync and ssh protocol. - support prefered tools to download files (grpmi only handles ftp |