2007-06-02 20:13:51 +00:00
|
|
|
<?php
|
2008-01-02 18:40:05 +00:00
|
|
|
/** Belarusian in Taraškievica orthography (Беларуская тарашкевіца)
|
2007-06-02 20:13:51 +00:00
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @ingroup Language
|
2007-06-02 20:13:51 +00:00
|
|
|
*
|
|
|
|
|
* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
|
|
|
|
|
* @bug 1638, 2135
|
|
|
|
|
* @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php
|
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
|
|
|
|
|
* @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class LanguageBe_tarask extends Language {
|
2008-01-02 18:40:05 +00:00
|
|
|
/**
|
2008-05-22 17:56:29 +00:00
|
|
|
* 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...)
|
|
|
|
|
*/
|
2008-01-02 18:40:05 +00:00
|
|
|
|
2007-11-18 20:15:49 +00:00
|
|
|
function convertPlural( $count, $forms ) {
|
|
|
|
|
if ( !count($forms) ) { return ''; }
|
|
|
|
|
|
2008-05-22 17:56:29 +00:00
|
|
|
//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 );
|
2008-01-02 18:40:05 +00:00
|
|
|
|
2007-06-02 20:13:51 +00:00
|
|
|
if ($count > 10 && floor(($count % 100) / 10) == 1) {
|
2007-11-18 20:15:49 +00:00
|
|
|
return $forms[2];
|
2007-06-02 20:13:51 +00:00
|
|
|
} else {
|
|
|
|
|
switch ($count % 10) {
|
2007-11-18 20:15:49 +00:00
|
|
|
case 1: return $forms[0];
|
2007-06-02 20:13:51 +00:00
|
|
|
case 2:
|
|
|
|
|
case 3:
|
2007-11-18 20:15:49 +00:00
|
|
|
case 4: return $forms[1];
|
|
|
|
|
default: return $forms[2];
|
2007-06-02 20:13:51 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|