2004-02-18 02:15:00 +00:00
|
|
|
<?php
|
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
|
|
|
|
2006-06-21 14:37:37 +00:00
|
|
|
/** Slovenian (Slovenščina)
|
|
|
|
|
*
|
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
|
2006-06-21 14:37:37 +00:00
|
|
|
*/
|
2006-07-26 07:15:39 +00:00
|
|
|
class LanguageSl extends Language {
|
2006-02-18 20:48:16 +00:00
|
|
|
# Convert from the nominative form of a noun to some other case
|
|
|
|
|
# Invoked with {{GRAMMAR:case|word}}
|
2006-06-14 11:56:25 +00:00
|
|
|
/**
|
2006-06-15 20:07:58 +00:00
|
|
|
* Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik
|
2006-06-14 11:56:25 +00:00
|
|
|
*/
|
2006-02-18 20:48:16 +00:00
|
|
|
function convertGrammar( $word, $case ) {
|
2006-05-25 14:31:28 +00:00
|
|
|
global $wgGrammarForms;
|
2006-05-25 20:52:45 +00:00
|
|
|
if ( isset($wgGrammarForms['sl'][$case][$word]) ) {
|
|
|
|
|
return $wgGrammarForms['sl'][$case][$word];
|
2006-05-25 14:31:28 +00:00
|
|
|
}
|
|
|
|
|
|
2006-02-18 20:48:16 +00:00
|
|
|
switch ( $case ) {
|
2006-06-15 19:18:29 +00:00
|
|
|
case 'mestnik': # locative
|
2008-08-11 18:10:38 +00:00
|
|
|
$word = 'o ' . $word; break;
|
2006-06-15 19:18:29 +00:00
|
|
|
case 'orodnik': # instrumental
|
* (bug 14165, bug 14294) Wikimedia specific configuration in convertGrammar() for 13 localisations (be, be-tarask, bs, cs, dsb, ga, gsw, hsb, hu, lv, rmy, sk, sl) removed. The settings have been put in extension WikimediaMessages. For be, be-tarask, bs, dsb, hsb some duplicates (1=1) were removed. Patch for Czech by Danny B.
* Also put the wgGrammarForms from the Wikimedia configuration in here, so everything is in one place. Bonus with this setup is that there will be a little less work for Wikimedia shell operators, as the wgGrammarForms configuration is now accessible to i18n committers.
* Header for WikimediaMessages.php, and add myself to extension credits.
WARNING to Wikimedia shell operators: the whole section "wgGrammarForms" in InitialiseSettings.php.html should be remove after updating to this version. It will most probably overrule all settings in WikimediaMessages because of "'default' => array()"
2008-08-10 18:32:10 +00:00
|
|
|
$word = 'z ' . $word;
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $word; # this will return the original value for 'imenovalnik' (nominativ) and all undefined case values
|
|
|
|
|
}
|
|
|
|
|
|
2007-11-18 20:15:49 +00:00
|
|
|
function convertPlural( $count, $forms ) {
|
|
|
|
|
if ( !count($forms) ) { return ''; }
|
|
|
|
|
$forms = $this->preConvertPlural( $forms, 5 );
|
|
|
|
|
|
2006-06-21 14:37:37 +00:00
|
|
|
if ( $count % 100 == 1 ) {
|
2006-06-07 19:58:45 +00:00
|
|
|
$index = 0;
|
2006-06-21 14:37:37 +00:00
|
|
|
} elseif ( $count % 100 == 2 ) {
|
2006-06-07 19:58:45 +00:00
|
|
|
$index = 1;
|
2006-06-21 14:37:37 +00:00
|
|
|
} elseif ( $count % 100 == 3 || $count % 100 == 4 ) {
|
2006-06-07 19:58:45 +00:00
|
|
|
$index = 2;
|
|
|
|
|
} elseif ( $count != 0 ) {
|
|
|
|
|
$index = 3;
|
|
|
|
|
} else {
|
|
|
|
|
$index = 4;
|
|
|
|
|
}
|
|
|
|
|
return $forms[$index];
|
|
|
|
|
}
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|