summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--data/lang.txt4
-rw-r--r--lib/VNDB/L10N.pm19
3 files changed, 23 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9eba7ab8..421cdc88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,7 @@ git - ?
- Fixed calculation of tags_vn_bayesian.spoiler
- Fixed bug with unhiding a producer entry
- Set 'no spoilers' as default spoiler level for tags
+ - Added Czech translation
2.7 - 2009-09-24
- Improved styling of the threeboxes layout
diff --git a/data/lang.txt b/data/lang.txt
index d89f97d8..f57a88a0 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -78,6 +78,10 @@ ends with ']'. The following options are supported:
Same as the english [quant] as above, but has three forms for a word
instead of two.
+ [quant,{num},{singular},{normative},{genetive}] (Czech)
+ Same as the english [quant] as above, but has three forms for a word
+ instead of two.
+
[url,{url},{title}]
Formats a link to another page, where {url} is the location of the page
and {title} the link title. {url} is usually an argument, e.g.:
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;