* (bug 6136) Update to Catalan language (ca)
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 30 May 2006 12:28:07 +0000 (12:28 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Tue, 30 May 2006 12:28:07 +0000 (12:28 +0000)
RELEASE-NOTES
languages/LanguageCa.php

index e248f58..1fcf1e5 100644 (file)
@@ -380,7 +380,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6133) Update strip state as we work. This mostly fixes extensions
   used in Cite.php <ref> tags when Tidy is on.
 * (bug 6139) Workaround for transclusion oddities in Vietnamese upload text
-
+* (bug 6136) Update to Catalan language (ca)
 
 == Compatibility ==
 
index a6ad1ff..97a9ca2 100644 (file)
@@ -1,82 +1,95 @@
 <?php
-/**
+/** Catalan (Català)
+  *
   * @package MediaWiki
   * @subpackage Language
   */
 
-/* private */ $wgNamespaceNamesCa = array(
-       NS_MEDIA                        => 'Media',
-       NS_SPECIAL                      => 'Especial',
-       NS_MAIN                         => '',
-       NS_TALK                         => 'Discussió',
-       NS_USER                         => 'Usuari',
-       NS_USER_TALK            => 'Usuari_Discussió',
-       NS_PROJECT                      => $wgMetaNamespace,
-       NS_PROJECT_TALK         => $wgMetaNamespace.'_Discussió',
-       NS_IMAGE                        => 'Imatge',
-       NS_IMAGE_TALK           => 'Imatge_Discussió',
-       NS_MEDIAWIKI            => 'MediaWiki',
-       NS_MEDIAWIKI_TALK       => 'MediaWiki_Discussió',
-       NS_TEMPLATE                     => 'Template',
-       NS_TEMPLATE_TALK        => 'Template_Discussió',
-       NS_HELP                         => 'Ajuda',
-       NS_HELP_TALK            => 'Ajuda_Discussió',
-       NS_CATEGORY                     => 'Categoria',
-       NS_CATEGORY_TALK        => 'Categoria_Discussió'
-) + $wgNamespaceNamesEn;
-
-/* private */ $wgQuickbarSettingsCa = array(
-       "Cap", "Fixa a la dreta", "Fixa a l'esquerra", "Surant a l'esquerra"
-);
-
-/* private */ $wgSkinNamesCa = array(
-       'standard' => "Estàndard",
-       'nostalgia' => "Nostàlgia",
-       'cologneblue' => "Colònia blava",
-) + $wgSkinNamesEn;
-
-/* private */ $wgDateFormatsCa = array(
-#      "No preference",
-);
+require_once( 'LanguageUtf8.php' );
 
 if (!$wgCachedMessageArrays) {
        require_once('MessagesCa.php');
 }
 
-/** This is an UTF8 language */
-require_once( 'LanguageUtf8.php' );
-
-/** @package MediaWiki */
 class LanguageCa extends LanguageUtf8 {
+       private $mMessagesCa, $mNamespaceNamesCa = null;
+
+       private $mQuickbarSettingsCa = array(
+               "Cap", "Fixa a la dreta", "Fixa a l'esquerra", "Surant a l'esquerra"
+       );
+       
+       private $mSkinNamesCa = array(
+               'standard' => "Estàndard",
+               'nostalgia' => "Nostàlgia",
+               'cologneblue' => "Colònia blava",
+       );
+
+       private $mBookstoreListCa = array(
+               'Catàleg Col·lectiu de les Universitats de Catalunya' => 'http://ccuc.cbuc.es/cgi-bin/vtls.web.gateway?searchtype=control+numcard&searcharg=$1',
+               'Totselsllibres.com' => 'http://www.totselsllibres.com/tel/publi/busquedaAvanzadaLibros.do?ISBN=$1',
+       );
+
+       function LanguageCa() {
+               LanguageUtf8::LanguageUtf8();
+
+               global $wgAllMessagesCa;
+               $this->mMessagesCa =& $wgAllMessagesCa;
+
+               global $wgMetaNamespace;
+               $this->mNamespaceNamesCa = array(
+                       NS_MEDIA          => 'Media',
+                       NS_SPECIAL        => 'Especial',
+                       NS_MAIN           => '',
+                       NS_TALK           => 'Discussió',
+                       NS_USER           => 'Usuari',
+                       NS_USER_TALK      => 'Usuari_Discussió',
+                       NS_PROJECT        => $wgMetaNamespace,
+                       NS_PROJECT_TALK   => $wgMetaNamespace.'_Discussió',
+                       NS_IMAGE          => 'Imatge',
+                       NS_IMAGE_TALK     => 'Imatge_Discussió',
+                       NS_MEDIAWIKI      => 'MediaWiki',
+                       NS_MEDIAWIKI_TALK => 'MediaWiki_Discussió',
+                       NS_TEMPLATE       => 'Plantilla',
+                       NS_TEMPLATE_TALK  => 'Plantilla_Discussió',
+                       NS_HELP           => 'Ajuda',
+                       NS_HELP_TALK      => 'Ajuda_Discussió',
+                       NS_CATEGORY       => 'Categoria',
+                       NS_CATEGORY_TALK  => 'Categoria_Discussió'
+               );
+       }
 
        function getNamespaces() {
-               global $wgNamespaceNamesCa;
-               return $wgNamespaceNamesCa;
+               return $this->mNamespaceNamesCa + parent::getNamespaces();
        }
 
        function getQuickbarSettings() {
-               global $wgQuickbarSettingsCa;
-               return $wgQuickbarSettingsCa;
+               return $this->mQuickbarSettingsCa;
        }
 
        function getSkinNames() {
-               global $wgSkinNamesCa;
-               return $wgSkinNamesCa;
-       }
-
-       function formatMonth( $month, $format ) {
-               return $this->getMonthAbbreviation( $month );
+               return $this->mSkinNamesCa + parent::getSkinNames();
        }
 
        function getMessage( $key ) {
-               global $wgAllMessagesCa;
-               if( isset( $wgAllMessagesCa[$key] ) ) {
-                       return $wgAllMessagesCa[$key];
+               if( isset( $this->mMessagesCa[$key] ) ) {
+                       return $this->mMessagesCa[$key];
                } else {
                        return parent::getMessage( $key );
                }
        }
 
+       function getBookstoreList () {
+               return $this->mBookstoreListCa + parent::getBookstoreList();
+       }
+
+       function getAllMessages() {
+               return $this->mMessagesCa;
+       }
+
+       function formatMonth( $month, $format ) {
+               return $this->getMonthAbbreviation( $month );
+       }
+
        function separatorTransformTable() {
                return array(',' => '.', '.' => ',' );
        }