From: Niklas Laxström Date: Mon, 29 May 2006 22:16:27 +0000 (+0000) Subject: * Fixed the global in broken version, no more warnings X-Git-Tag: 1.31.0-rc.0~56970 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=f505924ec736d3bb241dcb32605689c0a60f299c;p=lhc%2Fweb%2Fwiklou.git * Fixed the global in broken version, no more warnings --- diff --git a/languages/LanguageSq.php b/languages/LanguageSq.php index 36d91799cc..fad3736d08 100644 --- a/languages/LanguageSq.php +++ b/languages/LanguageSq.php @@ -1,109 +1,107 @@ "Media", - NS_SPECIAL => "Speciale", - NS_MAIN => "", - NS_TALK => "Diskutim", - NS_USER => "Përdoruesi", - NS_USER_TALK => "Përdoruesi_diskutim", - NS_PROJECT => $wgMetaNamespace, - NS_PROJECT_TALK => $wgMetaNamespace . "_diskutim", - NS_IMAGE => "Figura", - NS_IMAGE_TALK => "Figura_diskutim", - NS_MEDIAWIKI => "MediaWiki", - NS_MEDIAWIKI_TALK => "MediaWiki_diskutim", - NS_TEMPLATE => "Stampa", - NS_TEMPLATE_TALK => "Stampa_diskutim", - NS_HELP => 'Ndihmë', - NS_HELP_TALK => 'Ndihmë_diskutim' -) + $wgNamespaceNamesEn; - -/* private */ $wgQuickbarSettingsSq = array( - "Asgjë", "Lidhur majtas", "Lidhur djathtas", "Fluturo majtas" -); - -/* private */ $wgSkinNamesSq = array( - 'standard' => "Standarte", - 'nostalgia' => "Nostalgjike", - 'cologneblue' => "Kolonjë Blu" -) + $wgSkinNamesEn; - - -/* private */ $wgDateFormatsSq = array( -# "Pa preferencë", -); +/** Albanian (Shqip) + * + * @package MediaWiki + * @subpackage Language + */ + +require_once( "LanguageUtf8.php" ); if (!$wgCachedMessageArrays) { require_once('MessagesSq.php'); } class LanguageSq extends LanguageUtf8 { + private $mMessagesSq, $mNamespaceNamesSq = null; + + private $mQuickbarSettingsSq = array( + 'Asnjë', 'Lidhur majtas', 'Lidhur djathtas', 'Pezull majtas', 'Pezull djathtas' + ); + + private $mSkinNamesSq = array( + 'standard' => "Standarte", + 'nostalgia' => "Nostalgjike", + 'cologneblue' => "Kolonjë Blu" + ); + + private $mDateFormatsSq = array( + MW_DATE_DEFAULT => 'No preference', + MW_DATE_DMY => '16:12, 15 January 2001', + MW_DATE_ISO => '2001-01-15 16:12:34' + ); + + function LanguageSq() { + LanguageUtf8::LanguageUtf8(); - function getNamespaces() { - global $wgNamespaceNamesSq; - return $wgNamespaceNamesSq; + global $wgAllMessagesSq; + $this->mMessagesSq =& $wgAllMessagesSq; + + global $wgMetaNamespace; + $this->mNamespaceNamesSq = array( + NS_MEDIA => "Media", + NS_SPECIAL => "Speciale", + NS_MAIN => "", + NS_TALK => "Diskutim", + NS_USER => "Përdoruesi", + NS_USER_TALK => "Përdoruesi_diskutim", + NS_PROJECT => $wgMetaNamespace, + NS_PROJECT_TALK => $wgMetaNamespace . "_diskutim", + NS_IMAGE => "Figura", + NS_IMAGE_TALK => "Figura_diskutim", + NS_MEDIAWIKI => "MediaWiki", + NS_MEDIAWIKI_TALK => "MediaWiki_diskutim", + NS_TEMPLATE => "Stampa", + NS_TEMPLATE_TALK => "Stampa_diskutim", + NS_HELP => 'Ndihmë', + NS_HELP_TALK => 'Ndihmë_diskutim' + ); } - function getNsIndex( $text ) { - global $wgNamespaceNamesSq; - foreach ( $wgNamespaceNamesSq as $i => $n ) { - if ( 0 == strcasecmp( $n, $text ) ) { return $i; } - } - # Compatbility with alt names: - if( 0 == strcasecmp( "Perdoruesi", $text ) ) return 2; - if( 0 == strcasecmp( "Perdoruesi_diskutim", $text ) ) return 3; - return false; + function getNamespaces() { + return $this->mNamespaceNamesSq + parent::getNamespaces(); } function getQuickbarSettings() { - global $wgQuickbarSettingsSq; - return $wgQuickbarSettingsSq; + return $this->mQuickbarSettingsSq; } function getSkinNames() { - global $wgSkinNamesSq; - return $wgSkinNamesSq; + return $this->mSkinNamesSq + parent::getSkinNames(); } function getDateFormats() { - global $wgDateFormatsSq; - return $wgDateFormatsSq; + return $this->mDateFormatsSq; } - # localised date and time - function date( $ts, $adj = false ) { - if ( $adj ) { $ts = $this->userAdjust( $ts ); } - - $d = substr( $ts, 0, 4 ) . " " . - $this->getMonthName( substr( $ts, 4, 2 ) ) . " ". - (0 + substr( $ts, 6, 2 )); - return $d; + function getMessage( $key ) { + if( isset( $this->mMessagesSq[$key] ) ) { + return $this->mMessagesSq[$key]; + } else { + return parent::getMessage( $key ); + } } - function time( $ts, $adj = false ) { - if ( $adj ) { $ts = $this->userAdjust( $ts ); } + function getAllMessages() { + return $this->mMessagesSq; + } - $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); - return $t; + function getNsIndex( $text ) { + foreach ( $this->mNamespaceNamesSq as $i => $n ) { + if ( 0 == strcasecmp( $n, $text ) ) { return $i; } + } + # Compatbility with alt names: + if( 0 == strcasecmp( "Perdoruesi", $text ) ) return NS_USER; + if( 0 == strcasecmp( "Perdoruesi_diskutim", $text ) ) return NS_USER_TALK; + return false; } - function timeanddate( $ts, $adj = false ) { - return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj ); + function timeDateSeparator( $format ) { + return ' '; } - function getMessage( $key ) { - global $wgAllMessagesSq; - if(array_key_exists($key, $wgAllMessagesSq)) - return $wgAllMessagesSq[$key]; - else - return parent::getMessage($key); + + function timeBeforeDate( $format ) { + return false; } function separatorTransformTable() {