Makes convertPlural compatible (strict standards)
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 22:31:08 +0000 (22:31 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 22:31:08 +0000 (22:31 +0000)
17 files changed:
languages/Language.php
languages/classes/LanguageBe.php
languages/classes/LanguageBs.php
languages/classes/LanguageCs.php
languages/classes/LanguageCu.php
languages/classes/LanguageFr.php
languages/classes/LanguageHe.php
languages/classes/LanguageHr.php
languages/classes/LanguageHsb.php
languages/classes/LanguageKsh.php
languages/classes/LanguageLt.php
languages/classes/LanguageLv.php
languages/classes/LanguagePt_br.php
languages/classes/LanguageRu.php
languages/classes/LanguageSk.php
languages/classes/LanguageSr_ec.php
languages/classes/LanguageSr_el.php

index 2eaa7ab..2cd49cd 100644 (file)
@@ -1277,9 +1277,11 @@ class Language {
         * @param string $wordform1
         * @param string $wordform2
         * @param string $wordform3 (optional)
+        * @param string $wordform4 (optional)
+        * @param string $wordform5 (optional)
         * @return string
         */
-       function convertPlural( $count, $w1, $w2, $w3) {
+       function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
                return $count == '1' ? $w1 : $w2;
        }
 
index f2a52cc..553d2ad 100644 (file)
@@ -12,7 +12,7 @@
   */
 
 class LanguageBe extends Language {
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;
index 4734fdc..92d0009 100644 (file)
@@ -7,7 +7,7 @@
 
 class LanguageBs extends Language {
 
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;
index 6b8d3d6..bd2f33a 100644 (file)
@@ -67,7 +67,7 @@ class LanguageCs extends Language {
 
   # Plural form transformations, needed for some languages.
   # Invoked by {{plural:count|wordform1|wordform2|wordform3}}
-  function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+  function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
     $count = str_replace( '\xc2\xa0', '', $count );
     switch ( $count ) {
       case 1:
index 6f6efe4..f30bd25 100644 (file)
@@ -36,7 +36,7 @@ class LanguageCu extends Language {
                return $word;
        }
 
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $wordform4) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $wordform4, $w5) {
                switch ($count % 10) {
                        case 1: return $wordform1;
                        case 2: return $wordform2;
index 61cd91c..b150cef 100644 (file)
@@ -10,7 +10,7 @@ class LanguageFr extends Language {
        /**
         * Use singular form for zero (see bug 7309)
         */
-        function convertPlural( $count, $w1, $w2, $w3) {
+        function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
                return $count <= '1' ? $w1 : $w2;
         }
 }
index 70de311..e84d45d 100644 (file)
@@ -52,11 +52,13 @@ class LanguageHe extends Language {
         * @param integer the number of items
         * @param string the first form (singular)
         * @param string the second form (plural)
-        * @param string the third form (2 items, plural is used if not applicable and not specified)
+        * @param string the third form (2 items, plural is used if not applicable and not specified
+        * @param not used (for compatibility with ancestor)
+        * @param not used (for compatibility with ancestor)
         *
         * @return string of the suited form of word
         */
-       public function convertPlural( $count, $w1, $w2, $w3) {
+       public function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
                if ( $count == '1' ) {
                        return $w1;
                } elseif ( $count == '2' && $w3 ) {
index b1f6b0f..537c142 100644 (file)
@@ -6,7 +6,7 @@
   */
 
 class LanguageHr extends Language {
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;
index 3128caa..08163b7 100644 (file)
@@ -101,7 +101,7 @@ class LanguageHsb extends Language {
                return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
        }
 
-       function convertPlural( $count, $singular, $dual, $plural, $pluralgen ) {
+       function convertPlural( $count, $singular, $dual, $plural, $pluralgen, $w5 ) {
                switch ( abs( $count ) % 100 ) {
                        case 1:
                                return $singular;
index 412a00f..7795e04 100644 (file)
@@ -21,7 +21,7 @@ class LanguageKsh extends Language {
        /**
         * Handle cases of (1, other, 0) or (1, other)
         */
-       public function convertPlural( $count, $w1, $w2, $w3 ) {
+       public function convertPlural( $count, $w1, $w2, $w3, $w4, $w5 ) {
                $count = str_replace (' ', '', $count);
                if ( $count == '1' ) {
                        return $w1;
index 1770f8e..14031fe 100644 (file)
@@ -11,8 +11,8 @@ class LanguageLt extends Language {
                1 - vienas (1) lapas, dvidešimt vienas (21) lapas
                2 - trys (3) lapai
                3 - penkiolika (15) lapų
-       */      
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       */
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                if ($count%10==1 && $count%100!=11) return $wordform1;
                if ($count%10>=2 && ($count%100<10 || $count%100>=20)) return $wordform2;
                //if third form not specified, then use second form
index 54cae48..c45d96e 100644 (file)
@@ -22,7 +22,7 @@ class LanguageLv extends Language {
         * @param string $wordform3 (not used)
         * @return string
         */
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3 ) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5 ) {
                return ( ( $count % 10 == 1 ) && ( $count % 100 != 11 ) ) ? $wordform1 : $wordform2;
        }
 
index 6132aaa..06dc4d9 100644 (file)
@@ -10,7 +10,7 @@ class LanguagePt_br extends Language {
        /**
         * Use singular form for zero (see bug 7309)
         */
-        function convertPlural( $count, $w1, $w2, $w3) {
+        function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
                return $count <= '1' ? $w1 : $w2;
         }
 }
index b64a414..a251aa5 100644 (file)
@@ -57,7 +57,7 @@ class LanguageRu extends Language {
                return $word;
        }
 
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace (' ', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;
index 2fa8df0..5b71c6a 100644 (file)
@@ -76,8 +76,8 @@ class LanguageSk extends Language {
                }
                return $word;
        }
-       
-       function convertPlural( $count, $w1, $w2, $w3) {
+
+       function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                $forms = array( $w1, $w2, $w3);
                if ( $count == 1 ) {
index f84ebd0..72f56b8 100644 (file)
@@ -9,7 +9,7 @@
 #--------------------------------------------------------------------------
 
 class LanguageSr_ec extends Language {
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;
index cba1b57..1ecacc0 100644 (file)
@@ -9,7 +9,7 @@
 #--------------------------------------------------------------------------
 
 class LanguageSr_el extends Language {
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+       function convertPlural( $count, $wordform1, $wordform2, $wordform3, $w4, $w5) {
                $count = str_replace ('.', '', $count);
                if ($count > 10 && floor(($count % 100) / 10) == 1) {
                        return $wordform3;