summaryrefslogtreecommitdiff
path: root/languages/classes/LanguageUk.php
diff options
context:
space:
mode:
Diffstat (limited to 'languages/classes/LanguageUk.php')
-rw-r--r--languages/classes/LanguageUk.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/languages/classes/LanguageUk.php b/languages/classes/LanguageUk.php
index 7d2f58bf..dbebb134 100644
--- a/languages/classes/LanguageUk.php
+++ b/languages/classes/LanguageUk.php
@@ -1,11 +1,9 @@
<?php
-/** Ukrainian (українська мова)
- *
- * @package MediaWiki
- * @subpackage Language
- */
-/* Please, see Language.php for general function comments */
+/** Ukrainian (українська мова)
+ *
+ * @ingroup Language
+ */
class LanguageUk extends Language {
# Convert from the nominative form of a noun to some other case
# Invoked with {{grammar:case|word}}
@@ -60,6 +58,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( count($forms) === 2 ) return $count == 1 ? $forms[0] : $forms[1];
+
$forms = $this->preConvertPlural( $forms, 3 );
if ($count > 10 && floor(($count % 100) / 10) == 1) {
@@ -87,4 +89,3 @@ class LanguageUk extends Language {
}
}
}
-