diff options
author | Pablo Saratxaga <pablo@mandriva.com> | 2007-02-23 12:31:56 +0000 |
---|---|---|
committer | Pablo Saratxaga <pablo@mandriva.com> | 2007-02-23 12:31:56 +0000 |
commit | eb364060f409f1d207c1b57d6b451a037495992a (patch) | |
tree | eba5db006394c0dfd5374818d3892a2ba664a23b /Rpmdrake/pkg.pm | |
parent | eef9fb212f2cb7b670ed708013666dda7cf77911 (diff) | |
download | rpmdrake-eb364060f409f1d207c1b57d6b451a037495992a.tar rpmdrake-eb364060f409f1d207c1b57d6b451a037495992a.tar.gz rpmdrake-eb364060f409f1d207c1b57d6b451a037495992a.tar.bz2 rpmdrake-eb364060f409f1d207c1b57d6b451a037495992a.tar.xz rpmdrake-eb364060f409f1d207c1b57d6b451a037495992a.zip |
ngettext fixes
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rwxr-xr-x | Rpmdrake/pkg.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index c6a4aeeb..857eb7a5 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -479,15 +479,18 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( my $r = join "\n", urpm::select::translate_why_removed($urpm, $urpm->{state}, @to_remove); my $install_count = int(@pkgs); - my $to_install = $install_count ? - #-PO: in singular form, we use %2\$ - P("To satisfy dependencies, the following package is going to be installed:\n%2\$s\n", "To satisfy dependencies, the following %d packages are going to be installed:\n%s\n", $install_count, $install_count, - formatlistpkg(map { s!.*/!!; $_ } @pkgs)) : ''; + my $to_install = $install_count == 0 ? '' : + $install_count == 1 ? + N("To satisfy dependencies, the following package is going to be installed:\n%s\n", formatlistpkg(map { s!.*/!!; $_ } @pkgs)) + : P("To satisfy dependencies, the following %d package is going to be installed:\n%s\n", "To satisfy dependencies, the following %d packages are going to be installed:\n%s\n", $install_count, $install_count, + formatlistpkg(map { s!.*/!!; $_ } @pkgs)); my $remove_count = scalar(@to_remove); interactive_msg(($to_install ? N("Confirmation") : N("Some packages need to be removed")), ($r ? - (!$to_install ? join("\n\n", P("Remove one package?", "Remove %d packages?", $remove_count, $remove_count), $r) : - P("The following package has to be removed for others to be upgraded:", "The following packages have to be removed for others to be upgraded:", $remove_count) . join("\n\n", $r, if_($to_install, $to_install)) . N("Is it ok to continue?")) + (!$to_install ? join("\n\n", P("Remove %d package?", "Remove %d packages?", $remove_count, $remove_count), $r) : + $remove_count == 1 ? + N("The following package has to be removed for others to be upgraded:") + : N("The following packages have to be removed for others to be upgraded:") . join("\n\n", $r, if_($to_install, $to_install)) . N("Is it ok to continue?")) : $to_install), scroll => 1, yesno => 1) or do { |