r29576 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29575‎ | r29576 | r29577 >
Date:07:47, 11 January 2008
Author:siebrand
Status:old
Tags:
Comment:
* use wfLoadExtensionMessages for CountEdits
* Delay message loading
* add version and url in extension credits
* update Translate extension
Modified paths:
  • /trunk/extensions/CountEdits/CountEdits.i18n.php (modified) (history)
  • /trunk/extensions/CountEdits/CountEdits.page.php (modified) (history)
  • /trunk/extensions/CountEdits/CountEdits.php (modified) (history)
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CountEdits/CountEdits.page.php
@@ -1,4 +1,6 @@
22 <?php
 3+if ( ! defined( 'MEDIAWIKI' ) )
 4+ die();
35
46 /**
57 * Special page class for the CountEdits extension
@@ -6,17 +8,18 @@
79 * @addtogroup Extensions
810 * @author Rob Church <robchur@gmail.com>
911 */
10 -
 12+
1113 class SpecialCountEdits extends SpecialPage {
12 -
 14+
1315 var $target;
1416
15 - function __construct() {
16 - parent::__construct( 'CountEdits' );
 17+ public function __construct() {
 18+ SpecialPage::SpecialPage( 'CountEdits' );
1719 }
18 -
19 - function execute( $params ) {
 20+
 21+ public function execute( $params ) {
2022 global $wgOut, $wgUser;
 23+ wfLoadExtensionMessages( 'CountEdits' );
2124 $skin = $wgUser->getSkin();
2225 $this->setHeaders();
2326 $this->loadRequest( $params );
@@ -36,7 +39,7 @@
3740 $this->showTopTen( $wgOut );
3841 return true;
3942 }
40 -
 43+
4144 function loadRequest( $params ) {
4245 global $wgRequest;
4346 if( $params ) {
@@ -46,7 +49,7 @@
4750 $this->target = $target ? $target : '';
4851 }
4952 }
50 -
 53+
5154 function makeForm() {
5255 $self = $this->getTitle();
5356 $form = '<form method="post" action="'. $self->getLocalUrl() . '">';
@@ -56,7 +59,7 @@
5760 $form .= '</p></form>';
5861 return $form;
5962 }
60 -
 63+
6164 function countEditsReal( $id, $text = false ) {
6265 global $wgVersion;
6366 $dbr =& wfGetDB( DB_SLAVE );
@@ -72,7 +75,7 @@
7376 return $dbr->selectField( 'revision', 'COUNT(rev_id)', $conds, 'CountEdits::countEditsReal' );
7477 }
7578 }
76 -
 79+
7780 function showResults( $count, $id = 0 ) {
7881 global $wgOut, $wgUser, $wgLang;
7982 $skin =& $wgUser->getSkin();
@@ -81,13 +84,13 @@
8285 $wgOut->addHtml( '<p>' . wfMsgHtml( 'countedits-resulttext', $links, $count ) . '</p>' );
8386 $wgOut->addWikiText( wfMsg( 'countedits-warning' ) );
8487 }
85 -
 88+
8689 function showTopTen( &$out ) {
8790 global $wgCountEditsMostActive;
8891 if( $wgCountEditsMostActive )
8992 $out->addHtml( $this->getMostActive() );
9093 }
91 -
 94+
9295 function getMostActive() {
9396 global $wgUser, $wgLang;
9497 $dbr =& wfGetDB( DB_SLAVE );
@@ -117,7 +120,4 @@
118121 return '';
119122 }
120123 }
121 -
122124 }
123 -
124 -
Index: trunk/extensions/CountEdits/CountEdits.i18n.php
@@ -1,17 +1,17 @@
22 <?php
3 -
43 /**
5 - * Internationalisation file for CountEdits extension
 4+ * Internationalisation file for extension CountEdits.
65 *
76 * @addtogroup Extensions
87 * @author Rob Church <robchur@gmail.com>
98 */
109
11 -function efCountEditsMessages( $single = false ) {
12 - $messages = array(
 10+$messages = array();
1311
14 -/* English (Rob Church) */
15 -'en' => array(
 12+/* English
 13+ * @author Rob Church
 14+ */
 15+$messages['en'] = array(
1616 'countedits' => 'Count edits',
1717 'countedits-warning' => "'''Warning:''' Do not judge a book by its cover. Do not judge a contributor by their edit count.",
1818 'countedits-username' => 'Username:',
@@ -21,10 +21,10 @@
2222 'countedits-resulttext' => '$1 has made $2 edits',
2323 'countedits-mostactive' => 'Most active contributors',
2424 'countedits-nocontribs' => 'There have been no contributions to this wiki.',
25 -),
 25+);
2626
2727 /* Arabic (Meno25) */
28 -'ar' => array(
 28+$messages['ar'] = array(
2929 'countedits' => 'عد التعديلات',
3030 'countedits-warning' => '\'\'\'تحذير:\'\'\' لا تحكم على كتاب من غلافه. لا تحكم على مساهم من خلال عدد مساهماته.',
3131 'countedits-username' => 'اسم المستخدم:',
@@ -34,14 +34,14 @@
3535 'countedits-resulttext' => '$1 لديه $2 مساهمة',
3636 'countedits-mostactive' => 'أكثر المساهمين نشاطا',
3737 'countedits-nocontribs' => 'لا يوجد مساهمون في هذه الويكي.',
38 -),
 38+);
3939
40 -'bcl' => array(
 40+$messages['bcl'] = array(
4141 'countedits-resultheader' => 'Mga resulta kan $1',
4242 'countedits-mostactive' => 'Pinaka mahigos na mga kontributor',
43 -),
 43+);
4444
45 -'bg' => array(
 45+$messages['bg'] = array(
4646 'countedits' => 'Броене на редакции',
4747 'countedits-warning' => '\'\'\'Внимание:\'\'\' Не съдете за книгата по нейната корица. Не съдете за редактора по броя на редакциите му.',
4848 'countedits-username' => 'Потребителско име:',
@@ -51,9 +51,9 @@
5252 'countedits-resulttext' => '$1 е направил(а) $2 редакции',
5353 'countedits-mostactive' => 'Най-активни редактори',
5454 'countedits-nocontribs' => 'Няма приноси към това уики.',
55 -),
 55+);
5656
57 -'br' => array(
 57+$messages['br'] = array(
5858 'countedits' => 'Degasadennoù ar gont',
5959 'countedits-warning' => '\'\'\'Diwallit :\'\'\' Ne varner ket ul levr diouzh ar golo anezhañ. Arabat barnañ un implijer diouzh an niver a zegasadennoù graet gantañ.',
6060 'countedits-username' => 'Anv implijer :',
@@ -63,9 +63,9 @@
6464 'countedits-resulttext' => '$2 degasadenn zo bet graet gant $1',
6565 'countedits-mostactive' => 'Implijerien oberiantañ',
6666 'countedits-nocontribs' => 'Degasadenn ebet evit ar wiki-mañ.',
67 -),
 67+);
6868
69 -'ca' => array(
 69+$messages['ca'] = array(
7070 'countedits' => 'Nombre d\'edicions',
7171 'countedits-warning' => '\'\'\'Avís:\'\'\' No jutgeu un llibre per la seua coberta, ni tampoc a un col·laborador pel seu nombre d\'edicions.',
7272 'countedits-username' => 'Nom d\'usuari:',
@@ -75,10 +75,10 @@
7676 'countedits-resulttext' => '$1 ha fet $2 edicions',
7777 'countedits-mostactive' => 'Els col·laboradors més actius',
7878 'countedits-nocontribs' => 'No hi ha hagut cap col·laboració en aquest wiki.',
79 -),
 79+);
8080
8181 /* German (Raymond) */
82 -'de' => array(
 82+$messages['de'] = array(
8383 'countedits' => 'Beitragszähler',
8484 'countedits-warning' => 'Hinweis: Sie beurteilen ein Buch nicht nur nach seinem Umschlag, beurteilen Sie einen Autor daher auch nicht nur nach seinem Beitragszähler.',
8585 'countedits-username' => 'Benutzername:',
@@ -88,14 +88,14 @@
8989 'countedits-resulttext' => '$1 hat $2 Bearbeitungen',
9090 'countedits-mostactive' => 'Die aktivsten Benutzer',
9191 'countedits-nocontribs' => 'In {{ns:project}} sind keine Bearbeitungen vorhanden.',
92 -),
 92+);
9393
94 -'el' => array(
 94+$messages['el'] = array(
9595 'countedits-username' => 'Όνομα χρήστη:',
9696 'countedits-ok' => 'ΟΚ',
97 -),
 97+);
9898
99 -'eo' => array(
 99+$messages['eo'] = array(
100100 'countedits' => 'Nombro de redaktoj',
101101 'countedits-warning' => '\'\'\'Averto:\'\'\' Ne juĝu libron laŭ ĝia kovrilo. Ne juĝu kontribuanton laŭ lia redaktaro.',
102102 'countedits-username' => 'Uzantonomo:',
@@ -105,15 +105,15 @@
106106 'countedits-resulttext' => '$1 faris $2 redaktojn',
107107 'countedits-mostactive' => 'Plej aktivaj kontribuantoj',
108108 'countedits-nocontribs' => 'Ne estas iuj kontribuaĵoj por ĉi tiu vikio.',
109 -),
 109+);
110110
111 -'ext' => array(
 111+$messages['ext'] = array(
112112 'countedits-username' => 'Nombri d´usuáriu:',
113113 'countedits-resulttext' => '$1 á hechu $2 eicionis',
114 -),
 114+);
115115
116116 /* Finnish (Niklas Laxström) */
117 -'fi' => array(
 117+$messages['fi'] = array(
118118 'countedits' => 'Muokkausmäärälaskuri',
119119 'countedits-warning' => 'Älä arvioi kirjaa kannen perusteella. Älä arvioi käyttäjää muokkausten lukumäärän perusteella.',
120120 'countedits-username' => 'Käyttäjä',
@@ -123,10 +123,10 @@
124124 'countedits-resulttext' => '$1 on tehnyt $2 muokkausta.',
125125 'countedits-mostactive' => 'Aktiivisimmat käyttäjät',
126126 'countedits-nocontribs' => 'Tätä wikiä ei ole muokattu.',
127 -),
 127+);
128128
129129 /* French (Bertrand Grondin) */
130 -'fr' => array(
 130+$messages['fr'] = array(
131131 'countedits' => 'Compteur d’éditions',
132132 'countedits-warning' => 'Avertissement : ne jugez pas un livre par sa couverture. Ne jugez pas non plus un utilisateur en fonction du nombre de ses contributions.',
133133 'countedits-username' => 'Utilisateur',
@@ -136,9 +136,9 @@
137137 'countedits-resulttext' => '$1 a fait {{PLURAL:$2|$2 édition|$2 éditions}}',
138138 'countedits-mostactive' => 'Contributeurs les plus actifs',
139139 'countedits-nocontribs' => 'Aucune contribution sur ce wiki.',
140 -),
 140+);
141141
142 -'gl' => array(
 142+$messages['gl'] = array(
143143 'countedits' => 'Contar edicións',
144144 'countedits-warning' => '\'\'\'Advertencia:\'\'\' As aparencias enganan. Non xulgue a un colaborador polo seu número de edicións.',
145145 'countedits-username' => 'Nome de usuario:',
@@ -148,9 +148,9 @@
149149 'countedits-resulttext' => '$1 ten feitas $2 edicións',
150150 'countedits-mostactive' => 'Colaboradores máis activos',
151151 'countedits-nocontribs' => 'Non houbo ningunha colaboración neste wiki.',
152 -),
 152+);
153153
154 -'hr' => array(
 154+$messages['hr'] = array(
155155 'countedits' => 'Broj uređivanja',
156156 'countedits-warning' => '\'\'\'Upozorenje:\'\'\' Ne sudite knjigu po koricama. Ne sudite suradnike po njihovom broju uređivanja.',
157157 'countedits-username' => 'Suradničko ime:',
@@ -160,9 +160,9 @@
161161 'countedits-resulttext' => 'Broj uređivanja suradnika $1: $2',
162162 'countedits-mostactive' => 'Najaktivniji suradnici',
163163 'countedits-nocontribs' => 'Nema suradnika na ovom wikiju.',
164 -),
 164+);
165165
166 -'hsb' => array(
 166+$messages['hsb'] = array(
167167 'countedits' => 'Ličak přinoškow',
168168 'countedits-warning' => '\'\'\'Kedźbu\'\'\': Njeposudź knihu wobalki dla, njeposudź wužiwarja ličby jeho přinoškow dla!',
169169 'countedits-username' => 'Wužiwarske mjeno:',
@@ -172,9 +172,9 @@
173173 'countedits-resulttext' => '$1 je $2 wobdźěłanjow sčinił.',
174174 'countedits-mostactive' => 'Najaktiwniši přinošowarjo',
175175 'countedits-nocontribs' => 'Njejsu žane změny w tutym wikiju.',
176 -),
 176+);
177177
178 -'hy' => array(
 178+$messages['hy'] = array(
179179 'countedits' => 'Հաշվել խմբագրումները',
180180 'countedits-warning' => '\'\'\'Զգուշացում.\'\'\' մի դատեք գրքի մասին կազմով և մասնակցի մասին՝ խմբագրումների քանակով։',
181181 'countedits-username' => 'Մասնակից.',
@@ -184,10 +184,10 @@
185185 'countedits-resulttext' => '$1 մասնակիցը կատարել է $2 խմբագրում',
186186 'countedits-mostactive' => 'Ամենաակտիվ մասնակիցները',
187187 'countedits-nocontribs' => 'Այս վիքիում ոչ մի խմբագրում չի եղել։',
188 -),
 188+);
189189
190190 /* Indonesian (Ivan Lanin) */
191 -'id' => array(
 191+$messages['id'] = array(
192192 'countedits' => 'Jumlah suntingan',
193193 'countedits-warning' => 'Peringatan: Jangan menilai suatu buku dari sampulnya. Jangan menilai seorang kontributor berdasarkan jumlah suntingannya.',
194194 'countedits-username' => 'Nama pengguna:',
@@ -197,10 +197,10 @@
198198 'countedits-resulttext' => '$1 telah membuat $2 suntingan',
199199 'countedits-mostactive' => 'Kontributor paling aktif',
200200 'countedits-nocontribs' => 'Belum ada kontribusi untuk wiki ini.',
201 -),
 201+);
202202
203203 /* Italian (BrokenArrow) */
204 -'it' => array(
 204+$messages['it'] = array(
205205 'countedits' => 'Conteggio delle modifiche',
206206 'countedits-warning' => "'''Attenzione:''' Un libro non si giudica dalla copertina. Un utente non si giudica dal numero delle modifiche.",
207207 'countedits-username' => 'Nome utente:',
@@ -210,10 +210,10 @@
211211 'countedits-resulttext' => '$1 ha effettuato $2 modifiche',
212212 'countedits-mostactive' => 'Autori con il maggior numero di contributi',
213213 'countedits-nocontribs' => 'Il sito non ha subito alcuna modifica.',
214 -),
 214+);
215215
216216 /* Kazakh Cyrillic (AlefZet) */
217 -'kk-cyrl' => array(
 217+$messages['kk-cyrl'] = array(
218218 'countedits' => 'Түзету санау',
219219 'countedits-warning' => "'''Назар салыңыз:''' Кітапті мұқабасынан жорамалдамаңыз. Үлескерді түзету санынан жорамалдамаңыз.",
220220 'countedits-username' => 'Қатысуша аты:',
@@ -223,10 +223,10 @@
224224 'countedits-resulttext' => '$1 деген $2 түзету істеген',
225225 'countedits-mostactive' => 'Ең белсенді үлескерлер',
226226 'countedits-nocontribs' => 'Бұл уикиде еш үлес болған жоқ.',
227 -),
 227+);
228228
229229 /* Kazakh Latin (AlefZet) */
230 -'kk-latn' => array(
 230+$messages['kk-latn'] = array(
231231 'countedits' => 'Tüzetw sanaw',
232232 'countedits-warning' => "'''Nazar salıñız:''' Kitapti muqabasınan joramaldamañız. Üleskerdi tüzetw sanınan joramaldamañız.",
233233 'countedits-username' => 'Qatıswşa atı:',
@@ -236,10 +236,10 @@
237237 'countedits-resulttext' => '$1 degen $2 tüzetw istegen',
238238 'countedits-mostactive' => 'Eñ belsendi üleskerler',
239239 'countedits-nocontribs' => 'Bul wïkïde eş üles bolğan joq.',
240 -),
 240+);
241241
242242 /* Kazakh Arabic (AlefZet) */
243 -'kk-arab' => array(
 243+$messages['kk-arab'] = array(
244244 'countedits' => 'تٷزەتۋ ساناۋ',
245245 'countedits-warning' => "'''نازار سالىڭىز:''' كٸتاپتٸ مۇقاباسىنان جورامالداماڭىز. ٷلەسكەردٸ تٷزەتۋ سانىنان جورامالداماڭىز.",
246246 'countedits-username' => 'قاتىسۋشا اتى:',
@@ -249,30 +249,30 @@
250250 'countedits-resulttext' => '$1 دەگەن $2 تٷزەتۋ ٸستەگەن',
251251 'countedits-mostactive' => 'ەڭ بەلسەندٸ ٷلەسكەرلەر',
252252 'countedits-nocontribs' => 'بۇل ۋيكيدە ەش ٷلەس بولعان جوق.',
253 -),
 253+);
254254
255 -'ku-latn' => array(
 255+$messages['ku-latn'] = array(
256256 'countedits' => 'Guherandinan bihesbîne',
257257 'countedits-username' => 'Navî bikarhêner:',
258258 'countedits-ok' => 'OK',#identical but defined
259259 'countedits-nosuchuser' => 'Li vê derê ne bikarhênerek bi navê $1 heye.',
260260 'countedits-resulttext' => '$1 $2 guherandinan çêkirîye',
261261 'countedits-nocontribs' => 'Di vê wîkîyê da guherandin tune ne.',
262 -),
 262+);
263263
264 -'la' => array(
 264+$messages['la'] = array(
265265 'countedits-username' => 'Nomen usoris:',
266 -),
 266+);
267267
268268 /** Luxembourgish (Lëtzebuergesch)
269269 * @author Robby
270270 */
271 -'lb' => array(
 271+$messages['lb'] = array(
272272 'countedits-username' => 'Benotzernumm:',
273273 'countedits-nosuchuser' => 'Et gëtt kee Benotzer mam Numm $1.',
274 -),
 274+);
275275
276 -'nds' => array(
 276+$messages['nds'] = array(
277277 'countedits' => 'Tellen, wo faken de Bruker Sieden ännert hett',
278278 'countedits-warning' => '\'\'\'Wohrschau:\'\'\' Schasst de Deern nich na ehr Schört reken. Wo faken en Bruker Sieden ännert hett, seggt nix över sien Arbeit ut.',
279279 'countedits-username' => 'Brukernaam:',
@@ -282,10 +282,10 @@
283283 'countedits-resulttext' => '$1 hett $2 Maal wat ännert.',
284284 'countedits-mostactive' => 'Brukers, de opmehrst Maal wat ännert hebbt',
285285 'countedits-nocontribs' => 'Kene Bidrääg op dit Wiki.',
286 -),
 286+);
287287
288288 /* nld / Dutch (Siebrand Mazeland) */
289 -'nl' => array(
 289+$messages['nl'] = array(
290290 'countedits' => 'Bewerkingen tellen',
291291 'countedits-warning' => '\'\'\'Waarschuwing:\'\'\' Beoordeel het boek niet op de buitenkant. Beoordeel een redacteur niet alleen op het aantal bijdragen.',
292292 'countedits-username' => 'Gebruiker:',
@@ -295,10 +295,10 @@
296296 'countedits-resulttext' => '$1 heeft $2 bewerkingen gemaakt',
297297 'countedits-mostactive' => 'Meest actieve redacteuren',
298298 'countedits-nocontribs' => 'Er zijn geen bewerkingen op deze wiki.',
299 -),
 299+);
300300
301301 /* Norwegian (Jon Harald Søby) */
302 -'no' => array(
 302+$messages['no'] = array(
303303 'countedits' => 'Tell redigeringer',
304304 'countedits-warning' => '\'\'\'Advarsel:\'\'\' Ikke sku hunden på hårene. Ikke døm en bidragsyter på antall redigeringer.',
305305 'countedits-username' => 'Brukernavn:',
@@ -308,9 +308,9 @@
309309 'countedits-resulttext' => '$1 har gjort $2 redigeringer',
310310 'countedits-mostactive' => 'Mest aktive bidragsytere',
311311 'countedits-nocontribs' => 'Det har ikke vært noen redigeringer på denne wikien.',
312 -),
 312+);
313313
314 -'oc' => array(
 314+$messages['oc'] = array(
315315 'countedits' => 'Comptaire d’edicions',
316316 'countedits-warning' => '\'\'\'Avertiment\'\'\' : jutjetz pas un libre per sa cobertura. Jutjetz pas tanpauc un utilizaire en foncion del nombre de sas contribucions.',
317317 'countedits-username' => 'Nom d\'utilizaire:',
@@ -320,9 +320,9 @@
321321 'countedits-resulttext' => '$1 a fach $2 modificacions',
322322 'countedits-mostactive' => 'Contributors mai actius',
323323 'countedits-nocontribs' => 'Cap de contribucion sus aqueste wiki.',
324 -),
 324+);
325325
326 -'pl' => array(
 326+$messages['pl'] = array(
327327 'countedits' => 'Liczba edycji',
328328 'countedits-warning' => '\'\'Ostrzeżenie:\'\'\' Nie oceniaj książki po jej okładce. Nie oceniaj użytkownika po jego liczbie edycji.',
329329 'countedits-username' => 'Nazwa użytkownika:',
@@ -332,10 +332,10 @@
333333 'countedits-resulttext' => '$1 wykonał (-a) $2 edycji',
334334 'countedits-mostactive' => 'Najbardziej aktywni użytkownicy',
335335 'countedits-nocontribs' => 'Nie wykonano edycji na tej wiki',
336 -),
 336+);
337337
338338 /* Piedmontese (Bèrto 'd Sèra) */
339 -'pms' => array(
 339+$messages['pms'] = array(
340340 'countedits' => 'Total dle modìfiche',
341341 'countedits-warning' => '\'\'\'Avis:\'\'\' Mai giudiché un lìber da soa coertin-a. Ch\'a giùdica pa n\'utent da vàire modìfiche ch\'a l\'ha fait.',
342342 'countedits-username' => 'Stranòm:',
@@ -345,10 +345,10 @@
346346 'countedits-resulttext' => '$1 a l\'ha fait $2 modìfiche',
347347 'countedits-mostactive' => 'Contributor pì ativ',
348348 'countedits-nocontribs' => 'A-i é pa anco\' sta-ie gnun-a modìfica a sta wiki-sì.',
349 -),
 349+);
350350
351351 /* Portuguese (Lugusto) */
352 -'pt' => array(
 352+$messages['pt'] = array(
353353 'countedits' => 'Contador de edições',
354354 'countedits-warning' => "'''Atenção:''' Não julgue um livro pela sua capa. Não julgue um contribuidor pela contagem de suas edições.",
355355 'countedits-username' => 'Utilizador:',
@@ -358,10 +358,10 @@
359359 'countedits-resulttext' => '$1 fez $2 edições',
360360 'countedits-mostactive' => 'Contribuidores mais activos',
361361 'countedits-nocontribs' => 'Não possui contribuições neste wiki.',
362 -),
 362+);
363363
364364 /* Romanian (KlaudiuMihăilă) */
365 -'ro' => array(
 365+$messages['ro'] = array(
366366 'countedits' => 'Număr de modificări',
367367 'countedits-warning' => '\'\'\'Atenţie:\'\'\' Nu judeca o carte după copertă. Nu judeca un contribuitor după numărul de modificări.',
368368 'countedits-username' => 'Nume de utilizator:',
@@ -370,9 +370,9 @@
371371 'countedits-resulttext' => '$1 a efectuat {{PLURAL:$2|o modificare|$2 modificări}}',
372372 'countedits-mostactive' => 'Contribuitorii cei mai activi',
373373 'countedits-nocontribs' => 'Nu există contribuitori la acest wiki.',
374 -),
 374+);
375375
376 -'ru' => array(
 376+$messages['ru'] = array(
377377 'countedits' => 'Подсчитать правки',
378378 'countedits-warning' => "'''Внимание:''' не судите о книге по её обложке. Не судите об участнике по количеству его правок.",
379379 'countedits-username' => 'Участник:',
@@ -382,10 +382,10 @@
383383 'countedits-resulttext' => '$1 сделал $2 правок',
384384 'countedits-mostactive' => 'Наиболее активные участники',
385385 'countedits-nocontribs' => 'Нет правок в этой вики.',
386 -),
 386+);
387387
388388
389 -'sah' => array(
 389+$messages['sah'] = array(
390390 'countedits' => 'Хас көннөрүүлээҕэ',
391391 'countedits-warning' => '\'\'\'Болҕой:\'\'\' Кинигэни таһыттан сыаналаабаттарын курдук, кыттааччыны правката элбэҕинэн сыаналаабаттар.',
392392 'countedits-username' => 'Аата:',
@@ -394,10 +394,10 @@
395395 'countedits-resulttext' => '$1 $2 көннөрүүнү оҥорбут',
396396 'countedits-mostactive' => 'Саамай элбэх көннөрүүнү оҥорбут кыттааччылар',
397397 'countedits-nocontribs' => 'Бу биикигэ көннөрүү оҥоһуллубатах.',
398 -),
 398+);
399399
400400 /* Slovak (helix84) */
401 -'sk' => array(
 401+$messages['sk'] = array(
402402 'countedits' => 'Počet príspevkov',
403403 'countedits-warning' => "'''Varovanie:''' Nesúďte knihu podľa obalu. Nesúďte prispievateľa podľa počtu príspevkov.",
404404 'countedits-username' => 'Používateľské meno:',
@@ -407,10 +407,10 @@
408408 'countedits-resulttext' => '$1 urobil $2 úprav',
409409 'countedits-mostactive' => 'Najaktívnejší prispievatelia',
410410 'countedits-nocontribs' => 'Táto wiki neobsahuje zatiaľ žiadne príspevky.',
411 -),
 411+);
412412
413413 /* Serbian default (Sasa Stefanovic) */
414 -'sr' => array(
 414+$messages['sr'] = array(
415415 'countedits' => 'Бројач измена',
416416 'countedits-warning' => "'''Упозорење:''' Не судите о књизи по њеном омоту. Не судите о кориснику по његовом броју измена.",
417417 'countedits-username' => 'Корисник:',
@@ -420,10 +420,10 @@
421421 'countedits-resulttext' => '$1 има $2 измена',
422422 'countedits-mostactive' => 'Најактивнији корисници',
423423 'countedits-nocontribs' => 'Не постоје прилози на овој вики.',
424 -),
 424+);
425425
426426 /* Serbian cyrillic (Sasa Stefanovic) */
427 -'sr-ec' => array(
 427+$messages['sr-ec'] = array(
428428 'countedits' => 'Бројач измена',
429429 'countedits-warning' => "'''Упозорење:''' Не судите о књизи по њеном омоту. Не судите о кориснику по његовом броју измена.",
430430 'countedits-username' => 'Корисник:',
@@ -433,10 +433,10 @@
434434 'countedits-resulttext' => '$1 има $2 измена',
435435 'countedits-mostactive' => 'Најактивнији корисници',
436436 'countedits-nocontribs' => 'Не постоје прилози на овој вики.',
437 -),
 437+);
438438
439439 /* Serbian latin (Sasa Stefanovic) */
440 -'sr-el' => array(
 440+$messages['sr-el'] = array(
441441 'countedits' => 'Brojač izmena',
442442 'countedits-warning' => "'''Upozorenje:''' Ne sudite o knjizi po njenom omotu. Ne sudite o korisniku po njegovom broju izmena.",
443443 'countedits-username' => 'Korisnik:',
@@ -446,12 +446,12 @@
447447 'countedits-resulttext' => '$1 ima $2 izmena',
448448 'countedits-mostactive' => 'Najaktivniji korisnici',
449449 'countedits-nocontribs' => 'Ne postoje prilozi na ovoj viki.',
450 -),
 450+);
451451
452452 /** Seeltersk (Seeltersk)
453453 * @author Pyt
454454 */
455 -'stq' => array(
 455+$messages['stq'] = array(
456456 'countedits' => 'Biedraachställer',
457457 'countedits-warning' => 'Woarschauenge: Du beuurdeelst n Bouk nit bloot ätter sin Uumesleek, beuurdeel deeruum n Autor uk nit bloot ätter sin Biedraachtäller.',
458458 'countedits-username' => 'Benutsernoome:',
@@ -461,10 +461,10 @@
462462 'countedits-resulttext' => '$1 häd $2 Beoarbaidengen',
463463 'countedits-mostactive' => 'Do aktivste Benutsere',
464464 'countedits-nocontribs' => 'In {{ns:project}} rakt et neen Beoarbaidengen.',
465 -),
 465+);
466466
467467 /* Sundanese (Kandar via BetaWiki) */
468 -'su' => array(
 468+$messages['su'] = array(
469469 'countedits' => 'Itung éditan',
470470 'countedits-warning' => '\'\'\'Ati-ati\'\'\': ulah nganiléy kontributor dumasar kana jumlah éditanana.',
471471 'countedits-username' => 'Landihan pamaké:',
@@ -474,19 +474,19 @@
475475 'countedits-resulttext' => '$1 geus nyieun $2 éditan',
476476 'countedits-mostactive' => 'Kontributor panggetolna',
477477 'countedits-nocontribs' => 'Can aya kontribusi ka ieu wiki.',
478 -),
 478+);
479479
480 -'tet' => array(
 480+$messages['tet'] = array(
481481 'countedits' => 'Sura edita',
482482 'countedits-username' => 'Naran uza-na\'in:',
483483 'countedits-ok' => 'OK',#identical but defined
484484 'countedits-nosuchuser' => 'Uza-na\'in ho naran $1 lá\'os iha ne\'e.',
485485 'countedits-resulttext' => '$1 edita tiha ona ba dala $2',
486486 'countedits-nocontribs' => 'Ema lá\'os kintribui iha wiki ne\'e.',
487 -),
 487+);
488488
489489 /* Cantonese (Shinjiman) */
490 -'yue' => array(
 490+$messages['yue'] = array(
491491 'countedits' => '編輯數',
492492 'countedits-warning' => "'''警告:''' 唔好只憑封面去判斷一本書。唔好以佢哋嘅編輯數去判斷一位貢獻者。",
493493 'countedits-username' => '用戶名:',
@@ -496,10 +496,10 @@
497497 'countedits-resulttext' => '$1有$2次編輯',
498498 'countedits-mostactive' => '最活躍嘅貢獻者',
499499 'countedits-nocontribs' => '響呢個wiki度無貢獻。',
500 -),
 500+);
501501
502502 /* Chinese (Simplified) (Shinjiman) */
503 -'zh-hans' => array(
 503+$messages['zh-hans'] = array(
504504 'countedits' => '编辑计量',
505505 'countedits-warning' => "'''警告:''' 不要只凭封面判断书本。不要以他们的编辑计量判断一位贡献者。",
506506 'countedits-username' => '用户名称:',
@@ -509,10 +509,10 @@
510510 'countedits-resulttext' => '$1有$2次编辑',
511511 'countedits-mostactive' => '最活跃的贡献者',
512512 'countedits-nocontribs' => '在这个wiki中没有贡献。',
513 -),
 513+);
514514
515515 /* Chinese (Traditional) (Shinjiman) */
516 -'zh-hant' => array(
 516+$messages['zh-hant'] = array(
517517 'countedits' => '編輯計量',
518518 'countedits-warning' => "'''警告:''' 不要只憑封面判斷書本。不要以幾他們的編輯計量判斷一位貢獻者。",
519519 'countedits-username' => '用戶名稱:',
@@ -522,24 +522,15 @@
523523 'countedits-resulttext' => '$1有$2次編輯',
524524 'countedits-mostactive' => '最活躍的貢獻者',
525525 'countedits-nocontribs' => '在這個wiki中沒有貢獻。',
526 -),
 526+);
527527
528 - );
529 -
530 - /* Kazakh fallbacks */
531 - $messages['kk'] = $messages['kk-cyrl'];
532 - $messages['kk-kz'] = $messages['kk-cyrl'];
533 - $messages['kk-tr'] = $messages['kk-latn'];
534 - $messages['kk-cn'] = $messages['kk-arab'];
535 -
536 - /* Chinese defaults, fallback to zh-hans or zh-hant */
537 - $messages['zh'] = $messages['zh-hans'];
538 - $messages['zh-cn'] = $messages['zh-hans'];
539 - $messages['zh-hk'] = $messages['zh-hant'];
540 - $messages['zh-sg'] = $messages['zh-hans'];
541 - $messages['zh-tw'] = $messages['zh-hant'];
542 - /* Cantonese default, fallback to yue */
543 - $messages['zh-yue'] = $messages['yue'];
544 -
545 - return $single ? $messages['en'] : $messages;
546 -}
 528+$messages['kk'] = $messages['kk-cyrl'];
 529+$messages['kk-kz'] = $messages['kk-cyrl'];
 530+$messages['kk-tr'] = $messages['kk-latn'];
 531+$messages['kk-cn'] = $messages['kk-arab'];
 532+$messages['zh'] = $messages['zh-hans'];
 533+$messages['zh-cn'] = $messages['zh-hans'];
 534+$messages['zh-hk'] = $messages['zh-hant'];
 535+$messages['zh-sg'] = $messages['zh-hans'];
 536+$messages['zh-tw'] = $messages['zh-hant'];
 537+$messages['zh-yue'] = $messages['yue'];
Index: trunk/extensions/CountEdits/CountEdits.php
@@ -1,5 +1,7 @@
22 <?php
3 -
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit(1);
 5+}
46 /**
57 * Simple edit counter for small wikis
68 *
@@ -7,47 +9,21 @@
810 * @author Rob Church <robchur@gmail.com>
911 */
1012
11 -if( defined( 'MEDIAWIKI' ) ) {
 13+$wgExtensionCredits['specialpage'][] = array(
 14+ 'name' => 'Count Edits',
 15+ 'version' => '2008-01-11',
 16+ 'author' => 'Rob Church',
 17+ 'description' => '[Special:CountEdits|Special page]] that counts user edits and provides a top-ten contributor list',
 18+ 'url' => 'http://www.mediawiki.wiki/wiki/Extesion:CountEdits',
 19+);
1220
13 - $wgExtensionFunctions[] = 'efCountEdits';
14 - $wgExtensionCredits['specialpage'][] = array(
15 - 'name' => 'Count Edits',
16 - 'author' => 'Rob Church',
17 - 'description' => 'Special page that counts user edits and provides a top-ten contributor list',
18 - );
19 -
20 - /* This line will have no effect on pre-1.7 wikis */
21 - $wgAutoloadClasses['SpecialCountEdits'] = dirname( __FILE__ ) . '/CountEdits.page.php';
22 - /* However, on pre-1.7 wikis, we can't afford to mess this up */
23 - if( version_compare( $wgVersion, '1.7alpha', '>=' ) )
24 - $wgSpecialPages['CountEdits'] = 'SpecialCountEdits';
 21+$dir = dirname(__FILE__) . '/';
 22+$wgExtensionMessagesFiles['CountEdits'] = $dir . 'CountEdits.i18n.php';
 23+$wgAutoloadClasses['SpecialCountEdits'] = $dir . 'CountEdits.page.php';
 24+$wgSpecialPages['CountEdits'] = 'SpecialCountEdits';
2525
26 - /**
27 - * Should we show the "most active contributors" list?
28 - * This could be expensive for larger wikis
29 - */
30 - $wgCountEditsMostActive = true;
31 -
32 - /**
33 - * Extension setup function
34 - */
35 - function efCountEdits() {
36 - global $wgVersion, $wgMessageCache;
37 - require_once( dirname( __FILE__ ) . '/CountEdits.i18n.php' );
38 - if( version_compare( $wgVersion, '1.7alpha', '>=' ) ) {
39 - foreach( efCountEditsMessages() as $lang => $messages )
40 - $wgMessageCache->addMessages( $messages, $lang );
41 - } else {
42 - $wgMessageCache->addMessages( efCountEditsMessages( true ) );
43 - require_once( 'SpecialPage.php' );
44 - require_once( dirname( __FILE__ ) . '/CountEdits.page.php' );
45 - SpecialPage::addPage( new SpecialCountEdits() );
46 - }
47 - }
48 -
49 -} else {
50 - echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
51 - exit( 1 );
52 -}
53 -
54 -
 26+/**
 27+ * Should we show the "most active contributors" list?
 28+ * This could be expensive for larger wikis
 29+ */
 30+$wgCountEditsMostActive = true;
Index: trunk/extensions/Translate/MessageGroups.php
@@ -967,17 +967,11 @@
968968 }
969969
970970 class CountEditsMessageGroup extends ExtensionMessageGroup {
971 - protected $fileExporter = null;
972971 protected $label = 'Count Edits';
973972 protected $id = 'ext-countedits';
974973
975 - protected $functionName = 'efCountEditsMessages';
 974+ protected $arrName = 'messages';
976975 protected $messageFile = 'CountEdits/CountEdits.i18n.php';
977 -
978 - protected $exportStart = '\'$CODE\' => array(';
979 - protected $exportPrefix= '';
980 - protected $exportLineP = "\t";
981 - protected $exportEnd = '),';
982976 }
983977
984978 class CrossNamespaceLinksMessageGroup extends ExtensionMessageGroup {

Follow-up revisions

RevisionCommit summaryAuthorDate
r55358Fix incorrect URL from r29576. Spotted by Meno25siebrand22:57, 19 August 2009

Status & tagging log