(bug 2871) Links to talk pages in watchlist editing view
[lhc/web/wiklou.git] / languages / LanguageWa.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Language
5 */
6
7 require_once( "LanguageUtf8.php" );
8
9 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
10 # k' i gn a.
11
12 /* private */ $wgNamespaceNamesWa = array(
13 NS_MEDIA => "Media", /* Media */
14 NS_SPECIAL => "Sipeciås", /* Special */
15 NS_MAIN => "",
16 NS_TALK => "Copene", /* Talk */
17 NS_USER => "Uzeu", /* User */
18 NS_USER_TALK => "Uzeu_copene", /* User_talk */
19 NS_PROJECT => $wgMetaNamespace,
20 NS_PROJECT_TALK => $wgMetaNamespace . "_copene",
21 NS_IMAGE => "Imådje", /* Image */
22 NS_IMAGE_TALK => "Imådje_copene", /* Image_talk */
23 NS_MEDIAWIKI => "MediaWiki", /* MediaWiki */
24 NS_MEDIAWIKI_TALK => "MediaWiki_copene", /* MediaWiki_talk */
25 NS_TEMPLATE => "Modele",
26 NS_TEMPLATE_TALK => "Modele_copene",
27 NS_HELP => "Aidance",
28 NS_HELP_TALK => "Aidance_copene",
29 NS_CATEGORY => "Categoreye",
30 NS_CATEGORY_TALK => "Categoreye_copene",
31 ) + $wgNamespaceNamesEn;
32
33 /* private */ $wgQuickbarSettingsWa = array(
34 "Nole bår", "Aclawêye a hintche", "Aclawêye a droete", "Flotante a hintche", "Flotante a droete"
35 );
36
37 /* private */ $wgDateFormatsWa = array( /* cwè fé chal ??? */
38 # "Nole preferince",
39 );
40
41 if (!$wgCachedMessageArrays) {
42 require_once('MessagesWa.php');
43 }
44
45
46 #--------------------------------------------------------------------------
47 # Internationalisation code
48 #--------------------------------------------------------------------------
49
50 class LanguageWa extends LanguageUtf8 {
51
52 function getNamespaces() {
53 global $wgNamespaceNamesWa;
54 return $wgNamespaceNamesWa;
55 }
56
57 function getQuickbarSettings() {
58 global $wgQuickbarSettingsWa;
59 return $wgQuickbarSettingsWa;
60 }
61
62 function getDateFormats() {
63 global $wgDateFormatsWa;
64 return $wgDateFormatsWa;
65 }
66
67
68 ###
69 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month,
70 ### "<day> di <monthname>" for months starting by a consoun, and
71 ### "<day> d' <monthname>" for months starting with a vowel
72 ###
73 function date( $ts, $adj = false ) {
74 global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
75
76 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
77
78 $m = substr( $ts, 4, 2 );
79 $n = substr( $ts, 6, 2 );
80
81 if ($n == 1) {
82 $d = "1î d' " . $this->getMonthName( $m ) .
83 " " . substr( $ts, 0, 4 );
84 } else if ($n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23) {
85 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) .
86 " " . substr( $ts, 0, 4 );
87 } else if ($m == 4 || $m == 8 || $m == 10) {
88 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) .
89 " " . substr( $ts, 0, 4 );
90 } else {
91 $d = (0 + $n) . " di " . $this->getMonthName( $m ) .
92 " " . substr( $ts, 0, 4 );
93 }
94
95 return $d;
96 }
97
98 function time( $ts, $adj = false ) {
99 if ( $adj ) { $ts = $this->userAdjust( $ts ); }
100
101 $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
102 return $t;
103 }
104
105 function timeanddate( $ts, $adj = false ) {
106 #return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
107 return $this->date( $ts, $adj ) . " a " . $this->time( $ts, $adj );
108 }
109
110 function getMessage( $key ) {
111 global $wgAllMessagesWa;
112
113 if(array_key_exists($key, $wgAllMessagesWa))
114 return $wgAllMessagesWa[$key];
115 else
116 return parent::getMessage($key);
117 }
118
119 function getAllMessages() {
120 global $wgAllMessagesWa;
121 return $wgAllMessagesWa;
122 }
123
124 }
125
126 ?>