Page MenuHomePhabricator

Add plural support for Bosnian
Closed, ResolvedPublic

Description

Author: demicx

Description:
Please add plural form support for Bosnian language (LanguageBs.php) Code
below is copied from LanguageHr.php

I don't sure that this all what I need to add. So please verify and add missing
parts.

function convertPlural( $count, $wordform1, $wordform2, $wordform3) {

		$count = str_replace ('.', '', $count);
		if ($count > 10 && floor(($count % 100) / 10) == 1) {
			return $wordform3;
		} else {
			switch ($count % 10) {
				case 1: return $wordform1;
				case 2:
				case 3:
				case 4: return $wordform2;
				default: return $wordform3;
			}
		}

}

}

Test case:

for {{plural:X|članak|članka|članaka}}

1 članak
2 – 4 članka
5 – 20 članaka
21 članak
22 – 24 članka
25 – 30 članaka


Version: 1.7.x
Severity: normal

Details

Reference
bz5905

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:14 PM
bzimport set Reference to bz5905.
bzimport added a subscriber: Unknown Object (MLST).

Committed to trunk.
Resuls for 0-25:

0 članaka
1-4 članak
5-20 članaka
21 članak
22-24 članka
25 članaka