summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageLt.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /languages/classes/LanguageLt.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'languages/classes/LanguageLt.php')
-rw-r--r--languages/classes/LanguageLt.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/languages/classes/LanguageLt.php b/languages/classes/LanguageLt.php
index 09cacae0..af38b6ae 100644
--- a/languages/classes/LanguageLt.php
+++ b/languages/classes/LanguageLt.php
@@ -12,6 +12,7 @@ class LanguageLt extends Language {
*/
/**
+ * Lithuanian plural forms as per http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#lt
* @param $count int
* @param $forms array
*
@@ -20,12 +21,13 @@ class LanguageLt extends Language {
function convertPlural( $count, $forms ) {
if ( !count( $forms ) ) { return ''; }
- // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+ // if the number is not mentioned in message, then use $form[0] for singular and $form[1] for plural or zero
if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
$forms = $this->preConvertPlural( $forms, 3 );
-
+ // Form[0] if n mod 10 is 1 and n mod 100 not in 11..19;
if ( $count % 10 == 1 && $count % 100 != 11 ) return $forms[0];
+ // Forms[1] if n mod 10 in 2..9 and n mod 100 not in 11..19;
if ( $count % 10 >= 2 && ( $count % 100 < 10 || $count % 100 >= 20 ) ) return $forms[1];
return $forms[2];
}