diff options
author | Yorhel <git@yorhel.nl> | 2009-10-02 13:28:55 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-10-19 16:24:05 +0200 |
commit | 33c4f9d4cd7a14b4db347515ba3aa6b9f6cf99bb (patch) | |
tree | 80568618c6076390306723f771313489607dadef /lib | |
parent | 538000a678b4110394f1aaf413059bcdd43c5005 (diff) |
L10N-CS: Added Czech quant()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/L10N.pm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/VNDB/L10N.pm b/lib/VNDB/L10N.pm index e19302ed..279cbd31 100644 --- a/lib/VNDB/L10N.pm +++ b/lib/VNDB/L10N.pm @@ -11,7 +11,7 @@ use warnings; # used for the language switch interface, language tags must # be the same as in the languages hash in global.pl - sub languages { ('en', 'ru') } + sub languages { ('en', 'ru', 'cs') } sub maketext { my $r = eval { shift->SUPER::maketext(@_) }; @@ -25,6 +25,7 @@ use warnings; my %lang = ( en => \%VNDB::L10N::en::Lexicon, ru => \%VNDB::L10N::ru::Lexicon, + cs => \%VNDB::L10N::cs::Lexicon, ); my $r = LangFile->new(read => "$VNDB::ROOT/data/lang.txt"); my $key; @@ -140,5 +141,21 @@ use warnings; } + +{ + package VNDB::L10N::cs; + use base 'VNDB::L10N::en'; + our %Lexicon; + + sub quant { + my($self, $num, $single, $couple, $lots) = @_; + return $lots if ($num % 100) >= 11 && ($num % 100) <= 14; + return $single if ($num % 10) == 1; + return $couple if ($num % 10) >= 2 && ($num % 10) <= 4; + return $lots; + } +} + + 1; |