Revert to r13936; r14440 version was completely broken.
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 29 May 2006 21:56:43 +0000 (21:56 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 29 May 2006 21:56:43 +0000 (21:56 +0000)
languages/LanguageSq.php

index c60477e..36d9179 100644 (file)
 <?php
-/** Albanian (Shqip)
- *
- * @package MediaWiki
- * @subpackage Language
- */
-
-require_once( "LanguageUtf8.php" );
+/**
+  * @package MediaWiki
+  * @subpackage Language
+  */
+
+require_once("LanguageUtf8.php");
+
+/* private */ $wgNamespaceNamesSq = 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'
+) + $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() {