summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-28 16:40:33 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-28 16:40:33 +0000
commit266078e99315e47cb2e893801e3baa9b72d60689 (patch)
tree2d913a10d0ce3bc61783233755f7297386db68b2 /perl-install/common.pm
parentcb61e5b23dfe4902188e6bc59bfd25d3f440090b (diff)
downloaddrakx-266078e99315e47cb2e893801e3baa9b72d60689.tar
drakx-266078e99315e47cb2e893801e3baa9b72d60689.tar.gz
drakx-266078e99315e47cb2e893801e3baa9b72d60689.tar.bz2
drakx-266078e99315e47cb2e893801e3baa9b72d60689.tar.xz
drakx-266078e99315e47cb2e893801e3baa9b72d60689.zip
(translate_real) simplify
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index be5e2fa18..0bb4dfe03 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -45,8 +45,8 @@ sub unmakedev { $_[0] >> 8, $_[0] & 0xff }
sub translate_real {
my ($s, $o_plural, $o_nb) = @_;
$s or return '';
+ my $s2;
foreach (@::textdomains, 'libDrakX') {
- my $s2;
if ($o_plural) {
$s2 = Locale::gettext::dngettext($_, $s, $o_plural, $o_nb);
} else {
@@ -56,9 +56,8 @@ sub translate_real {
c::set_tagged_utf8($s2) if !utf8::is_utf8($s2) && utf8::is_utf8($s);
return $s2 if $s ne $s2 && $s2 ne $o_plural;
}
- # didn't lookup anything or locale is "C";
- # in english 1 is singular whereas 0 is plural:
- defined $o_nb && $o_nb != 1 ? $o_plural : $s;
+ # didn't lookup anything or locale is "C":
+ $s2;
}
sub remove_translate_context {