2006-10-12 22:53:41 +00:00
|
|
|
<?php
|
|
|
|
|
/** Upper Sorbian (Hornjoserbsce)
|
|
|
|
|
*
|
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-10-12 22:53:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class LanguageHsb extends Language {
|
|
|
|
|
|
|
|
|
|
# Convert from the nominative form of a noun to some other case
|
|
|
|
|
# Invoked with {{GRAMMAR:case|word}}
|
|
|
|
|
|
|
|
|
|
function convertGrammar( $word, $case ) {
|
|
|
|
|
global $wgGrammarForms;
|
|
|
|
|
if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
|
|
|
|
|
return $wgGrammarForms['hsb'][$case][$word];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch ( $case ) {
|
|
|
|
|
case 'genitiw': # genitive
|
|
|
|
|
if ( $word == 'Wikipedija' ) {
|
|
|
|
|
$word = 'Wikipedije';
|
|
|
|
|
} elseif ( $word == 'Wikiknihi' ) {
|
|
|
|
|
$word = 'Wikiknih';
|
|
|
|
|
} elseif ( $word == 'Wikinowiny' ) {
|
|
|
|
|
$word = 'Wikinowin';
|
|
|
|
|
} elseif ( $word == 'Wikižórło' ) {
|
|
|
|
|
$word = 'Wikižórła';
|
|
|
|
|
} elseif ( $word == 'Wikicitaty' ) {
|
|
|
|
|
$word = 'Wikicitatow';
|
|
|
|
|
} elseif ( $word == 'Wikisłownik' ) {
|
|
|
|
|
$word = 'Wikisłownika';
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'datiw': # dativ
|
|
|
|
|
if ( $word == 'Wikipedija' ) {
|
|
|
|
|
$word = 'Wikipediji';
|
|
|
|
|
} elseif ( $word == 'Wikiknihi' ) {
|
|
|
|
|
$word = 'Wikikniham';
|
|
|
|
|
} elseif ( $word == 'Wikinowiny' ) {
|
|
|
|
|
$word = 'Wikinowinam';
|
|
|
|
|
} elseif ( $word == 'Wikižórło' ) {
|
|
|
|
|
$word = 'Wikižórłu';
|
|
|
|
|
} elseif ( $word == 'Wikicitaty' ) {
|
|
|
|
|
$word = 'Wikicitatam';
|
|
|
|
|
} elseif ( $word == 'Wikisłownik' ) {
|
|
|
|
|
$word = 'Wikisłownikej';
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'akuzativ': # akuzativ
|
|
|
|
|
if ( $word == 'Wikipedija' ) {
|
|
|
|
|
$word = 'Wikipediju';
|
|
|
|
|
} elseif ( $word == 'Wikiknihi' ) {
|
|
|
|
|
$word = 'Wikiknknihi';
|
|
|
|
|
} elseif ( $word == 'Wikinowiny' ) {
|
|
|
|
|
$word = 'Wikinowiny';
|
|
|
|
|
} elseif ( $word == 'Wikižórło' ) {
|
|
|
|
|
$word = 'Wikižórło';
|
|
|
|
|
} elseif ( $word == 'Wikicitaty' ) {
|
|
|
|
|
$word = 'Wikicitaty';
|
|
|
|
|
} elseif ( $word == 'Wikisłownik' ) {
|
|
|
|
|
$word = 'Wikisłownik';
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'instrumental': # instrumental
|
|
|
|
|
if ( $word == 'Wikipedija' ) {
|
|
|
|
|
$word = 'Wikipediju';
|
|
|
|
|
} elseif ( $word == 'Wikiknihi' ) {
|
|
|
|
|
$word = 'Wikiknihami';
|
|
|
|
|
} elseif ( $word == 'Wikinowiny' ) {
|
|
|
|
|
$word = 'Wikinowinami';
|
|
|
|
|
} elseif ( $word == 'Wikižórło' ) {
|
|
|
|
|
$word = 'Wikižórłom';
|
|
|
|
|
} elseif ( $word == 'Wikicitaty' ) {
|
|
|
|
|
$word = 'Wikicitatami';
|
|
|
|
|
} elseif ( $word == 'Wikisłownik' ) {
|
|
|
|
|
$word = 'Wikisłownikom';
|
|
|
|
|
} else {
|
|
|
|
|
$word = 'z ' . $word;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'lokatiw': # lokatiw
|
|
|
|
|
if ( $word == 'Wikipedija' ) {
|
|
|
|
|
$word = 'Wikipediji';
|
|
|
|
|
} elseif ( $word == 'Wikiknihi' ) {
|
|
|
|
|
$word = 'Wikiknihach';
|
|
|
|
|
} elseif ( $word == 'Wikinowiny' ) {
|
|
|
|
|
$word = 'Wikinowinach';
|
|
|
|
|
} elseif ( $word == 'Wikižórło' ) {
|
|
|
|
|
$word = 'Wikižórłu';
|
|
|
|
|
} elseif ( $word == 'Wikicitaty' ) {
|
|
|
|
|
$word = 'Wikicitatach';
|
|
|
|
|
} elseif ( $word == 'Wikisłownik' ) {
|
|
|
|
|
$word = 'Wikisłowniku';
|
|
|
|
|
} else {
|
|
|
|
|
$word = 'wo ' . $word;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2008-05-17 17:10:18 +00:00
|
|
|
|
2006-10-12 22:53:41 +00:00
|
|
|
return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
|
|
|
|
|
}
|
2006-11-10 12:48:35 +00:00
|
|
|
|
2007-11-18 20:15:49 +00:00
|
|
|
function convertPlural( $count, $forms ) {
|
|
|
|
|
if ( !count($forms) ) { return ''; }
|
|
|
|
|
$forms = $this->preConvertPlural( $forms, 4 );
|
|
|
|
|
|
2006-11-10 12:48:35 +00:00
|
|
|
switch ( abs( $count ) % 100 ) {
|
2007-11-18 20:15:49 +00:00
|
|
|
case 1: return $forms[0]; // singular
|
|
|
|
|
case 2: return $forms[1]; // dual
|
2006-11-10 12:48:35 +00:00
|
|
|
case 3:
|
2007-11-18 20:15:49 +00:00
|
|
|
case 4: return $forms[2]; // plural
|
|
|
|
|
default: return $forms[3]; // pluralgen
|
2006-11-10 12:48:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
2006-10-12 22:53:41 +00:00
|
|
|
}
|