From a73a3e74e32ec5360b62c68f8a80b55a4b79bfdd Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 16 Feb 2001 13:01:02 +0000 Subject: *** empty log message *** --- urpmi.removemedia | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'urpmi.removemedia') diff --git a/urpmi.removemedia b/urpmi.removemedia index 3f19faca..bfeb1f4b 100755 --- a/urpmi.removemedia +++ b/urpmi.removemedia @@ -20,13 +20,22 @@ #use strict qw(subs vars refs); use urpm; +# for i18n +use POSIX; +use Locale::GetText; + +setlocale (LC_ALL, ""); +Locale::GetText::textdomain ("urpmi"); + +import Locale::GetText I_; +*_ = *I_; sub main { my (@toremoves, %options); foreach (@_) { /^--?a/ and $options{all} = 1, next; - /^-/ and die "unknown options \"$_\"\n"; + /^-/ and die sprintf(_("unknown options \"%s\"\n"), $_); push @toremoves, $_; } @@ -35,9 +44,9 @@ sub main { if ($options{all}) { @toremoves = @entries; - @toremoves == 0 and die "nothing to remove (use urpmi.addmedia to add a media)\n"; + @toremoves == 0 and die _("nothing to remove (use urpmi.addmedia to add a media)\n"); } - @toremoves == 0 and die "missing the entry to remove\n(one of " . join(", ", @entries) . ")\n"; + @toremoves == 0 and die sprintf(_("missing the entry to remove\n(one of %s)\n"), join(", ", @entries)); $urpm->remove_media(@toremoves); $urpm->update_media; -- cgit v1.2.1