X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguageLa.php;h=3dbf45aa02278c3e23735476576ef109c404d676;hb=9acc271e581e1744e537c8f3b62250366328fb7c;hp=da0f91bad4a541a5241fcf0b305185a9a2e1efce;hpb=dd37e12ff6b7be5b004f722313eea58a16308d2e;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/LanguageLa.php b/languages/LanguageLa.php index da0f91bad4..3dbf45aa02 100644 --- a/languages/LanguageLa.php +++ b/languages/LanguageLa.php @@ -1,167 +1,129 @@ "-" - -# The names of the namespaces can be set here, but the numbers -# are magical, so don't change or move them! The Namespace class -# encapsulates some of the magic-ness. -# /* private */ $wgNamespaceNamesLa = array( - -2 => "Media", - -1 => "Specialis", - 0 => "", - 1 => "Disputatio", - 2 => "Usor", - 3 => "Disputatio_Usoris", - 4 => "Wikipedia", - 5 => "Disputatio_Wikipedia", - 6 => "Imago", - 7 => "Disputatio_Imaginis", - 8 => "MediaWiki", - 9 => "Disputatio_MediaWiki", - 10 => "Template", - 11 => "Template_talk" - - -); + NS_SPECIAL => 'Specialis', + NS_MAIN => '', + NS_TALK => 'Disputatio', + NS_USER => 'Usor', + NS_USER_TALK => 'Disputatio_Usoris', + NS_PROJECT => $wgMetaNamespace, + NS_PROJECT_TALK => FALSE, # Set in constructor + NS_IMAGE => 'Imago', + NS_IMAGE_TALK => 'Disputatio_Imaginis', + NS_MEDIAWIKI => 'MediaWiki', + NS_MEDIAWIKI_TALK => 'Disputatio_MediaWiki', + NS_TEMPLATE => 'Formula', + NS_TEMPLATE_TALK => 'Disputatio_Formulae', + NS_HELP => 'Auxilium', + NS_HELP_TALK => 'Disputatio_Auxilii', + NS_CATEGORY => 'Categoria', + NS_CATEGORY_TALK => 'Disputatio_Categoriae', +) + $wgNamespaceNamesEn; /* private */ $wgQuickbarSettingsLa = array( "Nullus", "Constituere a sinistra", "Constituere a dextra", "Innens a sinistra" ); /* private */ $wgSkinNamesLa = array( - 'standard' => "Norma", - 'nostalgia' => "Nostalgia", - 'cologneblue' => "Caerulus Colonia", - 'smarty' => "Paddington", - 'montparnasse' => "Montparnasse", - 'davinci' => "DaVinci", - 'mono' => "Mono", - 'monobook' => "MonoBook" -); - -/* private */ $wgMathNamesLa = array( - "Semper vertere PNG", - "HTML si admodum simplex, alioqui PNG", - "HTML si fieri potest, alioqui PNG", - "Stet ut TeX (pro navigatri texti)", - "Commendatum pro navigatri recentes" -); - -/* private */ $wgUserTogglesLa = array( - "hover" => "Monstrare capsam impensam super wikinexos", - "underline" => "Subscribere nexi", - "highlightbroken" => "Formare nexos fractos sici (alioqui: sic?).", - "justify" => "Saepire capites", - "hideminor" => "Celare mutationes recentes minores", - "usenewrc" => "Mutationes recentes amplificatae (non efficit in tota navigatra)", - "numberheadings" => "Numerare indices necessario", - "rememberpassword" => "Recordari tesserae inter conventa (uti cookies)", - "editwidth" => "Capsa recensitorum totam latitudinem habet", - "editondblclick" => "Premere bis ut paginam recensere (uti JavaScript)", - "watchdefault" => "Custodire res novas et mutatas", - "minordefault" => "Notare totas mutations ut minor", - "previewontop" => "Monstrare praevisus ante capsam recensiti, non post ipsam" - -); - -/* private */ $wgBookstoreListLa = array( - "AddALL" => "http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN", - "PriceSCAN" => "http://www.pricescan.com/books/bookDetail.asp?isbn=$1", - "Barnes & Noble" => "http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1", - "Amazon.com" => "http://www.amazon.com/exec/obidos/ISBN=$1" -); - -/* private */ $wgWeekdayNamesLa = array( - "dies Solis", "dies Lunae", "dies Martis", "dies Mercuri", "dies Iovis", - "dies Veneris", "dies Saturni" + 'standard' => 'Norma', + 'nostalgia' => 'Nostalgia', + 'cologneblue' => 'Caerulus Colonia' +) + $wgSkinNamesEn; + + +$wgAllMessagesLa = array( + +# User Toggles + +"tog-underline" => "Subscribere nexi", +"tog-highlightbroken" => "Formare nexos fractos sici (alioqui: sic?).", +"tog-justify" => "Saepire capites", +"tog-hideminor" => "Celare mutationes recentes minores", +"tog-usenewrc" => "Mutationes recentes amplificatae (non efficit in tota navigatra)", +"tog-numberheadings" => "Numerare indices necessario", +"tog-rememberpassword" => "Recordari tesserae inter conventa (uti cookies)", +"tog-editwidth" => "Capsa recensitorum totam latitudinem habet", +"tog-editondblclick" => "Premere bis ut paginam recensere (uti JavaScript)", +"tog-watchdefault" => "Custodire res novas et mutatas", +"tog-minordefault" => "Notare totas mutations ut minor", +"tog-previewontop" => "Monstrare praevisus ante capsam recensiti, non post ipsam", + +# Dates + +'sunday' => 'dies Solis', +'monday' => 'dies Lunae', +'tuesday' => 'dies Martis', +'wednesday' => 'dies Mercuri', +'thursday' => 'dies Iovis', +'friday' => 'dies Veneris', +'saturday' => 'dies Saturni', +'january' => 'Ianuarii', +'february' => 'Februarii', +'march' => 'Martii', +'april' => 'Aprilis', +'may_long' => 'Maii', +'june' => 'Iunii', +'july' => 'Iulii', +'august' => 'Augusti', +'september' => 'Septembri', +'october' => 'Octobri', +'november' => 'Novembri', +'december' => 'Decembri', +'jan' => 'ian', +'feb' => 'feb', +'mar' => 'mar', +'apr' => 'apr', +'may' => 'mai', +'jun' => 'iun', +'jul' => 'iul', +'aug' => 'aug', +'sep' => 'sep', +'oct' => 'oct', +'nov' => 'nov', +'dec' => 'dec', + +# Math +'mw_math_png' => "Semper vertere PNG", +'mw_math_simple' => "HTML si admodum simplex, alioqui PNG", +'mw_math_html' => "HTML si fieri potest, alioqui PNG", +'mw_math_source' => "Stet ut TeX (pro navigatri texti)", +'mw_math_modern' => "Commendatum pro navigatri recentes", +'mw_math_mathml' => 'MathML', ); -/* private */ $wgMonthNamesLa = array( - "Ianuarii", "Februarii", "Martii", "Aprilis", "Maii", "Iunii", - "Iulii", "Augusti", "Septembri", "Octobri", "Novembri", - "Decembri" -); - -/* private */ $wgMonthAbbreviationsLa = array( - "ian", "feb", "mar", "apr", "mai", "iun", "iul", "aug", - "sep", "oct", "nov", "dec" -); - -# All special pages have to be listed here: a description of "" -# will make them not show up on the "Special Pages" page, which -# is the right thing for some of them (such as the "targeted" ones). -# -/* private */ $wgValidSpecialPagesLa = array( - "Userlogin" => "", - "Userlogout" => "", - "Preferences" => "Praeferentiae usoris", - "Watchlist" => "Paginae custoditae", - "Recentchanges" => "Mutationes recentes", - "Upload" => "Onerare fascicula", - "Imagelist" => "Index imaginum", - "Listusers" => "Usores perscripti", - "Statistics" => "Statisticas", - "Randompage" => "Pagina fortuita", - - "Lonelypages" => "Paginae orbatae", - "Unusedimages" => "Imagines orbatae", - "Popularpages" => "Res populares", - "Wantedpages" => "Res desideratissimae", - "Shortpages" => "Res breves", - "Longpages" => "Res longae", - "Newpages" => "Res novae", -# "Intl" => "Interlanguage Links", - "Allpages" => "Totae paginae (ex indice)", - - "Ipblocklist" => "Loci IP obstructi", - "Maintenance" => "Pagina alimentori", - "Specialpages" => "", # "Paginae specialiae", - "Contributions" => "", # "Conlationes", - "Emailuser" => "", # "Mittere litteras electronicas ad usorum(?)", - "Whatlinkshere" => "", # "Nexi ad hanc paginam", - "Recentchangeslinked" => "", # "Mutationes conlata (?)", - "Movepage" => "", # "Motare hanc paginam", - "Booksources" => "Fontes externi (libri)", -# "Categories" => "Page categories", - "Export" => "Exportare in XML", - "Version" => "Version", -); - -/* private */ $wgSysopSpecialPagesLa = array( - "Blockip" => "Obstruere locum IP", - "Asksql" => "Quaerere basem dati", - "Undelete" => "Videre et restituere paginas deletas" -); - -/* private */ $wgDeveloperSpecialPagesLa = array( - "Lockdb" => "Suspendere mutationes", - "Unlockdb" => "Permittere mutationes", - "Debug" => "Nuntii de refectis" -); - - -include( "LanguageUtf8.php" ); +require_once( "LanguageUtf8.php" ); class LanguageLa extends LanguageUtf8 { + function LanguageLa() { + global $wgNamespaceNamesLa, $wgMetaNamespace; + LanguageUtf8::LanguageUtf8(); + $wgNamespaceNamesLa[NS_PROJECT_TALK] = 'Disputatio_' . + $this->convertGrammar( $wgMetaNamespace, 'genitive' ); + } function getNamespaces() { global $wgNamespaceNamesLa; return $wgNamespaceNamesLa; } - function getNsText( $index ) { - global $wgNamespaceNamesLa; - return $wgNamespaceNamesLa[$index]; - } - function getNsIndex( $text ) { global $wgNamespaceNamesLa; + global $wgMetaNamespace; foreach ( $wgNamespaceNamesLa as $i => $n ) { if ( 0 == strcasecmp( $n, $text ) ) { return $i; } } + + # Backwards compatibility hacks + if( $wgMetaNamespace == 'Vicipaedia' || $wgMetaNamespace == 'Victionarium' ) { + if( 0 == strcasecmp( 'Wikipedia', $text ) ) return NS_PROJECT; + if( 0 == strcasecmp( 'Disputatio_Wikipedia', $text ) ) return NS_PROJECT_TALK; + } return false; } @@ -175,36 +137,7 @@ class LanguageLa extends LanguageUtf8 { return $wgSkinNamesLa; } - function getMathNames() { - global $wgMathNamesLa; - return $wgMathNamesLa; - } - - function getUserToggles() { - global $wgUserTogglesLa; - return $wgUserTogglesLa; - } - - function getMonthName( $key ) - { - global $wgMonthNamesLa; - return $wgMonthNamesLa[$key-1]; - } - - function getMonthAbbreviation( $key ) - { - global $wgMonthAbbreviationsLa; - return $wgMonthAbbreviationsLa[$key-1]; - } - - function getWeekdayName( $key ) - { - global $wgWeekdayNamesLa; - return $wgWeekdayNamesLa[$key-1]; - } - - function date( $ts, $adj = false ) - { + function date( $ts, $adj = false ) { if ( $adj ) { $ts = $this->userAdjust( $ts ); } $d = $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . @@ -213,36 +146,34 @@ class LanguageLa extends LanguageUtf8 { return $d; } - function timeanddate( $ts, $adj = false ) - { + function timeanddate( $ts, $adj = false ) { return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj ); } - function getValidSpecialPages() - { - global $wgValidSpecialPagesLa; - return $wgValidSpecialPagesLa; - } - - function getSysopSpecialPages() - { - global $wgSysopSpecialPagesLa; - return $wgSysopSpecialPagesLa; - } - - function getDeveloperSpecialPages() - { - global $wgDeveloperSpecialPagesLa; - return $wgDeveloperSpecialPagesLa; - } - - function getMessage( $key ) - { - global $wgAllMessagesLa, $wgAllMessagesEn; - $m = $wgAllMessagesLa[$key]; - - if ( "" == $m ) { return $wgAllMessagesEn[$key]; } - else return $m; + function getMessage( $key ) { + global $wgAllMessagesLa; + if( isset( $wgAllMessagesLa[$key] ) ) { + return $wgAllMessagesLa[$key]; + } + return parent::getMessage( $key ); + } + + /** + * 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. + */ + function convertGrammar( $word, $case ) { + switch ( $case ) { + case 'genitive': + // 1st and 2nd declension singular only. + $in = array( '/a$/', '/u[ms]$/', '/tio$/' ); + $out = array( 'ae', 'i', 'tionis' ); + return preg_replace( $in, $out, $word ); + default: + return $word; + } } }