* (bug 5905) Plural support for Bosnian localisation (bs)
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 12 May 2006 14:55:10 +0000 (14:55 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Fri, 12 May 2006 14:55:10 +0000 (14:55 +0000)
RELEASE-NOTES
languages/LanguageBs.php

index 4a6ff4e..864a353 100644 (file)
@@ -247,6 +247,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * dumpTextPass can now use 7zip files for prefetch
 * (bug 5915) Update to Indonesian localisation (id)
 * (bug 5913) Update for German localisation (de)
+* (bug 5905) Plural support for Bosnian localisation (bs)
 
 
 == Compatibility ==
index fb98709..5b318c5 100644 (file)
@@ -164,6 +164,22 @@ class LanguageBs extends LanguageUtf8 {
                return array(',' => '.', '.' => ',' );
        }
 
+
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+               $count = str_replace ('.', '', $count);
+               if ($count > 10 && floor(($count % 100) / 10) == 1) {
+                       return $wordform3;
+               } else {
+                       switch ($count % 10) {
+                               case 1: return $wordform1;
+                               case 2:
+                               case 3:
+                               case 4: return $wordform2;
+                               default: return $wordform3;
+                       }
+               }
+       }
+
        # Convert from the nominative form of a noun to some other case
        # Invoked with {{GRAMMAR:case|word}}
        function convertGrammar( $word, $case ) {