From 3af279116eba3a1774db04297c6194792e9870a4 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Mon, 16 Jan 2012 09:46:56 +0000 Subject: [PATCH] Improved the comment about the two-forms plural shortcut. --- languages/classes/LanguageBe_tarask.php | 5 ++++- languages/classes/LanguageRu.php | 5 ++++- languages/classes/LanguageSr.php | 5 ++++- languages/classes/LanguageUk.php | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) 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/ -- 2.20.1