summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageBe_tarask.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /languages/classes/LanguageBe_tarask.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'languages/classes/LanguageBe_tarask.php')
-rw-r--r--languages/classes/LanguageBe_tarask.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/languages/classes/LanguageBe_tarask.php b/languages/classes/LanguageBe_tarask.php
index d2dd4825..312735da 100644
--- a/languages/classes/LanguageBe_tarask.php
+++ b/languages/classes/LanguageBe_tarask.php
@@ -1,7 +1,7 @@
<?php
/** Belarusian in Taraškievica orthography (Беларуская тарашкевіца)
*
- * @addtogroup Language
+ * @ingroup Language
*
* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
* @bug 1638, 2135
@@ -12,21 +12,20 @@
class LanguageBe_tarask extends Language {
/**
- * Plural form transformations
- *
- * $wordform1 - singular form (for 1, 21, 31, 41...)
- * $wordform2 - plural form (for 2, 3, 4, 22, 23, 24, 32, 33, 34...)
- * $wordform3 - plural form (for 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...)
- * $wordform4 - plural form for messages without number
- */
+ * Plural form transformations
+ *
+ * $wordform1 - singular form (for 1, 21, 31, 41...)
+ * $wordform2 - plural form (for 2, 3, 4, 22, 23, 24, 32, 33, 34...)
+ * $wordform3 - plural form (for 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26...)
+ */
function convertPlural( $count, $forms ) {
if ( !count($forms) ) { return ''; }
- $forms = $this->preConvertPlural( $forms, 3 );
- $count = abs( $count );
- if ( isset($forms[3]) && $count != 1 )
- return $forms[3];
+ //if no number with word, then use $form[0] for singular and $form[1] for plural or zero
+ if( count($forms) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
+
+ $forms = $this->preConvertPlural( $forms, 3 );
if ($count > 10 && floor(($count % 100) / 10) == 1) {
return $forms[2];
@@ -97,7 +96,4 @@ class LanguageBe_tarask extends Language {
return $word; # this will return the original value for 'назоўны' (nominative) and all undefined case values
}
-
}
-
-