2003-12-18 02:41:39 +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
|
|
|
/** Latin (lingua Latina)
|
|
|
|
|
*
|
|
|
|
|
* @ingroup Language
|
|
|
|
|
*/
|
2006-07-26 07:15:39 +00:00
|
|
|
class LanguageLa extends Language {
|
2005-05-06 02:38:42 +00:00
|
|
|
/**
|
|
|
|
|
* Convert from the nominative form of a noun to some other case
|
|
|
|
|
*
|
|
|
|
|
* Just used in a couple places for sitenames; special-case as necessary.
|
|
|
|
|
* Rules are far from complete.
|
2006-06-11 15:40:17 +00:00
|
|
|
*
|
2007-02-07 21:20:43 +00:00
|
|
|
* Cases: genitive, accusative, ablative
|
2011-05-29 15:53:18 +00:00
|
|
|
*
|
|
|
|
|
* @param $word string
|
|
|
|
|
* @param $case string
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
2005-05-06 02:38:42 +00:00
|
|
|
*/
|
|
|
|
|
function convertGrammar( $word, $case ) {
|
2006-05-25 14:31:28 +00:00
|
|
|
global $wgGrammarForms;
|
2010-07-29 09:43:18 +00:00
|
|
|
if ( isset( $wgGrammarForms['la'][$case][$word] ) ) {
|
2006-05-25 20:52:45 +00:00
|
|
|
return $wgGrammarForms['la'][$case][$word];
|
2006-05-25 14:31:28 +00:00
|
|
|
}
|
|
|
|
|
|
2005-05-06 02:38:42 +00:00
|
|
|
switch ( $case ) {
|
|
|
|
|
case 'genitive':
|
2007-02-07 21:20:43 +00:00
|
|
|
// only a few declensions, and even for those mostly the singular only
|
|
|
|
|
$in = array( '/u[ms]$/', # 2nd declension singular
|
|
|
|
|
'/ommunia$/', # 3rd declension neuter plural (partly)
|
|
|
|
|
'/a$/', # 1st declension singular
|
|
|
|
|
'/libri$/', '/nuntii$/', # 2nd declension plural (partly)
|
|
|
|
|
'/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
|
|
|
|
|
'/es$/' # 5th declension singular
|
|
|
|
|
);
|
|
|
|
|
$out = array( 'i',
|
|
|
|
|
'ommunium',
|
|
|
|
|
'ae',
|
|
|
|
|
'librorum', 'nuntiorum',
|
|
|
|
|
'tionis', 'ntis', 'atis',
|
|
|
|
|
'ei'
|
|
|
|
|
);
|
|
|
|
|
return preg_replace( $in, $out, $word );
|
|
|
|
|
case 'accusative':
|
|
|
|
|
// only a few declensions, and even for those mostly the singular only
|
|
|
|
|
$in = array( '/u[ms]$/', # 2nd declension singular
|
|
|
|
|
'/a$/', # 1st declension singular
|
2007-02-16 08:48:20 +00:00
|
|
|
'/ommuniam$/', # 3rd declension neuter plural (partly)
|
2007-02-07 21:20:43 +00:00
|
|
|
'/libri$/', '/nuntii$/', # 2nd declension plural (partly)
|
|
|
|
|
'/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
|
|
|
|
|
'/es$/' # 5th declension singular
|
|
|
|
|
);
|
|
|
|
|
$out = array( 'um',
|
|
|
|
|
'am',
|
2007-02-16 08:48:20 +00:00
|
|
|
'ommunia',
|
2007-02-07 21:20:43 +00:00
|
|
|
'libros', 'nuntios',
|
|
|
|
|
'tionem', 'ntem', 'atem',
|
|
|
|
|
'em'
|
|
|
|
|
);
|
|
|
|
|
return preg_replace( $in, $out, $word );
|
|
|
|
|
case 'ablative':
|
|
|
|
|
// only a few declensions, and even for those mostly the singular only
|
|
|
|
|
$in = array( '/u[ms]$/', # 2nd declension singular
|
|
|
|
|
'/ommunia$/', # 3rd declension neuter plural (partly)
|
|
|
|
|
'/a$/', # 1st declension singular
|
|
|
|
|
'/libri$/', '/nuntii$/', # 2nd declension plural (partly)
|
|
|
|
|
'/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
|
|
|
|
|
'/es$/' # 5th declension singular
|
|
|
|
|
);
|
|
|
|
|
$out = array( 'o',
|
|
|
|
|
'ommunibus',
|
|
|
|
|
'a',
|
|
|
|
|
'libris', 'nuntiis',
|
|
|
|
|
'tione', 'nte', 'ate',
|
|
|
|
|
'e'
|
|
|
|
|
);
|
2005-05-06 02:38:42 +00:00
|
|
|
return preg_replace( $in, $out, $word );
|
|
|
|
|
default:
|
|
|
|
|
return $word;
|
|
|
|
|
}
|
2004-02-28 07:23:04 +00:00
|
|
|
}
|
2003-12-18 02:41:39 +00:00
|
|
|
}
|