Index: trunk/phase3/languages/LanguageOc.php |
— | — | @@ -1,93 +1,101 @@ |
2 | 2 | <?php |
3 | | -/** |
4 | | - * @package MediaWiki |
5 | | - * @subpackage Language |
6 | | - */ |
| 3 | +/** Occitan (Occitan) |
| 4 | + * |
| 5 | + * @package MediaWiki |
| 6 | + * @subpackage Language |
| 7 | + */ |
7 | 8 | |
8 | 9 | require_once( "LanguageUtf8.php" ); |
9 | 10 | |
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 | +} |
29 | 14 | |
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 | + ); |
33 | 31 | |
34 | | -/* private */ $wgSkinNamesOc = array( |
35 | | - 'standard' => "Normal", |
36 | | - 'nostalgia' => "Nostalgia", |
37 | | - 'cologneblue' => "Còlonha Blau", |
38 | | -) + $wgSkinNamesEn; |
| 32 | + function LanguageOc() { |
| 33 | + LanguageUtf8::LanguageUtf8(); |
39 | 34 | |
| 35 | + global $wgAllMessagesOc; |
| 36 | + $this->mMessagesOc =& $wgAllMessagesOc; |
40 | 37 | |
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 | + } |
44 | 59 | |
45 | | -if (!$wgCachedMessageArrays) { |
46 | | - require_once('MessagesOc.php'); |
47 | | -} |
48 | | - |
49 | | -class LanguageOc extends LanguageUtf8{ |
50 | | - |
51 | 60 | function getBookstoreList () { |
52 | | - global $wgBookstoreListOc ; |
53 | | - return $wgBookstoreListOc ; |
| 61 | + return $this->mBookstoreListOc; |
54 | 62 | } |
55 | 63 | |
56 | 64 | function getNamespaces() { |
57 | | - global $wgNamespaceNamesOc; |
58 | | - return $wgNamespaceNamesOc; |
| 65 | + return $this->mNamespaceNamesOc + parent::getNamespaces(); |
59 | 66 | } |
60 | 67 | |
61 | 68 | function getQuickbarSettings() { |
62 | | - global $wgQuickbarSettingsOc; |
63 | | - return $wgQuickbarSettingsOc; |
| 69 | + return $this->mQuickbarSettingsOc; |
64 | 70 | } |
65 | 71 | |
66 | 72 | function getSkinNames() { |
67 | | - global $wgSkinNamesOc; |
68 | | - return $wgSkinNamesOc; |
| 73 | + return $this->mSkinNamesOc + parent::getSkinNames(); |
69 | 74 | } |
70 | 75 | |
| 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 | + |
71 | 88 | function formatMonth( $month, $format ) { |
72 | 89 | return $this->getMonthAbbreviation( $month ); |
73 | 90 | } |
74 | 91 | |
75 | | - function timeBeforeDate( $format ) { |
| 92 | + function timeBeforeDate() { |
76 | 93 | return false; |
77 | 94 | } |
78 | 95 | |
79 | 96 | function timeDateSeparator( $format ) { |
80 | | - return " à "; |
| 97 | + return ' à '; |
81 | 98 | } |
82 | 99 | |
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 | | - |
92 | 100 | } |
93 | 101 | |
94 | 102 | ?> |