Followup r110279. $count % 100 in 1..19 is few form.
authorSanthosh Thottingal <santhosh@users.mediawiki.org>
Mon, 30 Jan 2012 13:51:04 +0000 (13:51 +0000)
committerSanthosh Thottingal <santhosh@users.mediawiki.org>
Mon, 30 Jan 2012 13:51:04 +0000 (13:51 +0000)
In r110279, it was 2..19.

languages/classes/LanguageMo.php
tests/phpunit/languages/LanguageMoTest.php

index cc3b25a..a973a7a 100644 (file)
@@ -20,7 +20,7 @@ class LanguageMo extends Language {
 
                if ( $count == 1 ) {
                        $index = 0;
-               } elseif ( $count == 0 || ( $count % 100 > 1 && $count % 100 < 20 ) ) {
+               } elseif ( $count == 0 || ( $count % 100 > 0 && $count % 100 < 20 ) ) {
                        $index = 1;
                } else {
                        $index = 2;
index 6bb8ca6..48940a5 100644 (file)
@@ -35,6 +35,7 @@ class LanguageMoTest extends MediaWikiTestCase {
                        array( 'other', 20.123 ),
                        array( 'other', 31 ),
                        array( 'other', 200 ),
+                       array( 'few', 201 ),
                );
        }