diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-09-01 17:08:07 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-09-01 17:08:07 +0000 |
commit | 14c94292388f2d1d61165e6fe999a7e508859e5a (patch) | |
tree | ad00f5217bf0659784ffd28fdfde81212dfca086 | |
parent | aec086fafb83acedeff96b72403a82e1dccd6588 (diff) | |
download | urpmi-14c94292388f2d1d61165e6fe999a7e508859e5a.tar urpmi-14c94292388f2d1d61165e6fe999a7e508859e5a.tar.gz urpmi-14c94292388f2d1d61165e6fe999a7e508859e5a.tar.bz2 urpmi-14c94292388f2d1d61165e6fe999a7e508859e5a.tar.xz urpmi-14c94292388f2d1d61165e6fe999a7e508859e5a.zip |
(copyright) factorize a translated string
-rw-r--r-- | gurpmi.pm | 9 | ||||
-rw-r--r-- | urpm/args.pm | 12 | ||||
-rwxr-xr-x | urpme | 11 | ||||
-rwxr-xr-x | urpmf | 10 | ||||
-rwxr-xr-x | urpmi | 11 | ||||
-rw-r--r-- | urpmi.recover | 10 | ||||
-rwxr-xr-x | urpmq | 11 |
7 files changed, 23 insertions, 51 deletions
@@ -36,13 +36,8 @@ our @EXPORT = qw(create_scrolled_window fatal but cancel_n_quit quit add_button_ urpm::select::add_packages_to_priority_upgrade_list('gurpmi', 'perl-Glib', 'perl-Gtk2'); sub usage () { - print N("gurpmi version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: -", $urpm::VERSION, N("Copyright (C) %s by %s", "1999-2010", "Mandriva") - ) . " gurpmi <rpm> [ <rpm>... ] + print urpm::args::copyright('gurpmi', [ '1999-2010', 'Mandriva' ]) + . " gurpmi <rpm> [ <rpm>... ] " . N("Options:") . "\n" . N(" --help - print this help message. ") . N(" --auto - non-interactive mode, assume default answers to questions. diff --git a/urpm/args.pm b/urpm/args.pm index 5bca88d0..eade3974 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -518,6 +518,18 @@ sub parse_cmdline { $ret; } +sub copyright { + my ($prog_name, @copyrights) = @_; + N("%s version %s +%s +This is free software and may be redistributed under the terms of the GNU GPL. + +usage: +", $prog_name, $urpm::VERSION, + join("\n", map { N("Copyright (C) %s by %s", @$_) } @copyrights) + ); +} + 1; __END__ @@ -38,15 +38,8 @@ my $yesexpr = N("Yy"); sub usage() { - print N("urpme version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: -", $urpm::VERSION, - N("Copyright (C) %s by %s", "1999-2010", "Mandriva") . - N("Copyright (C) %s by %s", "2012", "Mageia") - ) . N(" --help - print this help message. + print urpm::args::copyright('urpme', [ '1999-2010', 'Mandriva' ], [ '2012', 'Mageia' ]) + . N(" --help - print this help message. ") . N(" --auto - automatically select a package in choices. ") . N(" --auto-orphans - remove orphans ") . N(" --test - verify if the removal can be achieved correctly. @@ -26,15 +26,7 @@ use urpm::msg; use urpm::media; sub usage() { - print N("urpmf version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: urpmf [options] pattern-expression -", $urpm::VERSION, - N("Copyright (C) %s by %s", "2002-2010", "Mandriva") . - N("Copyright (C) %s by %s", "2012", "Mageia") - ) + print urpm::args::copyright('urpmf', [ '2002-2010', 'Mandriva' ], [ '2011-2012', 'Mageia' ]) . N(" --help - print this help message. ") . N(" --version - print this tool's version number. ") . N(" --env - use specific environment (typically a bug report). @@ -63,15 +63,8 @@ $ENV{HOME} ||= "/root"; $ENV{USER} ||= "root"; sub usage () { - print N("urpmi version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: -", $urpm::VERSION, - N("Copyright (C) %s by %s", "1999-2010", "Mandriva") . - N("Copyright (C) %s by %s", "2011-2012", "Mageia") - ) . N(" --help - print this help message. + print urpm::args::copyright('urpmi', [ '1999-2010', 'Mandriva' ], [ '2011-2012', 'Mageia' ]) + . N(" --help - print this help message. ") . N(" --media - use only the given media, separated by comma. ") . N(" --excludemedia - do not use the given media, separated by comma. ") . N(" --update - use only update media. diff --git a/urpmi.recover b/urpmi.recover index dc7e4dae..756754a0 100644 --- a/urpmi.recover +++ b/urpmi.recover @@ -25,14 +25,8 @@ our $rollback; our $disable; sub usage () { - print N("urpmi.recover version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: -", $urpm::VERSION, - N("Copyright (C) %s by %s", "2006-2010", "Mandriva") - ) . N(" --help - print this help message. + print urpm::args::copyright('urpmi.recover', [ '2006-2010', 'Mandriva' ]) + . N(" --help - print this help message. ") . N(" --checkpoint - set repackaging start now ") . N(" --noclean - don't clean repackage directory on checkpoint ") . N(" --urpmi-root - use another root for urpmi db & rpm installation. @@ -37,15 +37,8 @@ our @names; our @src_names; sub usage() { - print N("urpmq version %s -%s -This is free software and may be redistributed under the terms of the GNU GPL. - -usage: -", $urpm::VERSION, - N("Copyright (C) %s by %s", '2000-2010', 'Mandriva') . - N("Copyright (C) %s by %s", '2012', 'Mandriva') - ) . N(" --help - print this help message. + print urpm::args::copyright('urpmq', $urpm::VERSION, [ '2000-2010', 'Mandriva' ], [ '2012', 'Mageia' ]) + . N(" --help - print this help message. ") . N(" --update - use only update media. ") . N(" --media - use only the given media, separated by comma. ") . N(" --searchmedia - use only the given media to search requested (or updated) packages. |