summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-20 13:57:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-20 13:57:52 +0000
commitea530fe0c4c94aa46430b4fbea0fc41967ff7fb2 (patch)
tree147ee0fef9077b025149c1455dfd1f813d036e0b /perl-install
parent8f1eeea5844bdc6f0356551e6a37269b3e0f88ff (diff)
downloaddrakx-ea530fe0c4c94aa46430b4fbea0fc41967ff7fb2.tar
drakx-ea530fe0c4c94aa46430b4fbea0fc41967ff7fb2.tar.gz
drakx-ea530fe0c4c94aa46430b4fbea0fc41967ff7fb2.tar.bz2
drakx-ea530fe0c4c94aa46430b4fbea0fc41967ff7fb2.tar.xz
drakx-ea530fe0c4c94aa46430b4fbea0fc41967ff7fb2.zip
(translate): basic plural forms handling (not finished)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index a65f4ddd8..73c1d9adb 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -368,6 +368,9 @@ sub list_skels {
sub translate {
my ($s) = @_;
+ if (ref($s) eq 'ARRAY') {
+ $s = $s->[0] == 1 ? "singular\0$s->[1]" : "plural\0$s->[2]";
+ }
my ($lang) = $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LC_ALL} || $ENV{LANG} || 'en';
require lang;