Index: trunk/phase3/languages/classes/LanguageLt.php |
— | — | @@ -20,6 +20,10 @@ |
21 | 21 | */ |
22 | 22 | function convertPlural( $count, $forms ) { |
23 | 23 | if ( !count( $forms ) ) { return ''; } |
| 24 | + |
| 25 | + // if the number is not mentioned in message, then use $form[0] for singular and $form[1] for plural or zero |
| 26 | + if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1]; |
| 27 | + |
24 | 28 | $forms = $this->preConvertPlural( $forms, 3 ); |
25 | 29 | // Form[0] if n mod 10 is 1 and n mod 100 not in 11..19; |
26 | 30 | if ( $count % 10 == 1 && $count % 100 != 11 ) return $forms[0]; |
Index: trunk/phase3/resources/mediawiki.language/languages/lt.js |
— | — | @@ -3,6 +3,10 @@ |
4 | 4 | */ |
5 | 5 | |
6 | 6 | mediaWiki.language.convertPlural = function( count, forms ) { |
| 7 | + // if the number is not mentioned in message, then use $form[0] for singular and $form[1] for plural or zero |
| 8 | + if ( forms.length == 2 ) { |
| 9 | + return count == 1 ? forms[0] : forms[1]; |
| 10 | + } |
7 | 11 | forms = mediaWiki.language.preConvertPlural( forms, 3 ); |
8 | 12 | if ( count % 10 == 1 && count % 100 != 11 ) { |
9 | 13 | return forms[0]; |