r14678 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14677‎ | r14678 | r14679 >
Date:13:38, 9 June 2006
Author:nikerabbit
Status:old
Tags:
Comment:
* Restructured
Modified paths:
  • /trunk/phase3/languages/LanguageOc.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageOc.php
@@ -1,93 +1,101 @@
22 <?php
3 -/**
4 - * @package MediaWiki
5 - * @subpackage Language
6 - */
 3+/** Occitan (Occitan)
 4+ *
 5+ * @package MediaWiki
 6+ * @subpackage Language
 7+ */
78
89 require_once( "LanguageUtf8.php" );
910
10 -/* private */ $wgNamespaceNamesOc = array(
11 - NS_SPECIAL => "Especial",
12 - NS_MAIN => "",
13 - NS_TALK => "Discutir",
14 - NS_USER => "Utilisator",
15 - NS_USER_TALK => "Discutida_Utilisator",
16 - NS_PROJECT => $wgMetaNamespace,
17 - NS_PROJECT_TALK => 'Discutida_'.$wgMetaNamespace,
18 - NS_IMAGE => "Imatge",
19 - NS_IMAGE_TALK => "Discutida_Imatge",
20 - NS_MEDIAWIKI => "Mediaòiqui",
21 - NS_MEDIAWIKI_TALK => "Discutida_Mediaòiqui",
22 - NS_TEMPLATE => "Modèl",
23 - NS_TEMPLATE_TALK => "Discutida_Modèl",
24 - NS_HELP => 'Ajuda',
25 - NS_HELP_TALK => 'Discutida_Ajuda',
26 - NS_CATEGORY => 'Categoria',
27 - NS_CATEGORY_TALK=> 'Discutida_Categoria',
28 -) + $wgNamespaceNamesEn;
 11+if (!$wgCachedMessageArrays) {
 12+ require_once('MessagesOc.php');
 13+}
2914
30 -/* private */ $wgQuickbarSettingsOc = array(
31 - "Cap", "Esquèr", "Drech", "Flotejant a esquèr"
32 -);
 15+class LanguageOc extends LanguageUtf8 {
 16+ private $mMessagesOc, $mNamespaceNamesOc;
 17+
 18+ private $mQuickbarSettingsOc = array(
 19+ 'Cap', 'Esquèr', 'Drech', 'Flotejant a esquèr'
 20+ );
 21+
 22+ private $mSkinNamesOc = array(
 23+ 'standard' => 'Normal',
 24+ 'nostalgia' => 'Nostalgia',
 25+ 'cologneblue' => 'Còlonha Blau',
 26+ );
 27+
 28+ private $mBookstoreListOc = array(
 29+ 'Amazon.fr' => 'http://www.amazon.fr/exec/obidos/ISBN=$1'
 30+ );
3331
34 -/* private */ $wgSkinNamesOc = array(
35 - 'standard' => "Normal",
36 - 'nostalgia' => "Nostalgia",
37 - 'cologneblue' => "Còlonha Blau",
38 -) + $wgSkinNamesEn;
 32+ function LanguageOc() {
 33+ LanguageUtf8::LanguageUtf8();
3934
 35+ global $wgAllMessagesOc;
 36+ $this->mMessagesOc =& $wgAllMessagesOc;
4037
41 -/* private */ $wgBookstoreListOc = array(
42 - "Amazon.fr" => "http://www.amazon.fr/exec/obidos/ISBN=$1"
43 -);
 38+ global $wgMetaNamespace;
 39+ $this->mNamespaceNamesOc = array(
 40+ NS_SPECIAL => 'Especial',
 41+ NS_MAIN => '',
 42+ NS_TALK => 'Discutir',
 43+ NS_USER => 'Utilisator',
 44+ NS_USER_TALK => 'Discutida_Utilisator',
 45+ NS_PROJECT => $wgMetaNamespace,
 46+ NS_PROJECT_TALK => 'Discutida_'.$wgMetaNamespace,
 47+ NS_IMAGE => 'Imatge',
 48+ NS_IMAGE_TALK => 'Discutida_Imatge',
 49+ NS_MEDIAWIKI => 'Mediaòiqui',
 50+ NS_MEDIAWIKI_TALK => 'Discutida_Mediaòiqui',
 51+ NS_TEMPLATE => 'Modèl',
 52+ NS_TEMPLATE_TALK => 'Discutida_Modèl',
 53+ NS_HELP => 'Ajuda',
 54+ NS_HELP_TALK => 'Discutida_Ajuda',
 55+ NS_CATEGORY => 'Categoria',
 56+ NS_CATEGORY_TALK => 'Discutida_Categoria',
 57+ );
 58+ }
4459
45 -if (!$wgCachedMessageArrays) {
46 - require_once('MessagesOc.php');
47 -}
48 -
49 -class LanguageOc extends LanguageUtf8{
50 -
5160 function getBookstoreList () {
52 - global $wgBookstoreListOc ;
53 - return $wgBookstoreListOc ;
 61+ return $this->mBookstoreListOc;
5462 }
5563
5664 function getNamespaces() {
57 - global $wgNamespaceNamesOc;
58 - return $wgNamespaceNamesOc;
 65+ return $this->mNamespaceNamesOc + parent::getNamespaces();
5966 }
6067
6168 function getQuickbarSettings() {
62 - global $wgQuickbarSettingsOc;
63 - return $wgQuickbarSettingsOc;
 69+ return $this->mQuickbarSettingsOc;
6470 }
6571
6672 function getSkinNames() {
67 - global $wgSkinNamesOc;
68 - return $wgSkinNamesOc;
 73+ return $this->mSkinNamesOc + parent::getSkinNames();
6974 }
7075
 76+ function getMessage( $key ) {
 77+ if( isset( $this->mMessagesOc[$key] ) ) {
 78+ return $this->mMessagesOc[$key];
 79+ } else {
 80+ return parent::getMessage( $key );
 81+ }
 82+ }
 83+
 84+ function getAllMessages() {
 85+ return $this->mMessagesOc;
 86+ }
 87+
7188 function formatMonth( $month, $format ) {
7289 return $this->getMonthAbbreviation( $month );
7390 }
7491
75 - function timeBeforeDate( $format ) {
 92+ function timeBeforeDate() {
7693 return false;
7794 }
7895
7996 function timeDateSeparator( $format ) {
80 - return " à ";
 97+ return ' à ';
8198 }
8299
83 - function getMessage( $key ) {
84 - global $wgAllMessagesOc;
85 - if( isset( $wgAllMessagesOc[$key] ) ) {
86 - return $wgAllMessagesOc[$key];
87 - } else {
88 - return parent::getMessage( $key );
89 - }
90 - }
91 -
92100 }
93101
94102 ?>

Status & tagging log