From: Brion Vibber Date: Mon, 29 May 2006 21:56:43 +0000 (+0000) Subject: Revert to r13936; r14440 version was completely broken. X-Git-Tag: 1.31.0-rc.0~56971 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=bf73d49318ffa841996e02014e3922d53aee5d28;p=lhc%2Fweb%2Fwiklou.git Revert to r13936; r14440 version was completely broken. --- diff --git a/languages/LanguageSq.php b/languages/LanguageSq.php index c60477ef66..36d91799cc 100644 --- a/languages/LanguageSq.php +++ b/languages/LanguageSq.php @@ -1,108 +1,109 @@ "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ë", +); 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(); - 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 getNamespaces() { + global $wgNamespaceNamesSq; + return $wgNamespaceNamesSq; } - function getNamespaces() { - return $this->mNamespaceNamesSq + parent::getNamespaces(); + 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 getQuickbarSettings() { - return $this->mQuickbarSettingsSq; + global $wgQuickbarSettingsSq; + return $wgQuickbarSettingsSq; } function getSkinNames() { - return $this->mSkinNamesSq + parent::getSkinNames(); + global $wgSkinNamesSq; + return $wgSkinNamesSq; } function getDateFormats() { - return $this->mDateFormatsSq; + global $wgDateFormatsSq; + return $wgDateFormatsSq; } - function getMessage( $key ) { - if( isset( $this->mMessagesSq[$key] ) ) { - return $this->mMessagesSq[$key]; - } else { - return parent::getMessage( $key ); - } - } + # localised date and time + function date( $ts, $adj = false ) { + if ( $adj ) { $ts = $this->userAdjust( $ts ); } - function getAllMessages() { - return $this->mMessagesSq; + $d = substr( $ts, 0, 4 ) . " " . + $this->getMonthName( substr( $ts, 4, 2 ) ) . " ". + (0 + substr( $ts, 6, 2 )); + return $d; } - 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 NS_USER; - if( 0 == strcasecmp( "Perdoruesi_diskutim", $text ) ) return NS_USER_TALK; - return false; - } + function time( $ts, $adj = false ) { + if ( $adj ) { $ts = $this->userAdjust( $ts ); } - function timeDateSeparator( $format ) { - return ' '; + $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 ); + return $t; } + function timeanddate( $ts, $adj = false ) { + return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj ); + } - function timeBeforeDate( $format ) { - return false; + function getMessage( $key ) { + global $wgAllMessagesSq; + if(array_key_exists($key, $wgAllMessagesSq)) + return $wgAllMessagesSq[$key]; + else + return parent::getMessage($key); } function separatorTransformTable() {