From: Amir E. Aharoni Date: Mon, 16 Jan 2012 09:46:56 +0000 (+0000) Subject: Improved the comment about the two-forms plural shortcut. X-Git-Tag: 1.31.0-rc.0~25249 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=3af279116eba3a1774db04297c6194792e9870a4;p=lhc%2Fweb%2Fwiklou.git Improved the comment about the two-forms plural shortcut. --- diff --git a/languages/classes/LanguageBe_tarask.php b/languages/classes/LanguageBe_tarask.php index 25c3f7007d..d160941032 100644 --- a/languages/classes/LanguageBe_tarask.php +++ b/languages/classes/LanguageBe_tarask.php @@ -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 diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php index e16761ad0a..1cf40f69c4 100644 --- a/languages/classes/LanguageRu.php +++ b/languages/classes/LanguageRu.php @@ -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. diff --git a/languages/classes/LanguageSr.php b/languages/classes/LanguageSr.php index 28651b3df7..86bfd822dd 100644 --- a/languages/classes/LanguageSr.php +++ b/languages/classes/LanguageSr.php @@ -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]; } diff --git a/languages/classes/LanguageUk.php b/languages/classes/LanguageUk.php index 206c5aa3eb..d826796613 100644 --- a/languages/classes/LanguageUk.php +++ b/languages/classes/LanguageUk.php @@ -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/