From 49eb9314f2fe17599631d363d28bc8161fb52e9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 23 Jun 2006 22:19:27 +0000 Subject: [PATCH] * Restructured --- languages/LanguageEs.php | 107 +++++++++++++++++++++------------------ languages/MessagesEs.php | 4 +- 2 files changed, 61 insertions(+), 50 deletions(-) diff --git a/languages/LanguageEs.php b/languages/LanguageEs.php index 50a2f6f21a..7813459f66 100644 --- a/languages/LanguageEs.php +++ b/languages/LanguageEs.php @@ -8,78 +8,89 @@ * @subpackage Language */ -require_once( "LanguageUtf8.php" ); - -/* private */ $wgNamespaceNamesEs = array( - NS_MEDIA => 'Media', - NS_SPECIAL => 'Especial', - NS_MAIN => '', - NS_TALK => 'Discusión', - NS_USER => 'Usuario', - NS_USER_TALK => 'Usuario_Discusión', - NS_PROJECT => $wgMetaNamespace, - NS_PROJECT_TALK => "{$wgMetaNamespace}_Discusión", - NS_IMAGE => 'Imagen', - NS_IMAGE_TALK => 'Imagen_Discusión', - NS_MEDIAWIKI => 'MediaWiki', - NS_MEDIAWIKI_TALK => 'MediaWiki_Discusión', - NS_TEMPLATE => 'Plantilla', - NS_TEMPLATE_TALK => 'Plantilla_Discusión', - NS_HELP => 'Ayuda', - NS_HELP_TALK => 'Ayuda_Discusión', - NS_CATEGORY => 'Categoría', - NS_CATEGORY_TALK => 'Categoría_Discusión', -) + $wgNamespaceNamesEn; - -/* private */ $wgQuickbarSettingsEs = array( - 'Ninguna', 'Fija a la izquierda', 'Fija a la derecha', 'Flotante a la izquierda' -); - -/* private */ $wgSkinNamesEs = array( - 'standard' => 'Estándar', -) + $wgSkinNamesEn; - -/* private */ $wgDateFormatsEs = array(); +require_once( 'LanguageUtf8.php' ); if (!$wgCachedMessageArrays) { require_once('MessagesEs.php'); } class LanguageEs extends LanguageUtf8 { + private $mMessagesEs, $mNamespaceNamesEs = null; + + private $mQuickbarSettingsEs = array( + 'Ninguna', 'Fija a la izquierda', 'Fija a la derecha', 'Flotante a la izquierda' + ); + + private $mSkinNamesEs = array( + 'standard' => 'Estándar', + ); + + function __construct() { + parent::__construct(); + + global $wgAllMessagesEs; + $this->mMessagesEs =& $wgAllMessagesEs; + + global $wgMetaNamespace; + $this->mNamespaceNamesEs = array( + NS_MEDIA => 'Media', + NS_SPECIAL => 'Especial', + NS_MAIN => '', + NS_TALK => 'Discusión', + NS_USER => 'Usuario', + NS_USER_TALK => 'Usuario_Discusión', + NS_PROJECT => $wgMetaNamespace, + NS_PROJECT_TALK => $wgMetaNamespace . '_Discusión', + NS_IMAGE => 'Imagen', + NS_IMAGE_TALK => 'Imagen_Discusión', + NS_MEDIAWIKI => 'MediaWiki', + NS_MEDIAWIKI_TALK => 'MediaWiki_Discusión', + NS_TEMPLATE => 'Plantilla', + NS_TEMPLATE_TALK => 'Plantilla_Discusión', + NS_HELP => 'Ayuda', + NS_HELP_TALK => 'Ayuda_Discusión', + NS_CATEGORY => 'Categoría', + NS_CATEGORY_TALK => 'Categoría_Discusión', + ); + + } function getNamespaces() { - global $wgNamespaceNamesEs; - return $wgNamespaceNamesEs; + return $this->mNamespaceNamesEs + parent::getNamespaces(); } function getQuickbarSettings() { - global $wgQuickbarSettingsEs; - return $wgQuickbarSettingsEs; + return $this->mQuickbarSettingsEs; } function getSkinNames() { - global $wgSkinNamesEs; - return $wgSkinNamesEs; + return $this->mSkinNamesEs + parent::getSkinNames(); } - function formatMonth( $month, $format ) { - return $this->getMonthAbbreviation( $month ); - } - - function timeDateSeparator( $format ) { - return ' '; + function getDateFormats() { + return false; } - function getMessage( $key ) { - global $wgAllMessagesEs; - if( isset( $wgAllMessagesEs[$key] ) ) { - return $wgAllMessagesEs[$key]; + if( isset( $this->mMessagesEs[$key] ) ) { + return $this->mMessagesEs[$key]; } else { return parent::getMessage( $key ); } } + function getAllMessages() { + return $this->mMessagesEs; + } + + function formatMonth( $month, $format ) { + return $this->getMonthAbbreviation( $month ); + } + + function timeDateSeparator( $format ) { + return ' '; + } + function separatorTransformTable() { return array(',' => '.', '.' => ',' ); } diff --git a/languages/MessagesEs.php b/languages/MessagesEs.php index dc0e4b818c..07ee2c77b6 100644 --- a/languages/MessagesEs.php +++ b/languages/MessagesEs.php @@ -1,7 +1,7 @@ "Subrayar enlaces", -- 2.20.1