summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2001-02-14 17:22:34 +0000
committerPablo Saratxaga <pablo@mandriva.com>2001-02-14 17:22:34 +0000
commit217226efe1f63f3b9383e22a6c2616a118d1e6de (patch)
treed3e026a2307be35f057d5fbc398df27a262c1590 /urpmi.addmedia
parent2a2de4e6275563b1d974f695ef87fa7748df6520 (diff)
downloadurpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.gz
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.bz2
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.xz
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.zip
i18n improvements
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia23
1 files changed, 16 insertions, 7 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index d31307b3..0ef150bf 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -20,27 +20,36 @@
#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 ($name, $url, $with, $relative_hdlist) = @_;
- my $usage =
-"usage: urpmi.addmedia <name> <url>
+ my $usage = sprintf(
+_("usage: urpmi.addmedia <name> <url>
where <url> is one of
file://<path>
ftp://<login>:<password>@<host>/<path> with <relative filename of hdlist>
ftp://<host>/<path> with <relative filename of hdlist>
http://<host>/<path> with <relative filename of hdlist>
- removable_<device>://<path>
-";
+ removable_<device>_<number>://<path>
+"));
$name or die $usage;
my ($type, $dev) = $url =~ m,^(file|ftp|http|removable_(\w+)(?:_\d+)?)://, or die $usage;
if ($type eq "removable") {
- $dev && -e "/dev/$dev" or die "$usage device `$dev' do not exist\n";
+ $dev && -e "/dev/$dev" or die( sprintf _( "$usage device `$dev' do not exist\n"));
} elsif ($with eq "with") {
- $relative_hdlist or die "$usage <relative path of hdlist> missing\n";
+ $relative_hdlist or die( sprintf _( "$usage <relative path of hdlist> missing\n"));
} elsif ($with) {
- $with eq "with" or die "$usage `with' missing for ftp media\n";
+ $with eq "with" or die( sprintf _( "$usage `with' missing for ftp media\n"));
}
my $urpm = new urpm;