Improved the comment about the two-forms plural shortcut.
authorAmir E. Aharoni <amire80@users.mediawiki.org>
Mon, 16 Jan 2012 09:46:56 +0000 (09:46 +0000)
committerAmir E. Aharoni <amire80@users.mediawiki.org>
Mon, 16 Jan 2012 09:46:56 +0000 (09:46 +0000)
languages/classes/LanguageBe_tarask.php
languages/classes/LanguageRu.php
languages/classes/LanguageSr.php
languages/classes/LanguageUk.php

index 25c3f70..d160941 100644 (file)
@@ -27,7 +27,10 @@ class LanguageBe_tarask extends Language {
        function convertPlural( $count, $forms ) {
                if ( !count( $forms ) ) { return ''; }
 
-               // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+               // If the actual number is not mentioned in the expression, then just two forms are enough:
+               // singular for $count == 1
+               // plural   for $count != 0
+               // For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
                if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
 
                // @todo FIXME: CLDR defines 4 plural forms instead of 3
index e16761a..1cf40f6 100644 (file)
@@ -82,7 +82,10 @@ class LanguageRu extends Language {
        function convertPlural( $count, $forms ) {
                if ( !count( $forms ) ) { return ''; }
 
-               // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+               // If the actual number is not mentioned in the expression, then just two forms are enough:
+               // singular for $count == 1
+               // plural   for $count != 0
+               // For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
                if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
 
                // @todo FIXME: CLDR defines 4 plural forms. Form with decimals missing.
index 28651b3..86bfd82 100644 (file)
@@ -238,7 +238,10 @@ class LanguageSr extends LanguageSr_ec {
                        return '';
                }
 
-               // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+               // If the actual number is not mentioned in the expression, then just two forms are enough:
+               // singular for $count == 1
+               // plural   for $count != 0
+               // For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
                if ( count( $forms ) === 2 ) {
                        return $count == 1 ? $forms[0] : $forms[1];
                }
index 206c5aa..d826796 100644 (file)
@@ -71,7 +71,10 @@ class LanguageUk extends Language {
        function convertPlural( $count, $forms ) {
                if ( !count( $forms ) ) { return ''; }
 
-               // if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+               // If the actual number is not mentioned in the expression, then just two forms are enough:
+               // singular for $count == 1
+               // plural   for $count != 0
+               // For example, "This user belongs to {{PLURAL:$1|one group|several groups}}."
                if ( count( $forms ) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
 
                // @todo FIXME: CLDR defines 4 plural forms. Form for decimals is missing/