Index: trunk/extensions/CountEdits/CountEdits.page.php |
— | — | @@ -1,4 +1,6 @@ |
2 | 2 | <?php |
| 3 | +if ( ! defined( 'MEDIAWIKI' ) ) |
| 4 | + die(); |
3 | 5 | |
4 | 6 | /** |
5 | 7 | * Special page class for the CountEdits extension |
— | — | @@ -6,17 +8,18 @@ |
7 | 9 | * @addtogroup Extensions |
8 | 10 | * @author Rob Church <robchur@gmail.com> |
9 | 11 | */ |
10 | | - |
| 12 | + |
11 | 13 | class SpecialCountEdits extends SpecialPage { |
12 | | - |
| 14 | + |
13 | 15 | var $target; |
14 | 16 | |
15 | | - function __construct() { |
16 | | - parent::__construct( 'CountEdits' ); |
| 17 | + public function __construct() { |
| 18 | + SpecialPage::SpecialPage( 'CountEdits' ); |
17 | 19 | } |
18 | | - |
19 | | - function execute( $params ) { |
| 20 | + |
| 21 | + public function execute( $params ) { |
20 | 22 | global $wgOut, $wgUser; |
| 23 | + wfLoadExtensionMessages( 'CountEdits' ); |
21 | 24 | $skin = $wgUser->getSkin(); |
22 | 25 | $this->setHeaders(); |
23 | 26 | $this->loadRequest( $params ); |
— | — | @@ -36,7 +39,7 @@ |
37 | 40 | $this->showTopTen( $wgOut ); |
38 | 41 | return true; |
39 | 42 | } |
40 | | - |
| 43 | + |
41 | 44 | function loadRequest( $params ) { |
42 | 45 | global $wgRequest; |
43 | 46 | if( $params ) { |
— | — | @@ -46,7 +49,7 @@ |
47 | 50 | $this->target = $target ? $target : ''; |
48 | 51 | } |
49 | 52 | } |
50 | | - |
| 53 | + |
51 | 54 | function makeForm() { |
52 | 55 | $self = $this->getTitle(); |
53 | 56 | $form = '<form method="post" action="'. $self->getLocalUrl() . '">'; |
— | — | @@ -56,7 +59,7 @@ |
57 | 60 | $form .= '</p></form>'; |
58 | 61 | return $form; |
59 | 62 | } |
60 | | - |
| 63 | + |
61 | 64 | function countEditsReal( $id, $text = false ) { |
62 | 65 | global $wgVersion; |
63 | 66 | $dbr =& wfGetDB( DB_SLAVE ); |
— | — | @@ -72,7 +75,7 @@ |
73 | 76 | return $dbr->selectField( 'revision', 'COUNT(rev_id)', $conds, 'CountEdits::countEditsReal' ); |
74 | 77 | } |
75 | 78 | } |
76 | | - |
| 79 | + |
77 | 80 | function showResults( $count, $id = 0 ) { |
78 | 81 | global $wgOut, $wgUser, $wgLang; |
79 | 82 | $skin =& $wgUser->getSkin(); |
— | — | @@ -81,13 +84,13 @@ |
82 | 85 | $wgOut->addHtml( '<p>' . wfMsgHtml( 'countedits-resulttext', $links, $count ) . '</p>' ); |
83 | 86 | $wgOut->addWikiText( wfMsg( 'countedits-warning' ) ); |
84 | 87 | } |
85 | | - |
| 88 | + |
86 | 89 | function showTopTen( &$out ) { |
87 | 90 | global $wgCountEditsMostActive; |
88 | 91 | if( $wgCountEditsMostActive ) |
89 | 92 | $out->addHtml( $this->getMostActive() ); |
90 | 93 | } |
91 | | - |
| 94 | + |
92 | 95 | function getMostActive() { |
93 | 96 | global $wgUser, $wgLang; |
94 | 97 | $dbr =& wfGetDB( DB_SLAVE ); |
— | — | @@ -117,7 +120,4 @@ |
118 | 121 | return ''; |
119 | 122 | } |
120 | 123 | } |
121 | | - |
122 | 124 | } |
123 | | - |
124 | | - |
Index: trunk/extensions/CountEdits/CountEdits.i18n.php |
— | — | @@ -1,17 +1,17 @@ |
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 Rob Church <robchur@gmail.com> |
9 | 8 | */ |
10 | 9 | |
11 | | -function efCountEditsMessages( $single = false ) { |
12 | | - $messages = array( |
| 10 | +$messages = array(); |
13 | 11 | |
14 | | -/* English (Rob Church) */ |
15 | | -'en' => array( |
| 12 | +/* English |
| 13 | + * @author Rob Church |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
16 | 16 | 'countedits' => 'Count edits', |
17 | 17 | 'countedits-warning' => "'''Warning:''' Do not judge a book by its cover. Do not judge a contributor by their edit count.", |
18 | 18 | 'countedits-username' => 'Username:', |
— | — | @@ -21,10 +21,10 @@ |
22 | 22 | 'countedits-resulttext' => '$1 has made $2 edits', |
23 | 23 | 'countedits-mostactive' => 'Most active contributors', |
24 | 24 | 'countedits-nocontribs' => 'There have been no contributions to this wiki.', |
25 | | -), |
| 25 | +); |
26 | 26 | |
27 | 27 | /* Arabic (Meno25) */ |
28 | | -'ar' => array( |
| 28 | +$messages['ar'] = array( |
29 | 29 | 'countedits' => 'عد التعديلات', |
30 | 30 | 'countedits-warning' => '\'\'\'تحذير:\'\'\' لا تحكم على كتاب من غلافه. لا تحكم على مساهم من خلال عدد مساهماته.', |
31 | 31 | 'countedits-username' => 'اسم المستخدم:', |
— | — | @@ -34,14 +34,14 @@ |
35 | 35 | 'countedits-resulttext' => '$1 لديه $2 مساهمة', |
36 | 36 | 'countedits-mostactive' => 'أكثر المساهمين نشاطا', |
37 | 37 | 'countedits-nocontribs' => 'لا يوجد مساهمون في هذه الويكي.', |
38 | | -), |
| 38 | +); |
39 | 39 | |
40 | | -'bcl' => array( |
| 40 | +$messages['bcl'] = array( |
41 | 41 | 'countedits-resultheader' => 'Mga resulta kan $1', |
42 | 42 | 'countedits-mostactive' => 'Pinaka mahigos na mga kontributor', |
43 | | -), |
| 43 | +); |
44 | 44 | |
45 | | -'bg' => array( |
| 45 | +$messages['bg'] = array( |
46 | 46 | 'countedits' => 'Броене на редакции', |
47 | 47 | 'countedits-warning' => '\'\'\'Внимание:\'\'\' Не съдете за книгата по нейната корица. Не съдете за редактора по броя на редакциите му.', |
48 | 48 | 'countedits-username' => 'Потребителско име:', |
— | — | @@ -51,9 +51,9 @@ |
52 | 52 | 'countedits-resulttext' => '$1 е направил(а) $2 редакции', |
53 | 53 | 'countedits-mostactive' => 'Най-активни редактори', |
54 | 54 | 'countedits-nocontribs' => 'Няма приноси към това уики.', |
55 | | -), |
| 55 | +); |
56 | 56 | |
57 | | -'br' => array( |
| 57 | +$messages['br'] = array( |
58 | 58 | 'countedits' => 'Degasadennoù ar gont', |
59 | 59 | 'countedits-warning' => '\'\'\'Diwallit :\'\'\' Ne varner ket ul levr diouzh ar golo anezhañ. Arabat barnañ un implijer diouzh an niver a zegasadennoù graet gantañ.', |
60 | 60 | 'countedits-username' => 'Anv implijer :', |
— | — | @@ -63,9 +63,9 @@ |
64 | 64 | 'countedits-resulttext' => '$2 degasadenn zo bet graet gant $1', |
65 | 65 | 'countedits-mostactive' => 'Implijerien oberiantañ', |
66 | 66 | 'countedits-nocontribs' => 'Degasadenn ebet evit ar wiki-mañ.', |
67 | | -), |
| 67 | +); |
68 | 68 | |
69 | | -'ca' => array( |
| 69 | +$messages['ca'] = array( |
70 | 70 | 'countedits' => 'Nombre d\'edicions', |
71 | 71 | 'countedits-warning' => '\'\'\'Avís:\'\'\' No jutgeu un llibre per la seua coberta, ni tampoc a un col·laborador pel seu nombre d\'edicions.', |
72 | 72 | 'countedits-username' => 'Nom d\'usuari:', |
— | — | @@ -75,10 +75,10 @@ |
76 | 76 | 'countedits-resulttext' => '$1 ha fet $2 edicions', |
77 | 77 | 'countedits-mostactive' => 'Els col·laboradors més actius', |
78 | 78 | 'countedits-nocontribs' => 'No hi ha hagut cap col·laboració en aquest wiki.', |
79 | | -), |
| 79 | +); |
80 | 80 | |
81 | 81 | /* German (Raymond) */ |
82 | | -'de' => array( |
| 82 | +$messages['de'] = array( |
83 | 83 | 'countedits' => 'Beitragszähler', |
84 | 84 | 'countedits-warning' => 'Hinweis: Sie beurteilen ein Buch nicht nur nach seinem Umschlag, beurteilen Sie einen Autor daher auch nicht nur nach seinem Beitragszähler.', |
85 | 85 | 'countedits-username' => 'Benutzername:', |
— | — | @@ -88,14 +88,14 @@ |
89 | 89 | 'countedits-resulttext' => '$1 hat $2 Bearbeitungen', |
90 | 90 | 'countedits-mostactive' => 'Die aktivsten Benutzer', |
91 | 91 | 'countedits-nocontribs' => 'In {{ns:project}} sind keine Bearbeitungen vorhanden.', |
92 | | -), |
| 92 | +); |
93 | 93 | |
94 | | -'el' => array( |
| 94 | +$messages['el'] = array( |
95 | 95 | 'countedits-username' => 'Όνομα χρήστη:', |
96 | 96 | 'countedits-ok' => 'ΟΚ', |
97 | | -), |
| 97 | +); |
98 | 98 | |
99 | | -'eo' => array( |
| 99 | +$messages['eo'] = array( |
100 | 100 | 'countedits' => 'Nombro de redaktoj', |
101 | 101 | 'countedits-warning' => '\'\'\'Averto:\'\'\' Ne juĝu libron laŭ ĝia kovrilo. Ne juĝu kontribuanton laŭ lia redaktaro.', |
102 | 102 | 'countedits-username' => 'Uzantonomo:', |
— | — | @@ -105,15 +105,15 @@ |
106 | 106 | 'countedits-resulttext' => '$1 faris $2 redaktojn', |
107 | 107 | 'countedits-mostactive' => 'Plej aktivaj kontribuantoj', |
108 | 108 | 'countedits-nocontribs' => 'Ne estas iuj kontribuaĵoj por ĉi tiu vikio.', |
109 | | -), |
| 109 | +); |
110 | 110 | |
111 | | -'ext' => array( |
| 111 | +$messages['ext'] = array( |
112 | 112 | 'countedits-username' => 'Nombri d´usuáriu:', |
113 | 113 | 'countedits-resulttext' => '$1 á hechu $2 eicionis', |
114 | | -), |
| 114 | +); |
115 | 115 | |
116 | 116 | /* Finnish (Niklas Laxström) */ |
117 | | -'fi' => array( |
| 117 | +$messages['fi'] = array( |
118 | 118 | 'countedits' => 'Muokkausmäärälaskuri', |
119 | 119 | 'countedits-warning' => 'Älä arvioi kirjaa kannen perusteella. Älä arvioi käyttäjää muokkausten lukumäärän perusteella.', |
120 | 120 | 'countedits-username' => 'Käyttäjä', |
— | — | @@ -123,10 +123,10 @@ |
124 | 124 | 'countedits-resulttext' => '$1 on tehnyt $2 muokkausta.', |
125 | 125 | 'countedits-mostactive' => 'Aktiivisimmat käyttäjät', |
126 | 126 | 'countedits-nocontribs' => 'Tätä wikiä ei ole muokattu.', |
127 | | -), |
| 127 | +); |
128 | 128 | |
129 | 129 | /* French (Bertrand Grondin) */ |
130 | | -'fr' => array( |
| 130 | +$messages['fr'] = array( |
131 | 131 | 'countedits' => 'Compteur d’éditions', |
132 | 132 | '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.', |
133 | 133 | 'countedits-username' => 'Utilisateur', |
— | — | @@ -136,9 +136,9 @@ |
137 | 137 | 'countedits-resulttext' => '$1 a fait {{PLURAL:$2|$2 édition|$2 éditions}}', |
138 | 138 | 'countedits-mostactive' => 'Contributeurs les plus actifs', |
139 | 139 | 'countedits-nocontribs' => 'Aucune contribution sur ce wiki.', |
140 | | -), |
| 140 | +); |
141 | 141 | |
142 | | -'gl' => array( |
| 142 | +$messages['gl'] = array( |
143 | 143 | 'countedits' => 'Contar edicións', |
144 | 144 | 'countedits-warning' => '\'\'\'Advertencia:\'\'\' As aparencias enganan. Non xulgue a un colaborador polo seu número de edicións.', |
145 | 145 | 'countedits-username' => 'Nome de usuario:', |
— | — | @@ -148,9 +148,9 @@ |
149 | 149 | 'countedits-resulttext' => '$1 ten feitas $2 edicións', |
150 | 150 | 'countedits-mostactive' => 'Colaboradores máis activos', |
151 | 151 | 'countedits-nocontribs' => 'Non houbo ningunha colaboración neste wiki.', |
152 | | -), |
| 152 | +); |
153 | 153 | |
154 | | -'hr' => array( |
| 154 | +$messages['hr'] = array( |
155 | 155 | 'countedits' => 'Broj uređivanja', |
156 | 156 | 'countedits-warning' => '\'\'\'Upozorenje:\'\'\' Ne sudite knjigu po koricama. Ne sudite suradnike po njihovom broju uređivanja.', |
157 | 157 | 'countedits-username' => 'Suradničko ime:', |
— | — | @@ -160,9 +160,9 @@ |
161 | 161 | 'countedits-resulttext' => 'Broj uređivanja suradnika $1: $2', |
162 | 162 | 'countedits-mostactive' => 'Najaktivniji suradnici', |
163 | 163 | 'countedits-nocontribs' => 'Nema suradnika na ovom wikiju.', |
164 | | -), |
| 164 | +); |
165 | 165 | |
166 | | -'hsb' => array( |
| 166 | +$messages['hsb'] = array( |
167 | 167 | 'countedits' => 'Ličak přinoškow', |
168 | 168 | 'countedits-warning' => '\'\'\'Kedźbu\'\'\': Njeposudź knihu wobalki dla, njeposudź wužiwarja ličby jeho přinoškow dla!', |
169 | 169 | 'countedits-username' => 'Wužiwarske mjeno:', |
— | — | @@ -172,9 +172,9 @@ |
173 | 173 | 'countedits-resulttext' => '$1 je $2 wobdźěłanjow sčinił.', |
174 | 174 | 'countedits-mostactive' => 'Najaktiwniši přinošowarjo', |
175 | 175 | 'countedits-nocontribs' => 'Njejsu žane změny w tutym wikiju.', |
176 | | -), |
| 176 | +); |
177 | 177 | |
178 | | -'hy' => array( |
| 178 | +$messages['hy'] = array( |
179 | 179 | 'countedits' => 'Հաշվել խմբագրումները', |
180 | 180 | 'countedits-warning' => '\'\'\'Զգուշացում.\'\'\' մի դատեք գրքի մասին կազմով և մասնակցի մասին՝ խմբագրումների քանակով։', |
181 | 181 | 'countedits-username' => 'Մասնակից.', |
— | — | @@ -184,10 +184,10 @@ |
185 | 185 | 'countedits-resulttext' => '$1 մասնակիցը կատարել է $2 խմբագրում', |
186 | 186 | 'countedits-mostactive' => 'Ամենաակտիվ մասնակիցները', |
187 | 187 | 'countedits-nocontribs' => 'Այս վիքիում ոչ մի խմբագրում չի եղել։', |
188 | | -), |
| 188 | +); |
189 | 189 | |
190 | 190 | /* Indonesian (Ivan Lanin) */ |
191 | | -'id' => array( |
| 191 | +$messages['id'] = array( |
192 | 192 | 'countedits' => 'Jumlah suntingan', |
193 | 193 | 'countedits-warning' => 'Peringatan: Jangan menilai suatu buku dari sampulnya. Jangan menilai seorang kontributor berdasarkan jumlah suntingannya.', |
194 | 194 | 'countedits-username' => 'Nama pengguna:', |
— | — | @@ -197,10 +197,10 @@ |
198 | 198 | 'countedits-resulttext' => '$1 telah membuat $2 suntingan', |
199 | 199 | 'countedits-mostactive' => 'Kontributor paling aktif', |
200 | 200 | 'countedits-nocontribs' => 'Belum ada kontribusi untuk wiki ini.', |
201 | | -), |
| 201 | +); |
202 | 202 | |
203 | 203 | /* Italian (BrokenArrow) */ |
204 | | -'it' => array( |
| 204 | +$messages['it'] = array( |
205 | 205 | 'countedits' => 'Conteggio delle modifiche', |
206 | 206 | 'countedits-warning' => "'''Attenzione:''' Un libro non si giudica dalla copertina. Un utente non si giudica dal numero delle modifiche.", |
207 | 207 | 'countedits-username' => 'Nome utente:', |
— | — | @@ -210,10 +210,10 @@ |
211 | 211 | 'countedits-resulttext' => '$1 ha effettuato $2 modifiche', |
212 | 212 | 'countedits-mostactive' => 'Autori con il maggior numero di contributi', |
213 | 213 | 'countedits-nocontribs' => 'Il sito non ha subito alcuna modifica.', |
214 | | -), |
| 214 | +); |
215 | 215 | |
216 | 216 | /* Kazakh Cyrillic (AlefZet) */ |
217 | | -'kk-cyrl' => array( |
| 217 | +$messages['kk-cyrl'] = array( |
218 | 218 | 'countedits' => 'Түзету санау', |
219 | 219 | 'countedits-warning' => "'''Назар салыңыз:''' Кітапті мұқабасынан жорамалдамаңыз. Үлескерді түзету санынан жорамалдамаңыз.", |
220 | 220 | 'countedits-username' => 'Қатысуша аты:', |
— | — | @@ -223,10 +223,10 @@ |
224 | 224 | 'countedits-resulttext' => '$1 деген $2 түзету істеген', |
225 | 225 | 'countedits-mostactive' => 'Ең белсенді үлескерлер', |
226 | 226 | 'countedits-nocontribs' => 'Бұл уикиде еш үлес болған жоқ.', |
227 | | -), |
| 227 | +); |
228 | 228 | |
229 | 229 | /* Kazakh Latin (AlefZet) */ |
230 | | -'kk-latn' => array( |
| 230 | +$messages['kk-latn'] = array( |
231 | 231 | 'countedits' => 'Tüzetw sanaw', |
232 | 232 | 'countedits-warning' => "'''Nazar salıñız:''' Kitapti muqabasınan joramaldamañız. Üleskerdi tüzetw sanınan joramaldamañız.", |
233 | 233 | 'countedits-username' => 'Qatıswşa atı:', |
— | — | @@ -236,10 +236,10 @@ |
237 | 237 | 'countedits-resulttext' => '$1 degen $2 tüzetw istegen', |
238 | 238 | 'countedits-mostactive' => 'Eñ belsendi üleskerler', |
239 | 239 | 'countedits-nocontribs' => 'Bul wïkïde eş üles bolğan joq.', |
240 | | -), |
| 240 | +); |
241 | 241 | |
242 | 242 | /* Kazakh Arabic (AlefZet) */ |
243 | | -'kk-arab' => array( |
| 243 | +$messages['kk-arab'] = array( |
244 | 244 | 'countedits' => 'تٷزەتۋ ساناۋ', |
245 | 245 | 'countedits-warning' => "'''نازار سالىڭىز:''' كٸتاپتٸ مۇقاباسىنان جورامالداماڭىز. ٷلەسكەردٸ تٷزەتۋ سانىنان جورامالداماڭىز.", |
246 | 246 | 'countedits-username' => 'قاتىسۋشا اتى:', |
— | — | @@ -249,30 +249,30 @@ |
250 | 250 | 'countedits-resulttext' => '$1 دەگەن $2 تٷزەتۋ ٸستەگەن', |
251 | 251 | 'countedits-mostactive' => 'ەڭ بەلسەندٸ ٷلەسكەرلەر', |
252 | 252 | 'countedits-nocontribs' => 'بۇل ۋيكيدە ەش ٷلەس بولعان جوق.', |
253 | | -), |
| 253 | +); |
254 | 254 | |
255 | | -'ku-latn' => array( |
| 255 | +$messages['ku-latn'] = array( |
256 | 256 | 'countedits' => 'Guherandinan bihesbîne', |
257 | 257 | 'countedits-username' => 'Navî bikarhêner:', |
258 | 258 | 'countedits-ok' => 'OK',#identical but defined |
259 | 259 | 'countedits-nosuchuser' => 'Li vê derê ne bikarhênerek bi navê $1 heye.', |
260 | 260 | 'countedits-resulttext' => '$1 $2 guherandinan çêkirîye', |
261 | 261 | 'countedits-nocontribs' => 'Di vê wîkîyê da guherandin tune ne.', |
262 | | -), |
| 262 | +); |
263 | 263 | |
264 | | -'la' => array( |
| 264 | +$messages['la'] = array( |
265 | 265 | 'countedits-username' => 'Nomen usoris:', |
266 | | -), |
| 266 | +); |
267 | 267 | |
268 | 268 | /** Luxembourgish (Lëtzebuergesch) |
269 | 269 | * @author Robby |
270 | 270 | */ |
271 | | -'lb' => array( |
| 271 | +$messages['lb'] = array( |
272 | 272 | 'countedits-username' => 'Benotzernumm:', |
273 | 273 | 'countedits-nosuchuser' => 'Et gëtt kee Benotzer mam Numm $1.', |
274 | | -), |
| 274 | +); |
275 | 275 | |
276 | | -'nds' => array( |
| 276 | +$messages['nds'] = array( |
277 | 277 | 'countedits' => 'Tellen, wo faken de Bruker Sieden ännert hett', |
278 | 278 | '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.', |
279 | 279 | 'countedits-username' => 'Brukernaam:', |
— | — | @@ -282,10 +282,10 @@ |
283 | 283 | 'countedits-resulttext' => '$1 hett $2 Maal wat ännert.', |
284 | 284 | 'countedits-mostactive' => 'Brukers, de opmehrst Maal wat ännert hebbt', |
285 | 285 | 'countedits-nocontribs' => 'Kene Bidrääg op dit Wiki.', |
286 | | -), |
| 286 | +); |
287 | 287 | |
288 | 288 | /* nld / Dutch (Siebrand Mazeland) */ |
289 | | -'nl' => array( |
| 289 | +$messages['nl'] = array( |
290 | 290 | 'countedits' => 'Bewerkingen tellen', |
291 | 291 | 'countedits-warning' => '\'\'\'Waarschuwing:\'\'\' Beoordeel het boek niet op de buitenkant. Beoordeel een redacteur niet alleen op het aantal bijdragen.', |
292 | 292 | 'countedits-username' => 'Gebruiker:', |
— | — | @@ -295,10 +295,10 @@ |
296 | 296 | 'countedits-resulttext' => '$1 heeft $2 bewerkingen gemaakt', |
297 | 297 | 'countedits-mostactive' => 'Meest actieve redacteuren', |
298 | 298 | 'countedits-nocontribs' => 'Er zijn geen bewerkingen op deze wiki.', |
299 | | -), |
| 299 | +); |
300 | 300 | |
301 | 301 | /* Norwegian (Jon Harald Søby) */ |
302 | | -'no' => array( |
| 302 | +$messages['no'] = array( |
303 | 303 | 'countedits' => 'Tell redigeringer', |
304 | 304 | 'countedits-warning' => '\'\'\'Advarsel:\'\'\' Ikke sku hunden på hårene. Ikke døm en bidragsyter på antall redigeringer.', |
305 | 305 | 'countedits-username' => 'Brukernavn:', |
— | — | @@ -308,9 +308,9 @@ |
309 | 309 | 'countedits-resulttext' => '$1 har gjort $2 redigeringer', |
310 | 310 | 'countedits-mostactive' => 'Mest aktive bidragsytere', |
311 | 311 | 'countedits-nocontribs' => 'Det har ikke vært noen redigeringer på denne wikien.', |
312 | | -), |
| 312 | +); |
313 | 313 | |
314 | | -'oc' => array( |
| 314 | +$messages['oc'] = array( |
315 | 315 | 'countedits' => 'Comptaire d’edicions', |
316 | 316 | 'countedits-warning' => '\'\'\'Avertiment\'\'\' : jutjetz pas un libre per sa cobertura. Jutjetz pas tanpauc un utilizaire en foncion del nombre de sas contribucions.', |
317 | 317 | 'countedits-username' => 'Nom d\'utilizaire:', |
— | — | @@ -320,9 +320,9 @@ |
321 | 321 | 'countedits-resulttext' => '$1 a fach $2 modificacions', |
322 | 322 | 'countedits-mostactive' => 'Contributors mai actius', |
323 | 323 | 'countedits-nocontribs' => 'Cap de contribucion sus aqueste wiki.', |
324 | | -), |
| 324 | +); |
325 | 325 | |
326 | | -'pl' => array( |
| 326 | +$messages['pl'] = array( |
327 | 327 | 'countedits' => 'Liczba edycji', |
328 | 328 | 'countedits-warning' => '\'\'Ostrzeżenie:\'\'\' Nie oceniaj książki po jej okładce. Nie oceniaj użytkownika po jego liczbie edycji.', |
329 | 329 | 'countedits-username' => 'Nazwa użytkownika:', |
— | — | @@ -332,10 +332,10 @@ |
333 | 333 | 'countedits-resulttext' => '$1 wykonał (-a) $2 edycji', |
334 | 334 | 'countedits-mostactive' => 'Najbardziej aktywni użytkownicy', |
335 | 335 | 'countedits-nocontribs' => 'Nie wykonano edycji na tej wiki', |
336 | | -), |
| 336 | +); |
337 | 337 | |
338 | 338 | /* Piedmontese (Bèrto 'd Sèra) */ |
339 | | -'pms' => array( |
| 339 | +$messages['pms'] = array( |
340 | 340 | 'countedits' => 'Total dle modìfiche', |
341 | 341 | '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.', |
342 | 342 | 'countedits-username' => 'Stranòm:', |
— | — | @@ -345,10 +345,10 @@ |
346 | 346 | 'countedits-resulttext' => '$1 a l\'ha fait $2 modìfiche', |
347 | 347 | 'countedits-mostactive' => 'Contributor pì ativ', |
348 | 348 | 'countedits-nocontribs' => 'A-i é pa anco\' sta-ie gnun-a modìfica a sta wiki-sì.', |
349 | | -), |
| 349 | +); |
350 | 350 | |
351 | 351 | /* Portuguese (Lugusto) */ |
352 | | -'pt' => array( |
| 352 | +$messages['pt'] = array( |
353 | 353 | 'countedits' => 'Contador de edições', |
354 | 354 | 'countedits-warning' => "'''Atenção:''' Não julgue um livro pela sua capa. Não julgue um contribuidor pela contagem de suas edições.", |
355 | 355 | 'countedits-username' => 'Utilizador:', |
— | — | @@ -358,10 +358,10 @@ |
359 | 359 | 'countedits-resulttext' => '$1 fez $2 edições', |
360 | 360 | 'countedits-mostactive' => 'Contribuidores mais activos', |
361 | 361 | 'countedits-nocontribs' => 'Não possui contribuições neste wiki.', |
362 | | -), |
| 362 | +); |
363 | 363 | |
364 | 364 | /* Romanian (KlaudiuMihăilă) */ |
365 | | -'ro' => array( |
| 365 | +$messages['ro'] = array( |
366 | 366 | 'countedits' => 'Număr de modificări', |
367 | 367 | 'countedits-warning' => '\'\'\'Atenţie:\'\'\' Nu judeca o carte după copertă. Nu judeca un contribuitor după numărul de modificări.', |
368 | 368 | 'countedits-username' => 'Nume de utilizator:', |
— | — | @@ -370,9 +370,9 @@ |
371 | 371 | 'countedits-resulttext' => '$1 a efectuat {{PLURAL:$2|o modificare|$2 modificări}}', |
372 | 372 | 'countedits-mostactive' => 'Contribuitorii cei mai activi', |
373 | 373 | 'countedits-nocontribs' => 'Nu există contribuitori la acest wiki.', |
374 | | -), |
| 374 | +); |
375 | 375 | |
376 | | -'ru' => array( |
| 376 | +$messages['ru'] = array( |
377 | 377 | 'countedits' => 'Подсчитать правки', |
378 | 378 | 'countedits-warning' => "'''Внимание:''' не судите о книге по её обложке. Не судите об участнике по количеству его правок.", |
379 | 379 | 'countedits-username' => 'Участник:', |
— | — | @@ -382,10 +382,10 @@ |
383 | 383 | 'countedits-resulttext' => '$1 сделал $2 правок', |
384 | 384 | 'countedits-mostactive' => 'Наиболее активные участники', |
385 | 385 | 'countedits-nocontribs' => 'Нет правок в этой вики.', |
386 | | -), |
| 386 | +); |
387 | 387 | |
388 | 388 | |
389 | | -'sah' => array( |
| 389 | +$messages['sah'] = array( |
390 | 390 | 'countedits' => 'Хас көннөрүүлээҕэ', |
391 | 391 | 'countedits-warning' => '\'\'\'Болҕой:\'\'\' Кинигэни таһыттан сыаналаабаттарын курдук, кыттааччыны правката элбэҕинэн сыаналаабаттар.', |
392 | 392 | 'countedits-username' => 'Аата:', |
— | — | @@ -394,10 +394,10 @@ |
395 | 395 | 'countedits-resulttext' => '$1 $2 көннөрүүнү оҥорбут', |
396 | 396 | 'countedits-mostactive' => 'Саамай элбэх көннөрүүнү оҥорбут кыттааччылар', |
397 | 397 | 'countedits-nocontribs' => 'Бу биикигэ көннөрүү оҥоһуллубатах.', |
398 | | -), |
| 398 | +); |
399 | 399 | |
400 | 400 | /* Slovak (helix84) */ |
401 | | -'sk' => array( |
| 401 | +$messages['sk'] = array( |
402 | 402 | 'countedits' => 'Počet príspevkov', |
403 | 403 | 'countedits-warning' => "'''Varovanie:''' Nesúďte knihu podľa obalu. Nesúďte prispievateľa podľa počtu príspevkov.", |
404 | 404 | 'countedits-username' => 'Používateľské meno:', |
— | — | @@ -407,10 +407,10 @@ |
408 | 408 | 'countedits-resulttext' => '$1 urobil $2 úprav', |
409 | 409 | 'countedits-mostactive' => 'Najaktívnejší prispievatelia', |
410 | 410 | 'countedits-nocontribs' => 'Táto wiki neobsahuje zatiaľ žiadne príspevky.', |
411 | | -), |
| 411 | +); |
412 | 412 | |
413 | 413 | /* Serbian default (Sasa Stefanovic) */ |
414 | | -'sr' => array( |
| 414 | +$messages['sr'] = array( |
415 | 415 | 'countedits' => 'Бројач измена', |
416 | 416 | 'countedits-warning' => "'''Упозорење:''' Не судите о књизи по њеном омоту. Не судите о кориснику по његовом броју измена.", |
417 | 417 | 'countedits-username' => 'Корисник:', |
— | — | @@ -420,10 +420,10 @@ |
421 | 421 | 'countedits-resulttext' => '$1 има $2 измена', |
422 | 422 | 'countedits-mostactive' => 'Најактивнији корисници', |
423 | 423 | 'countedits-nocontribs' => 'Не постоје прилози на овој вики.', |
424 | | -), |
| 424 | +); |
425 | 425 | |
426 | 426 | /* Serbian cyrillic (Sasa Stefanovic) */ |
427 | | -'sr-ec' => array( |
| 427 | +$messages['sr-ec'] = array( |
428 | 428 | 'countedits' => 'Бројач измена', |
429 | 429 | 'countedits-warning' => "'''Упозорење:''' Не судите о књизи по њеном омоту. Не судите о кориснику по његовом броју измена.", |
430 | 430 | 'countedits-username' => 'Корисник:', |
— | — | @@ -433,10 +433,10 @@ |
434 | 434 | 'countedits-resulttext' => '$1 има $2 измена', |
435 | 435 | 'countedits-mostactive' => 'Најактивнији корисници', |
436 | 436 | 'countedits-nocontribs' => 'Не постоје прилози на овој вики.', |
437 | | -), |
| 437 | +); |
438 | 438 | |
439 | 439 | /* Serbian latin (Sasa Stefanovic) */ |
440 | | -'sr-el' => array( |
| 440 | +$messages['sr-el'] = array( |
441 | 441 | 'countedits' => 'Brojač izmena', |
442 | 442 | 'countedits-warning' => "'''Upozorenje:''' Ne sudite o knjizi po njenom omotu. Ne sudite o korisniku po njegovom broju izmena.", |
443 | 443 | 'countedits-username' => 'Korisnik:', |
— | — | @@ -446,12 +446,12 @@ |
447 | 447 | 'countedits-resulttext' => '$1 ima $2 izmena', |
448 | 448 | 'countedits-mostactive' => 'Najaktivniji korisnici', |
449 | 449 | 'countedits-nocontribs' => 'Ne postoje prilozi na ovoj viki.', |
450 | | -), |
| 450 | +); |
451 | 451 | |
452 | 452 | /** Seeltersk (Seeltersk) |
453 | 453 | * @author Pyt |
454 | 454 | */ |
455 | | -'stq' => array( |
| 455 | +$messages['stq'] = array( |
456 | 456 | 'countedits' => 'Biedraachställer', |
457 | 457 | 'countedits-warning' => 'Woarschauenge: Du beuurdeelst n Bouk nit bloot ätter sin Uumesleek, beuurdeel deeruum n Autor uk nit bloot ätter sin Biedraachtäller.', |
458 | 458 | 'countedits-username' => 'Benutsernoome:', |
— | — | @@ -461,10 +461,10 @@ |
462 | 462 | 'countedits-resulttext' => '$1 häd $2 Beoarbaidengen', |
463 | 463 | 'countedits-mostactive' => 'Do aktivste Benutsere', |
464 | 464 | 'countedits-nocontribs' => 'In {{ns:project}} rakt et neen Beoarbaidengen.', |
465 | | -), |
| 465 | +); |
466 | 466 | |
467 | 467 | /* Sundanese (Kandar via BetaWiki) */ |
468 | | -'su' => array( |
| 468 | +$messages['su'] = array( |
469 | 469 | 'countedits' => 'Itung éditan', |
470 | 470 | 'countedits-warning' => '\'\'\'Ati-ati\'\'\': ulah nganiléy kontributor dumasar kana jumlah éditanana.', |
471 | 471 | 'countedits-username' => 'Landihan pamaké:', |
— | — | @@ -474,19 +474,19 @@ |
475 | 475 | 'countedits-resulttext' => '$1 geus nyieun $2 éditan', |
476 | 476 | 'countedits-mostactive' => 'Kontributor panggetolna', |
477 | 477 | 'countedits-nocontribs' => 'Can aya kontribusi ka ieu wiki.', |
478 | | -), |
| 478 | +); |
479 | 479 | |
480 | | -'tet' => array( |
| 480 | +$messages['tet'] = array( |
481 | 481 | 'countedits' => 'Sura edita', |
482 | 482 | 'countedits-username' => 'Naran uza-na\'in:', |
483 | 483 | 'countedits-ok' => 'OK',#identical but defined |
484 | 484 | 'countedits-nosuchuser' => 'Uza-na\'in ho naran $1 lá\'os iha ne\'e.', |
485 | 485 | 'countedits-resulttext' => '$1 edita tiha ona ba dala $2', |
486 | 486 | 'countedits-nocontribs' => 'Ema lá\'os kintribui iha wiki ne\'e.', |
487 | | -), |
| 487 | +); |
488 | 488 | |
489 | 489 | /* Cantonese (Shinjiman) */ |
490 | | -'yue' => array( |
| 490 | +$messages['yue'] = array( |
491 | 491 | 'countedits' => '編輯數', |
492 | 492 | 'countedits-warning' => "'''警告:''' 唔好只憑封面去判斷一本書。唔好以佢哋嘅編輯數去判斷一位貢獻者。", |
493 | 493 | 'countedits-username' => '用戶名:', |
— | — | @@ -496,10 +496,10 @@ |
497 | 497 | 'countedits-resulttext' => '$1有$2次編輯', |
498 | 498 | 'countedits-mostactive' => '最活躍嘅貢獻者', |
499 | 499 | 'countedits-nocontribs' => '響呢個wiki度無貢獻。', |
500 | | -), |
| 500 | +); |
501 | 501 | |
502 | 502 | /* Chinese (Simplified) (Shinjiman) */ |
503 | | -'zh-hans' => array( |
| 503 | +$messages['zh-hans'] = array( |
504 | 504 | 'countedits' => '编辑计量', |
505 | 505 | 'countedits-warning' => "'''警告:''' 不要只凭封面判断书本。不要以他们的编辑计量判断一位贡献者。", |
506 | 506 | 'countedits-username' => '用户名称:', |
— | — | @@ -509,10 +509,10 @@ |
510 | 510 | 'countedits-resulttext' => '$1有$2次编辑', |
511 | 511 | 'countedits-mostactive' => '最活跃的贡献者', |
512 | 512 | 'countedits-nocontribs' => '在这个wiki中没有贡献。', |
513 | | -), |
| 513 | +); |
514 | 514 | |
515 | 515 | /* Chinese (Traditional) (Shinjiman) */ |
516 | | -'zh-hant' => array( |
| 516 | +$messages['zh-hant'] = array( |
517 | 517 | 'countedits' => '編輯計量', |
518 | 518 | 'countedits-warning' => "'''警告:''' 不要只憑封面判斷書本。不要以幾他們的編輯計量判斷一位貢獻者。", |
519 | 519 | 'countedits-username' => '用戶名稱:', |
— | — | @@ -522,24 +522,15 @@ |
523 | 523 | 'countedits-resulttext' => '$1有$2次編輯', |
524 | 524 | 'countedits-mostactive' => '最活躍的貢獻者', |
525 | 525 | 'countedits-nocontribs' => '在這個wiki中沒有貢獻。', |
526 | | -), |
| 526 | +); |
527 | 527 | |
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 @@ |
2 | 2 | <?php |
3 | | - |
| 3 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 4 | + exit(1); |
| 5 | +} |
4 | 6 | /** |
5 | 7 | * Simple edit counter for small wikis |
6 | 8 | * |
— | — | @@ -7,47 +9,21 @@ |
8 | 10 | * @author Rob Church <robchur@gmail.com> |
9 | 11 | */ |
10 | 12 | |
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 | +); |
12 | 20 | |
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'; |
25 | 25 | |
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 @@ |
968 | 968 | } |
969 | 969 | |
970 | 970 | class CountEditsMessageGroup extends ExtensionMessageGroup { |
971 | | - protected $fileExporter = null; |
972 | 971 | protected $label = 'Count Edits'; |
973 | 972 | protected $id = 'ext-countedits'; |
974 | 973 | |
975 | | - protected $functionName = 'efCountEditsMessages'; |
| 974 | + protected $arrName = 'messages'; |
976 | 975 | protected $messageFile = 'CountEdits/CountEdits.i18n.php'; |
977 | | - |
978 | | - protected $exportStart = '\'$CODE\' => array('; |
979 | | - protected $exportPrefix= ''; |
980 | | - protected $exportLineP = "\t"; |
981 | | - protected $exportEnd = '),'; |
982 | 976 | } |
983 | 977 | |
984 | 978 | class CrossNamespaceLinksMessageGroup extends ExtensionMessageGroup { |