Index: trunk/extensions/Editcount/SpecialEditcount_body.php |
— | — | @@ -1,26 +1,21 @@ |
2 | 2 | <?php |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | |
5 | | -class Editcount extends SpecialPage { |
| 5 | +class Editcount extends IncludableSpecialPage { |
6 | 6 | /** |
7 | 7 | * Constructor |
8 | 8 | */ |
9 | | - function Editcount() { |
10 | | - SpecialPage::SpecialPage( 'Editcount' ); |
11 | | - $this->includable( true ); |
| 9 | + public function __construct() { |
| 10 | + parent::__construct( 'Editcount' ); |
12 | 11 | } |
13 | 12 | |
14 | 13 | /** |
15 | 14 | * main() |
16 | 15 | */ |
17 | | - function execute( $par = null ) { |
18 | | - global $wgVersion, $wgRequest, $wgOut, $wgContLang; |
| 16 | + public function execute( $par ) { |
| 17 | + global $wgRequest, $wgOut, $wgContLang; |
| 18 | + wfLoadExtensionMessages( 'Editcount' ); |
19 | 19 | |
20 | | - if ( version_compare( $wgVersion, '1.5beta4', '<' ) ) { |
21 | | - $wgOut->versionRequired( '1.5beta4' ); |
22 | | - return; |
23 | | - } |
24 | | - |
25 | 20 | $target = isset( $par ) ? $par : $wgRequest->getText( 'username' ); |
26 | 21 | |
27 | 22 | list( $username, $namespace ) = $this->extractParamaters( $target ); |
— | — | @@ -141,7 +136,6 @@ |
142 | 137 | |
143 | 138 | return $res; |
144 | 139 | } |
145 | | - |
146 | 140 | } |
147 | 141 | |
148 | 142 | class EditcountHTML extends Editcount { |
— | — | @@ -237,4 +231,3 @@ |
238 | 232 | return $ret; |
239 | 233 | } |
240 | 234 | } |
241 | | - |
Index: trunk/extensions/Editcount/SpecialEditcount.i18n.php |
— | — | @@ -1,336 +1,330 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | | - * Internationalisation file for CountEdits extension |
| 4 | + * Internationalisation file for extension CountEdits. |
6 | 5 | * |
7 | 6 | * @addtogroup Extensions |
8 | 7 | * @author Bertrand GRONDIN <bertrand.grondinr@tiscali.fr> |
9 | 8 | */ |
10 | 9 | |
11 | | -function efSpecialEditcountMessages() { |
12 | | - $messages = array( |
13 | | -// English Version by Rob Church |
14 | | -'en' => array( |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/* English |
| 13 | + * @author Rob Church |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
15 | 16 | 'editcount' => 'Edit count', |
16 | 17 | 'editcount_username' => 'User:', |
17 | 18 | 'editcount_submit' => 'Submit', |
18 | 19 | 'editcount_total' => 'Total', |
19 | | -), |
| 20 | +); |
20 | 21 | |
21 | 22 | /* Arabic (Meno25) */ |
22 | | -'ar' => array( |
| 23 | +$messages['ar'] = array( |
23 | 24 | 'editcount' => 'عداد المساهمات', |
24 | 25 | 'editcount_username' => 'مستخدم:', |
25 | 26 | 'editcount_submit' => 'تنفيذ', |
26 | 27 | 'editcount_total' => 'الإجمالي', |
27 | | -), |
| 28 | +); |
28 | 29 | |
29 | | -'bcl' => array( |
| 30 | +$messages['bcl'] = array( |
30 | 31 | 'editcount' => 'Hirahón an bilang', |
31 | 32 | 'editcount_username' => 'Parágamit:', |
32 | 33 | 'editcount_submit' => 'Isumitir', |
33 | | -), |
| 34 | +); |
34 | 35 | |
35 | 36 | /** Bulgarian (Български) |
36 | 37 | * @author Spiritia |
37 | 38 | * @author DCLXVI |
38 | 39 | */ |
39 | | -'bg' => array( |
| 40 | +$messages['bg'] = array( |
40 | 41 | 'editcount' => 'Броене на редакции', |
41 | 42 | 'editcount_username' => 'Потребител:', |
42 | 43 | 'editcount_submit' => 'Проверяване', |
43 | 44 | 'editcount_total' => 'Общо', |
44 | | -), |
| 45 | +); |
45 | 46 | |
46 | | -'bn' => array( |
| 47 | +$messages['bn'] = array( |
47 | 48 | 'editcount' => 'সম্পাদনা সংখ্যা', |
48 | 49 | 'editcount_username' => 'ব্যবহারকারী:', |
49 | 50 | 'editcount_submit' => 'পেশ করো', |
50 | 51 | 'editcount_total' => 'সর্বমোট', |
51 | | -), |
| 52 | +); |
52 | 53 | |
53 | | -'br' => array( |
| 54 | +$messages['br'] = array( |
54 | 55 | 'editcount' => 'Sammad degasadennoù', |
55 | 56 | 'editcount_username' => 'Implijer :', |
56 | 57 | 'editcount_submit' => 'Kas', |
57 | 58 | 'editcount_total' => 'Hollad', |
58 | | -), |
| 59 | +); |
59 | 60 | |
60 | | -'ca' => array( |
| 61 | +$messages['ca'] = array( |
61 | 62 | 'editcount' => 'Comptador d\'edicions', |
62 | 63 | 'editcount_username' => 'Usuari:', |
63 | | -), |
| 64 | +); |
64 | 65 | |
65 | 66 | // German by Leon Weber |
66 | | -'de' => array( |
| 67 | +$messages['de'] = array( |
67 | 68 | 'editcount' => 'Anzahl der Seitenbearbeitungen', |
68 | 69 | 'editcount_username' => 'Benutzer:', |
69 | 70 | 'editcount_submit' => 'Absenden', |
70 | 71 | 'editcount_total' => 'Gesamt', |
71 | | -), |
| 72 | +); |
72 | 73 | |
73 | | -'el' => array( |
| 74 | +$messages['el'] = array( |
74 | 75 | 'editcount_username' => 'Χρήστης:', |
75 | | -), |
| 76 | +); |
76 | 77 | |
77 | | -'eo' => array( |
| 78 | +$messages['eo'] = array( |
78 | 79 | 'editcount' => 'Redakta nombro', |
79 | 80 | 'editcount_username' => 'Uzanto:', |
80 | 81 | 'editcount_submit' => 'Ek', |
81 | 82 | 'editcount_total' => 'Tute', |
82 | | -), |
| 83 | +); |
83 | 84 | |
84 | | -'ext' => array( |
| 85 | +$messages['ext'] = array( |
85 | 86 | 'editcount_username' => 'Usuáriu:', |
86 | | -), |
| 87 | +); |
87 | 88 | |
88 | 89 | /** Finnish (Suomi) |
89 | 90 | * @author Nike |
90 | 91 | */ |
91 | | -'fi' => array( |
| 92 | +$messages['fi'] = array( |
92 | 93 | 'editcount' => 'Muokkausmäärä', |
93 | 94 | 'editcount_username' => 'Käyttäjä', |
94 | 95 | 'editcount_submit' => 'Hae', |
95 | 96 | 'editcount_total' => 'Yhteensä', |
96 | | -), |
| 97 | +); |
97 | 98 | |
98 | 99 | // French Version by Bertrand Grondin |
99 | | - 'fr' => array( |
| 100 | +$messages['fr'] = array( |
100 | 101 | 'editcount' => 'Compteur d’éditions individuel', |
101 | 102 | 'editcount_username' => 'Utilisateur :', |
102 | 103 | 'editcount_submit' => 'Soumettre', |
103 | 104 | 'editcount_total' => 'Total', |
104 | | - ), |
| 105 | +); |
105 | 106 | |
106 | | -'gl' => array( |
| 107 | +$messages['gl'] = array( |
107 | 108 | 'editcount' => 'Total de edicións', |
108 | 109 | 'editcount_username' => 'Usuario:', |
109 | 110 | 'editcount_submit' => 'Enviar', |
110 | 111 | 'editcount_total' => 'Total',#identical but defined |
111 | | -), |
| 112 | +); |
112 | 113 | |
113 | 114 | /** Croatian (Hrvatski) |
114 | 115 | * @author Dnik |
115 | 116 | */ |
116 | | -'hr' => array( |
| 117 | +$messages['hr'] = array( |
117 | 118 | 'editcount' => 'Broj uređivanja', |
118 | 119 | 'editcount_username' => 'Suradnik:', |
119 | 120 | 'editcount_submit' => 'Podnesi', |
120 | 121 | 'editcount_total' => 'Ukupno', |
121 | | -), |
| 122 | +); |
122 | 123 | |
123 | | -'hsb' => array( |
| 124 | +$messages['hsb'] = array( |
124 | 125 | 'editcount' => 'Ličba změnow', |
125 | 126 | 'editcount_username' => 'Wužiwar:', |
126 | 127 | 'editcount_submit' => 'OK', |
127 | 128 | 'editcount_total' => 'dohromady', |
128 | | -), |
| 129 | +); |
129 | 130 | |
130 | | -'hy' => array( |
| 131 | +$messages['hy'] = array( |
131 | 132 | 'editcount' => 'Խմբագրումների հաշվում', |
132 | 133 | 'editcount_username' => 'Մասնակից.', |
133 | 134 | 'editcount_submit' => 'Հաշվել', |
134 | 135 | 'editcount_total' => 'Ընդհանուր', |
135 | | -), |
| 136 | +); |
136 | 137 | |
137 | 138 | // Indonesian Version by Ivan Lanin |
138 | | -'id' => array( |
| 139 | +$messages['id'] = array( |
139 | 140 | 'editcount' => 'Jumlah suntingan', |
140 | 141 | 'editcount_username' => 'Pengguna:', |
141 | 142 | 'editcount_submit' => 'Kirim', |
142 | 143 | 'editcount_total' => 'Total', |
143 | | -), |
| 144 | +); |
144 | 145 | |
145 | 146 | // Italian Version by BrokenArrow |
146 | | -'it' => array( |
| 147 | +$messages['it'] = array( |
147 | 148 | 'editcount' => 'Conteggio delle modifiche', |
148 | 149 | 'editcount_username' => 'Utente:', |
149 | 150 | 'editcount_submit' => 'Invia', |
150 | 151 | 'editcount_total' => 'Totale', |
151 | | -), |
| 152 | +); |
152 | 153 | |
153 | | -'la' => array( |
| 154 | +$messages['la'] = array( |
154 | 155 | 'editcount_username' => 'Usor:', |
155 | | -), |
| 156 | +); |
156 | 157 | |
157 | 158 | /** Luxembourgish (Lëtzebuergesch) |
158 | 159 | * @author Robby |
159 | 160 | */ |
160 | | -'lb' => array( |
| 161 | +$messages['lb'] = array( |
161 | 162 | 'editcount' => 'Zuel vun de Säitenännerungen', |
162 | 163 | 'editcount_username' => 'Benotzer:', |
163 | 164 | 'editcount_submit' => 'Ofschécken', |
164 | 165 | 'editcount_total' => 'Total', |
165 | | -), |
| 166 | +); |
166 | 167 | |
167 | 168 | /** Lithuanian (Lietuvių) |
168 | 169 | * @author Matasg |
169 | 170 | */ |
170 | | -'lt' => array( |
| 171 | +$messages['lt'] = array( |
171 | 172 | 'editcount' => 'Naudotojo indėlis', |
172 | 173 | 'editcount_username' => 'Naudotojas:', |
173 | 174 | 'editcount_submit' => 'Patvirtinti', |
174 | 175 | 'editcount_total' => 'Viso', |
175 | | -), |
| 176 | +); |
176 | 177 | |
177 | 178 | // nld / Dutch version by Siebrand Mazeland |
178 | | -'nl' => array( |
| 179 | +$messages['nl'] = array( |
179 | 180 | 'editcount' => 'Bewerkingsteller', |
180 | 181 | 'editcount_username' => 'Gebruiker:', |
181 | 182 | 'editcount_submit' => 'OK', |
182 | 183 | 'editcount_total' => 'Totaal', |
183 | | -), |
| 184 | +); |
184 | 185 | |
185 | 186 | // Norwegian (Jon Harald Søby) |
186 | | -'no' => array( |
| 187 | +$messages['no'] = array( |
187 | 188 | 'editcount' => 'Redigeringsteller', |
188 | 189 | 'editcount_username' => 'Bruker:', |
189 | 190 | 'editcount_submit' => 'OK', |
190 | 191 | 'editcount_total' => 'Totalt', |
191 | | -), |
| 192 | +); |
192 | 193 | |
193 | 194 | // Occitan by Cedric31 |
194 | | -'oc' => array( |
| 195 | +$messages['oc'] = array( |
195 | 196 | 'editcount' => 'Comptaire d\'edicions individual', |
196 | 197 | 'editcount_username' => 'Utilizaire:', |
197 | 198 | 'editcount_submit' => 'Sometre', |
198 | | -), |
| 199 | +); |
199 | 200 | |
200 | | -'pl' => array( |
| 201 | +$messages['pl'] = array( |
201 | 202 | 'editcount' => 'Licznik edycji', |
202 | 203 | 'editcount_username' => 'Użytkownik', |
203 | 204 | 'editcount_submit' => 'Wyślij', |
204 | 205 | 'editcount_total' => 'Razem', |
205 | | -), |
| 206 | +); |
206 | 207 | |
207 | 208 | /* Piedmontese (Bèrto 'd Sèra) */ |
208 | | -'pms' => array( |
| 209 | +$messages['pms'] = array( |
209 | 210 | 'editcount' => 'Total dle modìfiche', |
210 | 211 | 'editcount_username' => 'Stranòm:', |
211 | 212 | 'editcount_submit' => 'Manda', |
212 | 213 | 'editcount_total' => 'Total', |
213 | | -), |
| 214 | +); |
214 | 215 | |
215 | 216 | // Portuguese (Lugusto) |
216 | | -'pt' => array( |
| 217 | +$messages['pt'] = array( |
217 | 218 | 'editcount' => 'Contador de edições', |
218 | 219 | 'editcount_username' => 'Usuário:', |
219 | 220 | 'editcount_submit' => 'Enviar', |
220 | 221 | 'editcount_total' => 'Total', |
221 | | -), |
| 222 | +); |
222 | 223 | |
223 | | -'rm' => array( |
| 224 | +$messages['rm'] = array( |
224 | 225 | 'editcount_username' => 'Utilisader:', |
225 | | -), |
| 226 | +); |
226 | 227 | |
227 | 228 | /** Russian (Русский) |
228 | 229 | * @author VasilievVV |
229 | 230 | */ |
230 | | -'ru' => array( |
| 231 | +$messages['ru'] = array( |
231 | 232 | 'editcount' => 'Счётчик правок', |
232 | 233 | 'editcount_username' => 'Участник:', |
233 | 234 | 'editcount_submit' => 'Посчитать', |
234 | 235 | 'editcount_total' => 'Всего', |
235 | | -), |
| 236 | +); |
236 | 237 | |
237 | 238 | /** Sassarese (Sassarese) |
238 | 239 | * @author Felis |
239 | 240 | */ |
240 | | -'sdc' => array( |
| 241 | +$messages['sdc'] = array( |
241 | 242 | 'editcount' => 'Cuntéggiu di li mudìffighi', |
242 | 243 | 'editcount_username' => 'Utenti:', |
243 | 244 | 'editcount_submit' => 'Invia', |
244 | 245 | 'editcount_total' => 'Totari', |
245 | | -), |
| 246 | +); |
246 | 247 | |
247 | 248 | // Slovak version by helix84 |
248 | | -'sk' => array( |
| 249 | +$messages['sk'] = array( |
249 | 250 | 'editcount' => 'Počet príspevkov', |
250 | 251 | 'editcount_username' => 'Používateľ:', |
251 | 252 | 'editcount_submit' => 'Odoslať', |
252 | 253 | 'editcount_total' => 'Celkom', |
253 | | -), |
| 254 | +); |
254 | 255 | |
255 | 256 | // Serbian default version by Sasa Stefanovic |
256 | | -'sr' => array( |
| 257 | +$messages['sr'] = array( |
257 | 258 | 'editcount' => 'Бројач измена', |
258 | 259 | 'editcount_username' => 'Корисник:', |
259 | 260 | 'editcount_submit' => 'Унеси', |
260 | 261 | 'editcount_total' => 'Укупно', |
261 | | -), |
| 262 | +); |
262 | 263 | |
263 | 264 | // Serbian cyrillic version by Sasa Stefanovic |
264 | | -'sr-ec' => array( |
| 265 | +$messages['sr-ec'] = array( |
265 | 266 | 'editcount' => 'Бројач измена', |
266 | 267 | 'editcount_username' => 'Корисник:', |
267 | 268 | 'editcount_submit' => 'Унеси', |
268 | 269 | 'editcount_total' => 'Укупно', |
269 | | -), |
| 270 | +); |
270 | 271 | |
271 | 272 | // Serbian latin version by Sasa Stefanovic |
272 | | -'sr-el' => array( |
| 273 | +$messages['sr-el'] = array( |
273 | 274 | 'editcount' => 'Brojač izmena', |
274 | 275 | 'editcount_username' => 'Korisnik:', |
275 | 276 | 'editcount_submit' => 'Unesi', |
276 | 277 | 'editcount_total' => 'Ukupno', |
277 | | -), |
| 278 | +); |
278 | 279 | |
279 | | -'ss' => array( |
| 280 | +$messages['ss'] = array( |
280 | 281 | 'editcount_username' => 'Umuntfu:', |
281 | | -), |
| 282 | +); |
282 | 283 | |
283 | 284 | /** Seeltersk (Seeltersk) |
284 | 285 | * @author Pyt |
285 | 286 | */ |
286 | | -'stq' => array( |
| 287 | +$messages['stq'] = array( |
287 | 288 | 'editcount' => 'Antaal fon do Siedenbeoarbaidengen', |
288 | 289 | 'editcount_username' => 'Benutser:', |
289 | 290 | 'editcount_submit' => 'Ouseende', |
290 | 291 | 'editcount_total' => 'Mädnunner', |
291 | | -), |
| 292 | +); |
292 | 293 | |
293 | 294 | /** Volapük (Volapük) |
294 | 295 | * @author Malafaya |
295 | 296 | */ |
296 | | -'vo' => array( |
| 297 | +$messages['vo'] = array( |
297 | 298 | 'editcount_username' => 'Geban:', |
298 | 299 | 'editcount_total' => 'Valod', |
299 | | -), |
| 300 | +); |
300 | 301 | |
301 | 302 | // Cantonese Version by Shinjiman |
302 | | -'yue' => array( |
| 303 | +$messages['yue'] = array( |
303 | 304 | 'editcount' => '編輯次數', |
304 | 305 | 'editcount_username' => '用戶:', |
305 | 306 | 'editcount_submit' => '遞交', |
306 | 307 | 'editcount_total' => '總數', |
307 | | -), |
| 308 | +); |
308 | 309 | |
309 | 310 | // Chinese (Simplified) Version by Shinjiman |
310 | | -'zh-hans' => array( |
| 311 | +$messages['zh-hans'] = array( |
311 | 312 | 'editcount' => '编辑次数', |
312 | 313 | 'editcount_username' => '用户:', |
313 | 314 | 'editcount_submit' => '提交', |
314 | 315 | 'editcount_total' => '总数', |
315 | | -), |
| 316 | +); |
316 | 317 | |
317 | 318 | // Chinese (Traditional) Version by Shinjiman |
318 | | -'zh-hant' => array( |
| 319 | +$messages['zh-hant'] = array( |
319 | 320 | 'editcount' => '編輯次數', |
320 | 321 | 'editcount_username' => '用戶:', |
321 | 322 | 'editcount_submit' => '遞交', |
322 | 323 | 'editcount_total' => '總數', |
323 | | -), |
324 | | - |
325 | 324 | ); |
326 | 325 | |
327 | | - /* Chinese defaults, fallback to zh-hans or zh-hant */ |
328 | | - $messages['zh'] = $messages['zh-hans']; |
329 | | - $messages['zh-cn'] = $messages['zh-hans']; |
330 | | - $messages['zh-hk'] = $messages['zh-hant']; |
331 | | - $messages['zh-cn'] = $messages['zh-hans']; |
332 | | - $messages['zh-tw'] = $messages['zh-hant']; |
333 | | - /* Cantonese default, fallback to zh-hans or zh-hant */ |
334 | | - $messages['zh-yue'] = $messages['yue']; |
335 | | - |
336 | | - return $messages; |
337 | | -} |
| 326 | +$messages['zh'] = $messages['zh-hans']; |
| 327 | +$messages['zh-cn'] = $messages['zh-hans']; |
| 328 | +$messages['zh-hk'] = $messages['zh-hant']; |
| 329 | +$messages['zh-cn'] = $messages['zh-hans']; |
| 330 | +$messages['zh-tw'] = $messages['zh-hant']; |
| 331 | +$messages['zh-yue'] = $messages['yue']; |
Index: trunk/extensions/Editcount/SpecialEditcount.php |
— | — | @@ -13,25 +13,15 @@ |
14 | 14 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
15 | 15 | */ |
16 | 16 | |
17 | | -$wgExtensionFunctions[] = 'wfSpecialEditcount'; |
18 | 17 | $wgExtensionCredits['specialpage'][] = array( |
19 | 18 | 'name' => 'Editcount', |
| 19 | + 'version' => '2008-01-11', |
20 | 20 | 'author' => 'Ævar Arnfjörð Bjarmason', |
21 | 21 | 'description' => 'Displays [[Special:Editcount|edit count]] of a user', |
| 22 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Editcount', |
22 | 23 | ); |
23 | 24 | |
24 | | -function wfSpecialEditcount() { |
25 | | - global $IP, $wgMessageCache; |
26 | | - |
27 | | - require_once ('SpecialEditcount.i18n.php' ); |
28 | | - foreach( efSpecialEditcountMessages() as $lang => $messages ) |
29 | | - $wgMessageCache->addMessages( $messages, $lang ); |
30 | | - |
31 | | - $GLOBALS['wgAutoloadClasses']['Editcount'] = dirname( __FILE__ ) . |
32 | | - '/SpecialEditcount_body.php'; |
33 | | - |
34 | | - $GLOBALS['wgSpecialPages']['editcount'] = array( /*class*/ 'Editcount', |
35 | | - /*name*/ 'Editcount', /* permission */'', /*listed*/ true, |
36 | | - /*function*/ false, /*file*/ false ); |
37 | | - |
38 | | -} |
| 25 | +$dir = dirname(__FILE__) . '/'; |
| 26 | +$wgExtensionMessagesFiles['Editcount'] = $dir .'SpecialEditcount.i18n.php'; |
| 27 | +$wgAutoloadClasses['Editcount'] = $dir . 'SpecialEditcount_body.php'; |
| 28 | +$wgSpecialPages['Editcount'] = 'Editcount'; |
Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -1025,17 +1025,11 @@ |
1026 | 1026 | } |
1027 | 1027 | |
1028 | 1028 | class EditcountMessageGroup extends ExtensionMessageGroup { |
1029 | | - protected $fileExporter = null; |
1030 | 1029 | protected $label = 'Edit Count'; |
1031 | 1030 | protected $id = 'ext-editcount'; |
1032 | 1031 | |
1033 | | - protected $functionName = 'efSpecialEditcountMessages'; |
| 1032 | + protected $arrName = 'messages'; |
1034 | 1033 | protected $messageFile = 'Editcount/SpecialEditcount.i18n.php'; |
1035 | | - |
1036 | | - protected $exportStart = '\'$CODE\' => array('; |
1037 | | - protected $exportPrefix= ''; |
1038 | | - protected $exportLineP = "\t"; |
1039 | | - protected $exportEnd = '),'; |
1040 | 1034 | } |
1041 | 1035 | |
1042 | 1036 | class EvalMessageGroup extends ExtensionMessageGroup { |