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 ) {
|
|
|
|
|
case 'rodilnik': # genitive
|
2007-04-11 04:09:48 +00:00
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedija': $word = 'Wikipedije'; break 2;
|
|
|
|
|
case 'Wikiknjige': $word = 'Wikiknjig'; break 2;
|
|
|
|
|
case 'Wikinovice': $word = 'Wikinovic'; break 2;
|
|
|
|
|
case 'Wikinavedek': $word = 'Wikinavedka'; break 2;
|
|
|
|
|
case 'Wikivir': $word = 'Wikivira'; break 2;
|
|
|
|
|
case 'Wikislovar': $word = 'Wikislovarja'; break 2;
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|
|
|
|
|
case 'dajalnik': # dativ
|
2007-04-11 04:09:48 +00:00
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedija': $word = 'Wikipediji'; break 2;
|
|
|
|
|
case 'Wikiknjige': $word = 'Wikiknjigam'; break 2;
|
|
|
|
|
case 'Wikinovice': $word = 'Wikinovicam'; break 2;
|
|
|
|
|
case 'Wikinavedek': $word = 'Wikinavedku'; break 2;
|
|
|
|
|
case 'Wikivir': $word = 'Wikiviru'; break 2;
|
|
|
|
|
case 'Wikislovar': $word = 'Wikislovarju'; break 2;
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|
|
|
|
|
case 'tožilnik': # akuzatív
|
2007-04-11 04:09:48 +00:00
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedija': $word = 'Wikipedijo'; break 2;
|
|
|
|
|
case 'Wikiknjige':
|
|
|
|
|
case 'Wikinovice':
|
|
|
|
|
case 'Wikinavedek':
|
|
|
|
|
case 'Wikivir':
|
|
|
|
|
case 'Wikislovar':
|
|
|
|
|
// Don't change, just fall through
|
|
|
|
|
break 2;
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|
2006-06-15 19:18:29 +00:00
|
|
|
case 'mestnik': # locative
|
2007-04-11 04:09:48 +00:00
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedija': $word = 'o Wikipediji'; break 2;
|
|
|
|
|
case 'Wikiknjige': $word = 'o Wikiknjigah'; break 2;
|
|
|
|
|
case 'Wikinovice': $word = 'o Wikinovicah'; break 2;
|
|
|
|
|
case 'Wikinavedek': $word = 'o Wikinavedku'; break 2;
|
|
|
|
|
case 'Wikivir': $word = 'o Wikiviru'; break 2;
|
|
|
|
|
case 'Wikislovar': $word = 'o Wikislovarju'; break 2;
|
|
|
|
|
default: $word = 'o ' . $word; break 2;
|
2006-02-18 20:48:16 +00:00
|
|
|
}
|
2006-06-15 19:18:29 +00:00
|
|
|
case 'orodnik': # instrumental
|
2007-04-11 04:09:48 +00:00
|
|
|
switch ( $word ) {
|
|
|
|
|
case 'Wikipedija': $word = 'z Wikipedijo'; break 2;
|
|
|
|
|
case 'Wikiknjige': $word = 'z Wikiknjigami'; break 2;
|
|
|
|
|
case 'Wikinovice': $word = 'z Wikinovicami'; break 2;
|
|
|
|
|
case 'Wikinavedek': $word = 'z Wikinavedkom'; break 2;
|
|
|
|
|
case 'Wikivir': $word = 'z Wikivirom'; break 2;
|
|
|
|
|
case 'Wikislovar': $word = 'z Wikislovarjem'; break 2;
|
|
|
|
|
default: $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
|
|
|
}
|