* (bug 3682) LanguageSr.php - added convertPlural
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 12 Oct 2005 07:40:34 +0000 (07:40 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 12 Oct 2005 07:40:34 +0000 (07:40 +0000)
RELEASE-NOTES
languages/LanguageSr.php

index 376dd1e..13489b6 100644 (file)
@@ -138,14 +138,15 @@ fully support the editing toolbar, but was found to be too confusing.
 * Fix meta robots tag on Special:Version again to avoid listing vulnerable
   versions for convenient harvesting by automated worms
 * (bug 3580) Change default Dutch language file to more neutral
-* (bug 3656) Minor LanguageHr.php update - added convertPlural() code
-* (bug 3414) Add plural forms support to Belarusian
+* (bug 3656) LanguageHr.php - added convertPlural
+* (bug 3414) LanguageBe.php - added convertPlural
 * (bug 3163) Full translation of LanguageBr
 * (bug 3617) Update for portuguese language (pt)
 * Namespaces hacks on LanguagePl
 * New preferences design and reorganisation
 * (bug 2585) Return proper 404 code when pages don't exist
 * (bug 3684) Fix typo in fatal error backtraces in Hooks.php
+* (bug 3682) LanguageSr.php - added convertPlural
 
 
 === Caveats ===
index 9385b8d..6051ad8 100644 (file)
@@ -1790,6 +1790,19 @@ class LanguageSr extends LanguageUtf8 {
 
        }
 
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+               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;
+                       }
+               }
+       }
 
 }