Index: trunk/extensions/EditSimilar/EditSimilar.i18n.php |
— | — | @@ -15,13 +15,9 @@ |
16 | 16 | $messages['en'] = array( |
17 | 17 | 'editsimilar-desc' => 'Encourages users to edit a similar page after saving a page', |
18 | 18 | 'editsimilar-thanks' => 'Thank you for your contribution. |
19 | | -Check out these related pages: $1.', |
20 | | - 'editsimilar-thanks-singleresult' => 'Thank you for your contribution. |
21 | | -Check out this related page: $1.', |
| 19 | +Check out {{PLURAL:$2|this related page|these related pages}}: $1.', |
22 | 20 | 'editsimilar-thanks-notsimilar' => 'Thank you for your contribution. |
23 | | -These pages could also use your help: $1.', |
24 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Thank you for your contribution. |
25 | | -This page could also use your help: $1.', |
| 21 | +{{PLURAL:$2|This page|These pages}} could also use your help: $1.', |
26 | 22 | 'editsimilar-thankyou' => 'Thank you for your contribution, $1!', |
27 | 23 | 'editsimilar-link-disable' => 'set preferences', |
28 | 24 | 'tog-edit-similar' => 'Enable similar pages suggestions', |
— | — | @@ -51,12 +47,8 @@ |
52 | 48 | 'editsimilar-desc' => 'يشجع المستخدمين على تعديل صفحة مشابهة بعد حفظ صفحة', |
53 | 49 | 'editsimilar-thanks' => 'شكرا لمساهمتك. |
54 | 50 | تحقق من هذه الصفحات المرتبطة: $1.', |
55 | | - 'editsimilar-thanks-singleresult' => 'شكرا لمساهمتك. |
56 | | -تحقق من هذه الصفحة المرتبطة: $1.', |
57 | 51 | 'editsimilar-thanks-notsimilar' => 'شكرا لمساهمتك. |
58 | 52 | هذه الصفحات يمكن أيضا أن تستخدم مساعدتك: $1.', |
59 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'شكرا لمساهمتك. |
60 | | -هذه الصفحة يمكن أيضا أن تستخدم مساعدتك: $1.', |
61 | 53 | 'editsimilar-thankyou' => 'شكرا لمساهمتك، $1!', |
62 | 54 | 'editsimilar-link-disable' => 'ضبط الخيارات', |
63 | 55 | 'tog-edit-similar' => 'تفعيل اقتراحات الصفحات المشابهة', |
— | — | @@ -69,12 +61,8 @@ |
70 | 62 | 'editsimilar-desc' => 'يشجع المستخدمين على تعديل صفحة مشابهة بعد حفظ صفحة', |
71 | 63 | 'editsimilar-thanks' => 'شكرا لمساهمتك. |
72 | 64 | تحقق من هذه الصفحات المرتبطة: $1.', |
73 | | - 'editsimilar-thanks-singleresult' => 'شكرا لمساهمتك. |
74 | | -تحقق من هذه الصفحة المرتبطة: $1.', |
75 | 65 | 'editsimilar-thanks-notsimilar' => 'شكرا لمساهمتك. |
76 | 66 | هذه الصفحات يمكن أيضا أن تستخدم مساعدتك: $1.', |
77 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'شكرا لمساهمتك. |
78 | | -هذه الصفحة يمكن أيضا أن تستخدم مساعدتك: $1.', |
79 | 67 | 'editsimilar-thankyou' => 'شكرا لمساهمتك، $1!', |
80 | 68 | 'editsimilar-link-disable' => 'ضبط الخيارات', |
81 | 69 | 'tog-edit-similar' => 'تفعيل اقتراحات الصفحات المشابهة', |
— | — | @@ -87,8 +75,6 @@ |
88 | 76 | 'editsimilar-desc' => 'Насърчаване на потребителите да редактират сходни страници след съхраняването на страница', |
89 | 77 | 'editsimilar-thanks' => 'Благодарности за приноса към тази страница. |
90 | 78 | Можете да прегледате и следните свързани страници: $1.', |
91 | | - 'editsimilar-thanks-singleresult' => 'Благодарности за приноса към тази страница. |
92 | | -Можете да прегледате и следната свързана страница: $1.', |
93 | 79 | 'editsimilar-thankyou' => 'Благодарности за приноса по тази страница, $1!', |
94 | 80 | 'tog-edit-similar' => 'Включване на предположенията за сходни страници', |
95 | 81 | ); |
— | — | @@ -100,12 +86,8 @@ |
101 | 87 | 'editsimilar-desc' => 'Ohrabruje korisnike za uređuju slične stranice nakon spremanja stranice', |
102 | 88 | 'editsimilar-thanks' => 'Hvala Vam za Vaš doprinos. |
103 | 89 | Pogledajte ove povezane stranice: $1.', |
104 | | - 'editsimilar-thanks-singleresult' => 'Hvala Vam za Vaš doprinos. |
105 | | -Pogledajte ovu sličnu stranicu: $1.', |
106 | 90 | 'editsimilar-thanks-notsimilar' => 'Hvala Vam za Vaš doprinos. |
107 | 91 | Ove stranice Vam također mogu pomoći: $1.', |
108 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Hvala Vam za Vaš doprinos. |
109 | | -Ova stranica Vam također može pomoći: $1.', |
110 | 92 | 'editsimilar-thankyou' => 'Korisniče $1, hvala Vam za Vaš doprinos!', |
111 | 93 | 'editsimilar-link-disable' => 'postavi postavke', |
112 | 94 | 'tog-edit-similar' => 'Omogući sugestije za slične stranice', |
— | — | @@ -120,12 +102,8 @@ |
121 | 103 | 'editsimilar-desc' => 'Schlägt Benutzern nach dem Speichern einer Seite vor, eine ähnliche Seite zu bearbeiten', |
122 | 104 | 'editsimilar-thanks' => 'Dank dir für deinen Beitrag. |
123 | 105 | Schau dir auch diese ähnlichen Seiten an: $1.', |
124 | | - 'editsimilar-thanks-singleresult' => 'Dank dir für deinen Beitrag. |
125 | | -Schau dir auch diese Seite an: $1.', |
126 | 106 | 'editsimilar-thanks-notsimilar' => 'Dank dir für deinen Beitrag. |
127 | 107 | Diese Seiten könnten dir auch hilfreich sein: $1.', |
128 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dank dir für deinen Beitrag. |
129 | | -Diese Seite könnte dir auch hilfreich sein: $1.', |
130 | 108 | 'editsimilar-thankyou' => 'Danke für deinen Beitrag, $1!', |
131 | 109 | 'editsimilar-link-disable' => 'Einstellungen setzen', |
132 | 110 | 'tog-edit-similar' => 'Vorschläge für ähnliche Seiten anzeigen', |
— | — | @@ -138,12 +116,8 @@ |
139 | 117 | 'editsimilar-desc' => 'Pózbuźujo wužywarjow pó składowanju boka pódobny bok wobźěłaś', |
140 | 118 | 'editsimilar-thanks' => 'Źěkujomy se za twój pśinosk. |
141 | 119 | Woglědaj se toś te pódobne boki: $1.', |
142 | | - 'editsimilar-thanks-singleresult' => 'Źěkujomy se za twój pśinosk. |
143 | | -Woglědaj se toś ten pódobny bok: $1.', |
144 | 120 | 'editsimilar-thanks-notsimilar' => 'Źěkujomy se za twój pśinosk. |
145 | 121 | Toś te boki by teke twóju pomoc trjebali: $1.', |
146 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Źěkujomy se za twój pśinosk. |
147 | | -Toś ten bok by teke twóju pomoc trjebał: $1', |
148 | 122 | 'editsimilar-thankyou' => 'Źěkujomy se za twój pśinosk, $1!', |
149 | 123 | 'editsimilar-link-disable' => 'preference nastajiś', |
150 | 124 | 'tog-edit-similar' => 'Naraźenja za pódobne boki zmóžniś', |
— | — | @@ -162,12 +136,8 @@ |
163 | 137 | $messages['eo'] = array( |
164 | 138 | 'editsimilar-thanks' => 'Dankon pro via kontribuo. |
165 | 139 | Jen rilataj paĝoj: $1.', |
166 | | - 'editsimilar-thanks-singleresult' => 'Dankon por via kontribuo. |
167 | | -Jen rilata paĝo: $1.', |
168 | 140 | 'editsimilar-thanks-notsimilar' => 'Dankon pro via kontribuo. |
169 | 141 | Jen paĝoj kiuj ankaŭ bezonas vian helpon: $1.', |
170 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dankon por via kontribuo. |
171 | | -Ĉi tiu paĝo ankaŭ povas uzi vian helpon: $1.', |
172 | 142 | 'editsimilar-thankyou' => 'Dankon pro via kontribuo, $1!', |
173 | 143 | 'editsimilar-link-disable' => 'fari preferojn', |
174 | 144 | ); |
— | — | @@ -179,12 +149,8 @@ |
180 | 150 | 'editsimilar-desc' => 'Animaa usuarios a editar una página similar después de grabar una página', |
181 | 151 | 'editsimilar-thanks' => 'Gracias por tu contribución. |
182 | 152 | Verifica estas páginas relacionadas: $1.', |
183 | | - 'editsimilar-thanks-singleresult' => 'Gracias por tu contribución. |
184 | | -Verifica esta página relacionada: $1.', |
185 | 153 | 'editsimilar-thanks-notsimilar' => 'Gracias por tu contribución. |
186 | 154 | Estas páginas podrían también usar tu ayuda: $1.', |
187 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Gracias por tu contribución. |
188 | | -Esta página podría también usar tu ayuda: $1.', |
189 | 155 | 'editsimilar-thankyou' => 'Gracias por tu contribución, $1!', |
190 | 156 | 'editsimilar-link-disable' => 'configurar preferencias', |
191 | 157 | 'tog-edit-similar' => 'Habilitar sugerencias de páginas similares', |
— | — | @@ -198,12 +164,8 @@ |
199 | 165 | 'editsimilar-desc' => 'Rohkaisee käyttäjiä muokkaamaan samankaltaista sivua tallennuksen jälkeen.', |
200 | 166 | 'editsimilar-thanks' => 'Kiitos muokkauksestasi. |
201 | 167 | Katso nämä aiheeseen liittyvät sivut: $1.', |
202 | | - 'editsimilar-thanks-singleresult' => 'Kiitos muokkauksestasi. |
203 | | -Katso tämä aiheeseen liittyvä sivu: $1.', |
204 | 168 | 'editsimilar-thanks-notsimilar' => 'Kiitos muokkauksestasi. |
205 | 169 | Nämä sivut voisivat myös kaivata apuasi: $1.', |
206 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Kiitos muokkauksestasi. |
207 | | -Tämä sivu voisi myös kaivata apuasi: $1.', |
208 | 170 | 'editsimilar-thankyou' => 'Kiitos muokkauksestasi, $1!', |
209 | 171 | 'editsimilar-link-disable' => 'aseta asetukset', |
210 | 172 | 'tog-edit-similar' => 'Ota käyttöön samanlaisten sivujen ehdotukset', |
— | — | @@ -219,12 +181,8 @@ |
220 | 182 | 'editsimilar-desc' => 'Encourage les utilisateurs à modifier les pages similaires après avoir publié une page', |
221 | 183 | 'editsimilar-thanks' => 'Merci pour votre contribution. |
222 | 184 | Vérifiez ces pages apparentées : $1.', |
223 | | - 'editsimilar-thanks-singleresult' => 'Merci pour votre contribution. |
224 | | -Vérifiez cette page apparentée : $1.', |
225 | 185 | 'editsimilar-thanks-notsimilar' => 'Merci pour votre contribution. |
226 | 186 | Ces pages devraient avoir, aussi, besoin de votre aide : $1.', |
227 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Merci pour votre contribution. |
228 | | -Cette page devrait avoir, aussi, besoin de votre aide : $1.', |
229 | 187 | 'editsimilar-thankyou' => 'Merci pour votre contribution, $1 !', |
230 | 188 | 'editsimilar-link-disable' => 'paramétrer les préférences', |
231 | 189 | 'tog-edit-similar' => 'Activer les suggestions des pages similaires', |
— | — | @@ -237,12 +195,8 @@ |
238 | 196 | 'editsimilar-desc' => 'Anima aos usuarios a editar páxinas similares despois de gardar unha páxina', |
239 | 197 | 'editsimilar-thanks' => 'Grazas pola súa contribución. |
240 | 198 | Comprobe estas páxinas relacionadas: $1.', |
241 | | - 'editsimilar-thanks-singleresult' => 'Grazas pola súa contribución. |
242 | | -Comprobe esta páxina relacionada: $1.', |
243 | 199 | 'editsimilar-thanks-notsimilar' => 'Grazas pola súa contribución. |
244 | 200 | Estas páxinas poden precisar tamén da súa axuda: $1.', |
245 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Grazas pola súa contribución. |
246 | | -Esta páxina pode tamén precisar da súa axuda: $1.', |
247 | 201 | 'editsimilar-thankyou' => 'Grazas pola súa contribución, $1!', |
248 | 202 | 'editsimilar-link-disable' => 'fixar as preferencias', |
249 | 203 | 'tog-edit-similar' => 'Permitir suxestións de páxinas similares', |
— | — | @@ -262,12 +216,8 @@ |
263 | 217 | 'editsimilar-desc' => 'Schlat Benutzer noch em Spychere vun ere Syte vor, e ähnligi Syte z bearbeite', |
264 | 218 | 'editsimilar-thanks' => 'Dankschen fir Dyy Byytrag. |
265 | 219 | Lueg au die ähnlige Syte aa: $1.', |
266 | | - 'editsimilar-thanks-singleresult' => 'Dankschen fir Dyy Byytrag. |
267 | | -Lueg au die Syten aa: $1.', |
268 | 220 | 'editsimilar-thanks-notsimilar' => 'Dankschen fir Dyy Byytrag. |
269 | 221 | Die Syte chennte au ne Hilf syy: $1.', |
270 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dankschen fir Dyy Byytrag. |
271 | | -Die Syte chennte au ne Hilf syy: $1.', |
272 | 222 | 'editsimilar-thankyou' => 'Dankschen fir Dyy Byytrag, $1!', |
273 | 223 | 'editsimilar-link-disable' => 'Yystellige setze', |
274 | 224 | 'tog-edit-similar' => 'Vorschleg fir ähnligi Syten aazeige', |
— | — | @@ -281,12 +231,8 @@ |
282 | 232 | 'editsimilar-desc' => 'עידוד המשתמשים לערוך דפים דומים לאחר שמירת דף', |
283 | 233 | 'editsimilar-thanks' => 'תודה על תרומתכם. |
284 | 234 | אנא עיינו בדפים קשורים אלו: $1.', |
285 | | - 'editsimilar-thanks-singleresult' => 'תודה על תרומתכם. |
286 | | -אנא עיינו בדף קשור זה: $1.', |
287 | 235 | 'editsimilar-thanks-notsimilar' => 'תודה לכם על תרומתכם. |
288 | 236 | ייתכן שדפים אלו זקוקים לעזרתכם גם כן: $1.', |
289 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'תודה לכם על תרומתכם. |
290 | | -ייתכן שדף זה זקוק לעזרתכם גם כן: $1.', |
291 | 237 | 'editsimilar-thankyou' => 'תודה לך על תרומתך, $1!', |
292 | 238 | 'editsimilar-link-disable' => 'הגדרת העדפות', |
293 | 239 | 'tog-edit-similar' => 'הצגת הצעות בנוגע לדפים דומים', |
— | — | @@ -299,12 +245,8 @@ |
300 | 246 | 'editsimilar-desc' => 'Pozbudźuješ wužiwarjow po składowanju strony podobnu stronu wobdźěłać', |
301 | 247 | 'editsimilar-thanks' => 'Dźakujemy so za twój přinošk. |
302 | 248 | Wobhladaj sej tute přiwuzne strony: $1', |
303 | | - 'editsimilar-thanks-singleresult' => 'Dźakujemy so za twój přinošk. |
304 | | -Wobhladaj sej tutu přiwuznu stronu: $1.', |
305 | 249 | 'editsimilar-thanks-notsimilar' => 'Dźakujemy so za twój přinošk. |
306 | 250 | Tute strony bychu tež twoju pomoc trjebali: $1.', |
307 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dźakujemy so za twój přinošk. |
308 | | -Tuta strona by tež twoju pomoc trjebała: $1.', |
309 | 251 | 'editsimilar-thankyou' => 'Dźakujemy so za twój přinošk, $1!', |
310 | 252 | 'editsimilar-link-disable' => 'Preferency nastajić', |
311 | 253 | 'tog-edit-similar' => 'Namjety za podobne strony zmóžnić', |
— | — | @@ -317,12 +259,8 @@ |
318 | 260 | 'editsimilar-desc' => 'Lap elmentése után hasonló oldalak szerkesztését javasolja a szerkesztőknek', |
319 | 261 | 'editsimilar-thanks' => 'Köszönjük a szerkesztésedet. |
320 | 262 | Nézd meg ezeket a kapcsolódó lapokat: $1.', |
321 | | - 'editsimilar-thanks-singleresult' => 'Köszönjük a szerkesztésedet. |
322 | | -Nézd meg ezt a kapcsolódó lapot: $1.', |
323 | 263 | 'editsimilar-thanks-notsimilar' => 'Köszönjük a szerkesztésedet. |
324 | 264 | Ezeknél a lapoknál is segítségedet vehetjük: $1.', |
325 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Köszönjük a szerkesztésedet. |
326 | | -Ennél a lapnál is segítségedet vehetjük: $1.', |
327 | 265 | 'editsimilar-thankyou' => 'Köszönjük a szerkesztésedet, $1!', |
328 | 266 | 'editsimilar-link-disable' => 'beállítás', |
329 | 267 | 'tog-edit-similar' => 'Hasonló oldalak javasolása', |
— | — | @@ -335,12 +273,8 @@ |
336 | 274 | 'editsimilar-desc' => 'Incoragia le usatores a modificar un pagina similar post haber publicate un pagina', |
337 | 275 | 'editsimilar-thanks' => 'Gratias pro tu contribution. |
338 | 276 | Examina iste paginas connexe: $1.', |
339 | | - 'editsimilar-thanks-singleresult' => 'Gratias pro tu contribution. |
340 | | -Examina iste pagina connexe: $1.', |
341 | 277 | 'editsimilar-thanks-notsimilar' => 'Gratias pro tu contribution. |
342 | 278 | Etiam iste paginas poterea haber beneficio de tu adjuta: $1.', |
343 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Gratias pro tu contribution. |
344 | | -Etiam iste pagina poterea haber beneficio de tu adjuta: $1.', |
345 | 279 | 'editsimilar-thankyou' => 'Gratias pro tu contribution, $1!', |
346 | 280 | 'editsimilar-link-disable' => 'definir preferentias', |
347 | 281 | 'tog-edit-similar' => 'Activar le suggestiones de paginas similar', |
— | — | @@ -353,12 +287,8 @@ |
354 | 288 | 'editsimilar-desc' => 'Incoraggia gli utenti a modificare pagine simili dopo aver salvato una pagina', |
355 | 289 | 'editsimilar-thanks' => 'Grazie per il tuo contributo. |
356 | 290 | Guarda anche queste pagine correlate: $1.', |
357 | | - 'editsimilar-thanks-singleresult' => 'Grazie per il tuo contributo. |
358 | | -Guarda anche questa pagina correlate: $1.', |
359 | 291 | 'editsimilar-thanks-notsimilar' => 'Grazie per il tuo contributo. |
360 | 292 | Anche queste pagine potrebbero usufruire del tuo aiuto: $1.', |
361 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Grazie per il tuo contributo. |
362 | | -Anche questa pagina potrebbe usufruire del tuo aiuto: $1.', |
363 | 293 | 'editsimilar-thankyou' => 'Grazie per il tuo contributo, $1!', |
364 | 294 | 'editsimilar-link-disable' => 'imposta preferenze', |
365 | 295 | 'tog-edit-similar' => 'Attiva suggerimenti di pagine simili', |
— | — | @@ -370,9 +300,7 @@ |
371 | 301 | $messages['ja'] = array( |
372 | 302 | 'editsimilar-desc' => '利用者がページを保存した後に、類似のページを編集するよう勧める', |
373 | 303 | 'editsimilar-thanks' => '投稿ありがとうございます。関連するこれらのページにも目を通してみてください: $1。', |
374 | | - 'editsimilar-thanks-singleresult' => '投稿ありがとうございます。関連するこのページにも目を通してみてください: $1。', |
375 | 304 | 'editsimilar-thanks-notsimilar' => '投稿ありがとうございます。これらのページにもあなたの助けが活かせるかもしれません: $1。', |
376 | | - 'editsimilar-thanks-notsimilar-singleresult' => '投稿ありがとうございます。このページにもあなたの助けが活かせるかもしれません: $1。', |
377 | 305 | 'editsimilar-thankyou' => '$1さん、投稿ありがとうございます!', |
378 | 306 | 'editsimilar-link-disable' => '設定する', |
379 | 307 | 'tog-edit-similar' => '類似ページの提案を有効にする', |
— | — | @@ -394,12 +322,8 @@ |
395 | 323 | 'editsimilar-desc' => 'Schläät de Metmaacher vör, en äänlijje Sigg ze beärrbeide, nohdämm se en Sigg afjespeischert han.', |
396 | 324 | 'editsimilar-thanks' => 'Danke för Dinge Beidraach. |
397 | 325 | Donn och ens op hee di Sigge loore: $1.', |
398 | | - 'editsimilar-thanks-singleresult' => 'Danke för Dinge Beidraach. |
399 | | -Donn och ens op hee di Sigg loore: $1.', |
400 | 326 | 'editsimilar-thanks-notsimilar' => 'Danke för Dinge Beidraach. |
401 | 327 | Hee di Sigge künnte och joot fö Desch sin: $1.', |
402 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Danke för Dinge Beidraach. |
403 | | -Hee di Sigg künnt och joot fö Desch sin: $1.', |
404 | 328 | 'editsimilar-thankyou' => 'Danke för Dinge Beidraach, $1.', |
405 | 329 | 'editsimilar-link-disable' => 'Enstellunge maache', |
406 | 330 | 'tog-edit-similar' => 'Vörschlääsch för äänlijje Sigge aanschallde', |
— | — | @@ -411,12 +335,8 @@ |
412 | 336 | $messages['lb'] = array( |
413 | 337 | 'editsimilar-desc' => "Ermontert Benotzer fir ähnlech Säiten z'änneren nodeem se eng Säit gespäichert hunn.", |
414 | 338 | 'editsimilar-thanks' => 'Merci fir är Kontributioun. Kuckt dës Säiten (déi a Verbindung zu däer stinn un däer Dir elo grad geschafft hutt) w.e.g. och no: $1', |
415 | | - 'editsimilar-thanks-singleresult' => 'Merci fir är Kontributioun. |
416 | | -Kuckt dës Säit (déi a Verbindung zu däer steet un däer Dir elo grad geschafft hutt) w.e.g. och no: $1', |
417 | 339 | 'editsimilar-thanks-notsimilar' => 'Merci fir är Kontributioun. |
418 | 340 | Dës Säite kéinten och vun ärer Hellëf profitéieren: $1', |
419 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Merci fir är Kontributioun. |
420 | | -DËs Säit kéint och vun ärer Hellëf profitéieren: $1.', |
421 | 341 | 'editsimilar-thankyou' => 'Merci fir är Kontributioun, $1!', |
422 | 342 | 'editsimilar-link-disable' => "D'Astellungen aginn", |
423 | 343 | 'tog-edit-similar' => 'Virschloe vun ähnleche Säiten aschalten', |
— | — | @@ -429,12 +349,8 @@ |
430 | 350 | 'editsimilar-desc' => "Moedigt gebruikers aan om gelijksoortige pagina's te bewerken na het opslaan van een pagina", |
431 | 351 | 'editsimilar-thanks' => "Dank u wel voor uw bijdrage. |
432 | 352 | Deze pagina's kunnen uw hulp ook gebruiken: $1.", |
433 | | - 'editsimilar-thanks-singleresult' => 'Dank u wel voor uw bijdrage. |
434 | | -De pagina $1 kan uw hulp ook gebruiken.', |
435 | 353 | 'editsimilar-thanks-notsimilar' => "Dank u wel voor uw bijdrage. |
436 | 354 | Deze pagina's kunnen uw hulp ook gebruiken: $1.", |
437 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dank u wel voor uw bijdrage. |
438 | | -De pagina $1 kan uw hulp ook gebruiken.', |
439 | 355 | 'editsimilar-thankyou' => 'Dank u wel voor uw bijdrage, $1!', |
440 | 356 | 'editsimilar-link-disable' => 'voorkeuren instellen', |
441 | 357 | 'tog-edit-similar' => 'Gelijksoortige paginasuggesties inschakelen', |
— | — | @@ -447,12 +363,8 @@ |
448 | 364 | 'editsimilar-desc' => 'Oppfordrar brukarar til å endra liknande sider etter å ha lagra ei sida', |
449 | 365 | 'editsimilar-thanks' => 'Takk for bidraget ditt. |
450 | 366 | Sjekk desse relaterte sidene: $1.', |
451 | | - 'editsimilar-thanks-singleresult' => 'Takk for bidraget ditt. |
452 | | -Sjekk denne relaterte sida: $1.', |
453 | 367 | 'editsimilar-thanks-notsimilar' => 'Takk for bidraget ditt. |
454 | 368 | Desse sidene kan òg trenga hjelpa di: $1.', |
455 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Takk for bidraget ditt. |
456 | | -Denne sida kan òg trenga hjelpa di: $1.', |
457 | 369 | 'editsimilar-thankyou' => 'Takk for bidraget ditt, $1!', |
458 | 370 | 'editsimilar-link-disable' => 'endra innstillingar', |
459 | 371 | 'tog-edit-similar' => 'Slå på forslag for liknande sider', |
— | — | @@ -465,12 +377,8 @@ |
466 | 378 | 'editsimilar-desc' => 'Oppfordrer brukere til å redigere lignende sider etter å ha lagret en side', |
467 | 379 | 'editsimilar-thanks' => 'Takk for bidraget ditt. |
468 | 380 | Sjekk disse relaterte sidene: $1.', |
469 | | - 'editsimilar-thanks-singleresult' => 'Takk for bidraget ditt. |
470 | | -Sjekk denne relaterte siden: $1.', |
471 | 381 | 'editsimilar-thanks-notsimilar' => 'Takk for bidraget ditt. |
472 | 382 | Disse sidene kan også trenge din hjelp: $1.', |
473 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Takk for bidraget ditt. |
474 | | -Denne siden kunne også trenge din hjelp: $1.', |
475 | 383 | 'editsimilar-thankyou' => 'Takk for bidraget ditt, $1!', |
476 | 384 | 'editsimilar-link-disable' => 'endre innstillinger', |
477 | 385 | 'tog-edit-similar' => 'Slå på forslag for lignende sider', |
— | — | @@ -483,12 +391,8 @@ |
484 | 392 | 'editsimilar-desc' => 'Encoraja los utilizaires a modificar las paginas similaras aprèp aver salvada una pagina', |
485 | 393 | 'editsimilar-thanks' => 'Mercés per vòstra contribucion. |
486 | 394 | Verificatz aquestas paginas aparentadas : $1.', |
487 | | - 'editsimilar-thanks-singleresult' => 'Mercés per vòstra contribucion. |
488 | | -Verificatz aquesta pagina aparentada : $1.', |
489 | 395 | 'editsimilar-thanks-notsimilar' => 'Mercés per vòstra contribucion. |
490 | 396 | Aquestas paginas deurián aver, elas tanben, besonh de vòstra ajuda : $1.', |
491 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Mercés per vòstra contribucion. |
492 | | -Aquesta pagina deuriá aver, ela tanben, besonh de vòstra ajuda : $1.', |
493 | 397 | 'editsimilar-thankyou' => 'Mercés per vòstra contribucion, $1 !', |
494 | 398 | 'editsimilar-link-disable' => 'parametrar las preferéncias', |
495 | 399 | 'tog-edit-similar' => 'Activar las suggestions similaras de las paginas', |
— | — | @@ -504,12 +408,8 @@ |
505 | 409 | 'editsimilar-desc' => 'Zachęca do edycji podobnego artykułu po zapisaniu strony', |
506 | 410 | 'editsimilar-thanks' => 'Dzięki za edycję! |
507 | 411 | Zerknij też na podobne artykuły: $1.', |
508 | | - 'editsimilar-thanks-singleresult' => 'Dzięki za edycję! |
509 | | -Zerknij też na ten podobny artykuł: $1.', |
510 | 412 | 'editsimilar-thanks-notsimilar' => 'Dzięki za edycję! |
511 | 413 | Te artykuły również mogą potrzebować twojej pomocy: $1.', |
512 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Dzięki za edycję! |
513 | | -Ten artykuł również może potrzebować twojej pomocy: $1.', |
514 | 414 | 'editsimilar-thankyou' => 'Dzięki za Twoją edycję, $1!', |
515 | 415 | 'editsimilar-link-disable' => 'zmień ustawienia', |
516 | 416 | 'tog-edit-similar' => 'Włącz sugestie edycji podobnych artykułów', |
— | — | @@ -522,12 +422,8 @@ |
523 | 423 | 'editsimilar-desc' => 'Encoraja os utilizadores a editarem uma página semelhante depois de gravar uma página', |
524 | 424 | 'editsimilar-thanks' => 'Obrigado pela sua contribuição. |
525 | 425 | Espreite estas páginas relacionadas: $1.', |
526 | | - 'editsimilar-thanks-singleresult' => 'Obrigado pela sua contribuição. |
527 | | -Espreite esta página relacionada: $1.', |
528 | 426 | 'editsimilar-thanks-notsimilar' => 'Obrigado pela sua contribuição. |
529 | 427 | Estas páginas também poderiam beneficiar da sua ajuda: $1.', |
530 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Obrigado pela sua contribuição. |
531 | | -Esta página também poderia beneficiar da sua ajuda: $1.', |
532 | 428 | 'editsimilar-thankyou' => 'Obrigado pela sua contribuição, $1!', |
533 | 429 | 'editsimilar-link-disable' => 'configurar preferências', |
534 | 430 | 'tog-edit-similar' => 'Activar sugestões de páginas semelhantes', |
— | — | @@ -540,12 +436,8 @@ |
541 | 437 | 'editsimilar-desc' => 'Encoraja os utilizadores a editarem uma página semelhante depois de gravar uma página', |
542 | 438 | 'editsimilar-thanks' => 'Obrigado pela sua contribuição. |
543 | 439 | Veja estas páginas relacionadas: $1.', |
544 | | - 'editsimilar-thanks-singleresult' => 'Obrigado pela sua contribuição. |
545 | | -Veja esta página relacionada: $1.', |
546 | 440 | 'editsimilar-thanks-notsimilar' => 'Obrigado pela sua contribuição. |
547 | 441 | Estas páginas também poderiam ser beneficiadas por sua ajuda: $1.', |
548 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Obrigado pela sua contribuição. |
549 | | -Esta página também poderia ser beneficiada por sua ajuda: $1.', |
550 | 442 | 'editsimilar-thankyou' => 'Obrigado pela sua contribuição, $1!', |
551 | 443 | 'editsimilar-link-disable' => 'configurar preferências', |
552 | 444 | 'tog-edit-similar' => 'Ativar sugestões de páginas semelhantes', |
— | — | @@ -558,12 +450,8 @@ |
559 | 451 | 'editsimilar-desc' => 'Încurajează utilizatorii să modifice o pagină similară după salvearea unei pagini', |
560 | 452 | 'editsimilar-thanks' => 'Vă mulţumim pentru contribuţia dumneavoastră. |
561 | 453 | Vizitaţi şi paginile conexe: $1.', |
562 | | - 'editsimilar-thanks-singleresult' => 'Vă mulţumim pentru contribuţia dumneavoastră. |
563 | | -Vizitaţi şi pagina conexă: $1.', |
564 | 454 | 'editsimilar-thanks-notsimilar' => 'Vă mulţumim pentru contribuţia dumneavoastră. |
565 | 455 | Şi aceste pagini ar avea nevoie de ajutorul dumneavoastră: $1.', |
566 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Vă mulţumim pentru contribuţia dumneavoastră. |
567 | | -Şi această pagină ar putea avea nevoie de ajutorul dumneavoastră: $1.', |
568 | 456 | 'editsimilar-thankyou' => 'Mulţumim pentru contribuţia dumneaovastră, $1!', |
569 | 457 | 'tog-edit-similar' => 'Activează sugestiile paginilor similare', |
570 | 458 | ); |
— | — | @@ -574,8 +462,6 @@ |
575 | 463 | $messages['ru'] = array( |
576 | 464 | 'editsimilar-thanks' => 'Спасибо за ваш вклад. |
577 | 465 | Проверьте эти связанные страницы: $1.', |
578 | | - 'editsimilar-thanks-singleresult' => 'Спасибо за ваш вклад. |
579 | | -Проверьте эту связанную страницу: $1.', |
580 | 466 | 'editsimilar-thankyou' => 'Спасибо за ваш вклад, $1!', |
581 | 467 | ); |
582 | 468 | |
— | — | @@ -586,12 +472,8 @@ |
587 | 473 | 'editsimilar-desc' => 'Posmeľuje používateľov upravovať podobné stránky po uložení.', |
588 | 474 | 'editsimilar-thanks' => 'Ďakujeme za váš príspevok. |
589 | 475 | Pozrite sa na tieto súvisiace stránky: $1.', |
590 | | - 'editsimilar-thanks-singleresult' => 'Ďakujeme za váš príspevok. |
591 | | -Pozrite sa na túto súvisiacu stránku: $1.', |
592 | 476 | 'editsimilar-thanks-notsimilar' => 'Ďakujeme za váš príspevok. |
593 | 477 | Týmto stránkam by sa tiež hodilo, keby ste sa na ne pozreli: $1.', |
594 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Ďakujeme za váš príspevok. |
595 | | -Tejto stránke by sa tiež hodilo, keby ste sa na ňu pozreli: $1.', |
596 | 478 | 'editsimilar-thankyou' => 'Ďakujeme za váš príspevok, $1!', |
597 | 479 | 'editsimilar-link-disable' => 'nastaviť voľby', |
598 | 480 | 'tog-edit-similar' => 'Zapnúť návrhy podobných stránok', |
— | — | @@ -604,12 +486,8 @@ |
605 | 487 | 'editsimilar-desc' => 'Uppmuntrar användare att redigera liknande sidor efter att ha sparat en sida', |
606 | 488 | 'editsimilar-thanks' => 'Tack för ditt bidrag. |
607 | 489 | Kolla dessa relaterade sidor: $1.', |
608 | | - 'editsimilar-thanks-singleresult' => 'Tack för ditt bidrag. |
609 | | -Kolla denna relaterade sida: $1.', |
610 | 490 | 'editsimilar-thanks-notsimilar' => 'Tack för ditt bidrag. |
611 | 491 | Dessa sidor kan också behöva din hjälp: $1.', |
612 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Tack för ditt bidrag. |
613 | | -Den här sidan kan också behöva din hjälp: $1.', |
614 | 492 | 'editsimilar-thankyou' => 'Tack för ditt bidrag, $1!', |
615 | 493 | 'editsimilar-link-disable' => 'ändra inställningar', |
616 | 494 | 'tog-edit-similar' => 'Slå på förslag för liknande sidor', |
— | — | @@ -622,12 +500,8 @@ |
623 | 501 | 'editsimilar-desc' => 'Humihimok sa mga tagagamit na bumago ng isang katulad na pahina pagkaraan magsagip ng isang pahina', |
624 | 502 | 'editsimilar-thanks' => 'Salamat sa iyong ambag. |
625 | 503 | Suriin ang kaugnay na mga pahinang ito: $1.', |
626 | | - 'editsimilar-thanks-singleresult' => 'Salamat sa iyong ambag. |
627 | | -Suriin ang kaugnay na pahinang ito: $1.', |
628 | | - 'editsimilar-thanks-notsimilar' => 'Salamat sa iyong ambag. |
| 504 | + 'editsimilar-thanks-notsimilar' => 'Salamat sa iyong ambag. |
629 | 505 | Mapapakinabangan din ng mga pahinang ito ang tulong mo: $1.', |
630 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Salamat sa iyong ambag. |
631 | | -Mapapakinabangan din ng pahinang ito ang tulong mo: $1.', |
632 | 506 | 'editsimilar-thankyou' => 'Salamat sa iyong ambag, $1!', |
633 | 507 | 'editsimilar-link-disable' => 'itakda ang mga kagustuhan', |
634 | 508 | 'tog-edit-similar' => 'Paganahin ang mga mungkahi para sa katulad na mga pahina', |
— | — | @@ -648,14 +522,9 @@ |
649 | 523 | 'editsimilar-desc' => 'Khuyến khích người dùng sửa đổi một trang tương tự sau khi đã lưu một trang', |
650 | 524 | 'editsimilar-thanks' => 'Cảm ơn vì sự đóng góp của bạn. |
651 | 525 | Mời bạn xem qua các trang tương tự: $1.', |
652 | | - 'editsimilar-thanks-singleresult' => 'Cảm ơn vì sự đóng góp của bạn. |
653 | | -Mời xem qua trang tương tự sau: $1.', |
654 | 526 | 'editsimilar-thanks-notsimilar' => 'Cảm ơn vì sự đóng góp của bạn. |
655 | 527 | Bạn cũng có thể giúp đỡ những trang sau: $1.', |
656 | | - 'editsimilar-thanks-notsimilar-singleresult' => 'Cảm ơn vì sự đóng góp của bạn. |
657 | | -Bạn cũng có thể giúp đỡ trang: $1.', |
658 | 528 | 'editsimilar-thankyou' => 'Cảm ơn về sự đóng góp của $1!', |
659 | 529 | 'editsimilar-link-disable' => 'tùy chọn', |
660 | 530 | 'tog-edit-similar' => 'Kích hoạt đề nghị về trang tương tự', |
661 | 531 | ); |
662 | | - |
Index: trunk/extensions/EditSimilar/EditSimilar.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
12 | 12 | */ |
13 | 13 | |
14 | | -if( !defined( 'MEDIAWIKI' ) ) |
| 14 | +if ( !defined( 'MEDIAWIKI' ) ) |
15 | 15 | die( "This is not a valid entry point.\n" ); |
16 | 16 | |
17 | 17 | // Internationalization file |
— | — | @@ -35,13 +35,15 @@ |
36 | 36 | $wgExtensionCredits['other'][] = array( |
37 | 37 | 'path' => __FILE__, |
38 | 38 | 'name' => 'EditSimilar', |
39 | | - 'version' => '1.18', |
| 39 | + 'version' => '1.19', |
40 | 40 | 'author' => array( 'Bartek Łapiński', 'Łukasz Garczewski' ), |
41 | 41 | 'url' => 'http://www.mediawiki.org/wiki/Extension:EditSimilar', |
42 | | - 'description' => 'Encourages users to edit an article similar (by categories) to the one they just had edited.', |
| 42 | + 'description' => 'Encourages users to edit a page similar (by categories) to the one they just had edited.', |
43 | 43 | 'descriptionmsg' => 'editsimilar-desc', |
44 | 44 | ); |
45 | 45 | |
| 46 | +// FIXME: split off into a separate class file. Saves time and resources on init. |
| 47 | + |
46 | 48 | /* |
47 | 49 | How this extension works: |
48 | 50 | - upon save, the script searches for articles that are similar |
— | — | @@ -86,13 +88,13 @@ |
87 | 89 | // fetch categories marked as 'stub categories' |
88 | 90 | function getStubCategories() { |
89 | 91 | $stub_categories = wfMsgForContent( 'EditSimilar-Categories' ); |
90 | | - if ( ('<EditSimilar-Categories>' == $stub_categories) || ('' == $stub_categories) || ('-' == $stub_categories) ) { |
| 92 | + if ( ( '<EditSimilar-Categories>' == $stub_categories ) || ( '' == $stub_categories ) || ( '-' == $stub_categories ) ) { |
91 | 93 | return false; |
92 | 94 | } else { |
93 | 95 | $lines = preg_split( "/\*/", $stub_categories ); |
94 | 96 | $normalised_lines = array(); |
95 | 97 | array_shift( $lines ); |
96 | | - foreach( $lines as $line ) { |
| 98 | + foreach ( $lines as $line ) { |
97 | 99 | $normalised_lines[] = str_replace( ' ', '_', trim( $line ) ); |
98 | 100 | } |
99 | 101 | return $normalised_lines; |
— | — | @@ -103,7 +105,7 @@ |
104 | 106 | function getSimilarArticles() { |
105 | 107 | global $wgUser, $wgEditSimilarMaxResultsToDisplay; |
106 | 108 | |
107 | | - if( empty( $this->mAttentionMarkers ) || !$this->mAttentionMarkers ) { |
| 109 | + if ( empty( $this->mAttentionMarkers ) || !$this->mAttentionMarkers ) { |
108 | 110 | return false; |
109 | 111 | } |
110 | 112 | $text = ''; |
— | — | @@ -112,23 +114,23 @@ |
113 | 115 | |
114 | 116 | while ( ( count( $articles ) < $wgEditSimilarMaxResultsToDisplay ) && ( $x < count( $this->mAttentionMarkers ) ) ) { |
115 | 117 | $articles = array_merge( $articles, $this->getResults( $this->mAttentionMarkers[$x] ) ); |
116 | | - if( !empty( $articles ) ) { |
| 118 | + if ( !empty( $articles ) ) { |
117 | 119 | $articles = array_unique( $articles ); |
118 | 120 | } |
119 | 121 | $x++; |
120 | 122 | } |
121 | 123 | |
122 | | - if( empty( $articles ) ) { |
| 124 | + if ( empty( $articles ) ) { |
123 | 125 | $articles = $this->getAdditionalCheck(); |
124 | 126 | // second check to make sure we have anything to display |
125 | | - if( empty( $articles ) ) { |
| 127 | + if ( empty( $articles ) ) { |
126 | 128 | return false; |
127 | 129 | } |
128 | 130 | $articles = array_unique( $articles ); |
129 | 131 | $this->mSimilarArticles = false; |
130 | 132 | } |
131 | 133 | |
132 | | - if( 1 == count( $articles ) ) { // in this case, array_rand returns a single element, not an array |
| 134 | + if ( 1 == count( $articles ) ) { // in this case, array_rand returns a single element, not an array |
133 | 135 | $rand_articles = array( 0 ); |
134 | 136 | } else { |
135 | 137 | $rand_articles = array_rand( $articles, min( $wgEditSimilarMaxResultsToDisplay, count( $articles ) ) ); |
— | — | @@ -137,17 +139,17 @@ |
138 | 140 | $skinname = get_class( $sk ); |
139 | 141 | $skinname = strtolower( substr( $skinname, 4 ) ); |
140 | 142 | $real_rand_values = array(); |
141 | | - if( empty( $rand_articles ) ) { |
| 143 | + if ( empty( $rand_articles ) ) { |
142 | 144 | return false; |
143 | 145 | } |
144 | 146 | |
145 | 147 | $translated_titles = array(); |
146 | | - foreach( $rand_articles as $r_key => $rand_article_key ) { |
| 148 | + foreach ( $rand_articles as $r_key => $rand_article_key ) { |
147 | 149 | $translated_titles[] = $articles [$rand_article_key]; |
148 | 150 | } |
149 | 151 | $translated_titles = $this->idsToTitles( $translated_titles ); |
150 | 152 | |
151 | | - foreach( $translated_titles as $link_title ) { |
| 153 | + foreach ( $translated_titles as $link_title ) { |
152 | 154 | $article_link = $sk->makeKnownLinkObj( $link_title ); |
153 | 155 | $real_rand_values[] = $article_link; |
154 | 156 | } |
— | — | @@ -158,7 +160,7 @@ |
159 | 161 | // extract all categories our base article is in |
160 | 162 | function getBaseCategories() { |
161 | 163 | global $wgEditSimilarMaxResultsToDisplay; |
162 | | - if( empty( $this->mAttentionMarkers ) || !$this->mAttentionMarkers ) { |
| 164 | + if ( empty( $this->mAttentionMarkers ) || !$this->mAttentionMarkers ) { |
163 | 165 | return false; |
164 | 166 | } |
165 | 167 | |
— | — | @@ -174,13 +176,13 @@ |
175 | 177 | 'USE_INDEX' => 'cl_from' |
176 | 178 | ) |
177 | 179 | ); |
178 | | - while( $x = $dbr->fetchObject( $res ) ) { |
179 | | - if( !in_array( $x->cl_to, $this->mAttentionMarkers ) ) { |
| 180 | + while ( $x = $dbr->fetchObject( $res ) ) { |
| 181 | + if ( !in_array( $x->cl_to, $this->mAttentionMarkers ) ) { |
180 | 182 | $result_array [] = $x->cl_to; |
181 | 183 | } |
182 | 184 | } |
183 | 185 | |
184 | | - if( !empty( $result_array ) ) { |
| 186 | + if ( !empty( $result_array ) ) { |
185 | 187 | return $result_array; |
186 | 188 | } else { |
187 | 189 | return false; |
— | — | @@ -199,7 +201,7 @@ |
200 | 202 | $dbr = wfGetDB( DB_SLAVE ); |
201 | 203 | |
202 | 204 | $fixed_names = array(); |
203 | | - foreach( $this->mAttentionMarkers as $category ) { |
| 205 | + foreach ( $this->mAttentionMarkers as $category ) { |
204 | 206 | $fixed_names[] = $dbr->addQuotes( $category ); |
205 | 207 | } |
206 | 208 | $stringed_names = implode( ",", $fixed_names ); |
— | — | @@ -212,8 +214,8 @@ |
213 | 215 | ); |
214 | 216 | |
215 | 217 | $result_array = array(); |
216 | | - while( $x = $dbr->fetchObject( $res ) ) { |
217 | | - if( $this->mBaseArticle != $x->cl_from ) { |
| 218 | + while ( $x = $dbr->fetchObject( $res ) ) { |
| 219 | + if ( $this->mBaseArticle != $x->cl_from ) { |
218 | 220 | $result_array[] = $x->cl_from; |
219 | 221 | } |
220 | 222 | } |
— | — | @@ -237,7 +239,7 @@ |
238 | 240 | $result_array = array(); |
239 | 241 | |
240 | 242 | // so for now, to speed things up, just discard results from other namespaces (and subpages) |
241 | | - while( ( $x = $dbr->fetchObject( $res ) ) |
| 243 | + while ( ( $x = $dbr->fetchObject( $res ) ) |
242 | 244 | && ( in_array( $x->page_namespace, $wgContentNamespaces ) ) |
243 | 245 | && false === strpos( $x->page_title, "/" ) ) { |
244 | 246 | $result_array[] = Title::makeTitle( $x->page_namespace, $x->page_title ); |
— | — | @@ -253,26 +255,26 @@ |
254 | 256 | $title = Title::makeTitle( NS_CATEGORY, $marker_category ); |
255 | 257 | $result_array = array(); |
256 | 258 | |
257 | | - if( empty( $this->mBaseCategories ) ) { |
| 259 | + if ( empty( $this->mBaseCategories ) ) { |
258 | 260 | return $result_array; |
259 | 261 | } |
260 | 262 | |
261 | 263 | $query = "SELECT c1.cl_from |
262 | 264 | FROM {$dbr->tableName( 'categorylinks' )} AS c1, {$dbr->tableName( 'categorylinks' )} AS c2 |
263 | 265 | WHERE c1.cl_from = c2.cl_from |
264 | | - AND c1.cl_to = " .$dbr->addQuotes( $title->getDBkey() ) . " |
| 266 | + AND c1.cl_to = " . $dbr->addQuotes( $title->getDBkey() ) . " |
265 | 267 | AND c2.cl_to IN ("; |
266 | 268 | |
267 | 269 | $fixed_names = array(); |
268 | | - foreach( $this->mBaseCategories as $category ) { |
| 270 | + foreach ( $this->mBaseCategories as $category ) { |
269 | 271 | $fixed_names[] = $dbr->addQuotes( $category ); |
270 | 272 | } |
271 | 273 | $stringed_names = implode( ",", $fixed_names ); |
272 | 274 | $query .= $stringed_names . ")"; |
273 | 275 | |
274 | 276 | $res = $dbr->query( $query, __METHOD__ ); |
275 | | - while( $x = $dbr->fetchObject( $res ) ) { |
276 | | - if( $this->mBaseArticle != $x->cl_from ) { |
| 277 | + while ( $x = $dbr->fetchObject( $res ) ) { |
| 278 | + if ( $this->mBaseArticle != $x->cl_from ) { |
277 | 279 | $result_array[] = $x->cl_from; |
278 | 280 | } |
279 | 281 | } |
— | — | @@ -285,7 +287,7 @@ |
286 | 288 | static public function showMessage( $text ) { |
287 | 289 | global $wgOut, $wgUser, $wgScript, $wgScriptPath; |
288 | 290 | $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/EditSimilar/EditSimilar.css' ); |
289 | | - if( $wgUser->isLoggedIn() ) { |
| 291 | + if ( $wgUser->isLoggedIn() ) { |
290 | 292 | $link = '<div class="editsimilar_dismiss">[<span class="plainlinks"><a href="' . $wgScript . '?title=Special:Preferences#prefsection-4" id="editsimilar_preferences">' . wfMsg( 'editsimilar-link-disable' ) . '</a></span>]</div><div style="display:block"> </div>'; |
291 | 293 | } else { |
292 | 294 | $link = ''; |
— | — | @@ -296,9 +298,9 @@ |
297 | 299 | // this is for determining whether to display the message or not |
298 | 300 | static public function checkCounter() { |
299 | 301 | global $wgEditSimilarCounterValue; |
300 | | - if( isset( $_SESSION['ES_counter'] ) ) { |
| 302 | + if ( isset( $_SESSION['ES_counter'] ) ) { |
301 | 303 | $_SESSION['ES_counter']--; |
302 | | - if( $_SESSION['ES_counter'] > 0 ) { |
| 304 | + if ( $_SESSION['ES_counter'] > 0 ) { |
303 | 305 | return false; |
304 | 306 | } else { |
305 | 307 | $_SESSION['ES_counter'] = $wgEditSimilarCounterValue; |
— | — | @@ -322,38 +324,45 @@ |
323 | 325 | return true; |
324 | 326 | } |
325 | 327 | |
326 | | -//view message depending on settings and the relevancy of the results |
| 328 | +// view message depending on settings and the relevancy of the results |
327 | 329 | function wfEditSimilarViewMesg( &$out ) { |
328 | 330 | global $wgTitle, $wgUser, $wgEditSimilarAlwaysShowThanks; |
| 331 | + |
329 | 332 | wfLoadExtensionMessages( 'EditSimilar' ); |
| 333 | + |
330 | 334 | if ( !empty( $_SESSION['ES_saved'] ) && ( 1 == $wgUser->getOption( 'edit-similar', 1 ) ) && $out->isArticle() ) { |
331 | | - if( EditSimilar::checkCounter() ) { |
| 335 | + if ( EditSimilar::checkCounter() ) { |
332 | 336 | $message_text = ''; |
333 | 337 | $article_title = $wgTitle->getText(); |
334 | 338 | // here we'll populate the similar articles and links |
335 | 339 | $SInstance = new EditSimilar( $wgTitle->getArticleId(), 'category' ); |
336 | 340 | $similarities = $SInstance->getSimilarArticles(); |
337 | | - if( !empty( $similarities ) ) { |
338 | | - if( $SInstance->mSimilarArticles ) { |
339 | | - if( count( $similarities ) > 1 ) { |
340 | | - $message_text = wfMsg( 'editsimilar-thanks', implode( ", ", $similarities ) ); |
341 | | - } else { |
342 | | - $message_text = wfMsg( 'editsimilar-thanks-singleresult', implode( ", ", $similarities ) ); |
343 | | - } |
| 341 | + |
| 342 | + if ( !empty( $similarities ) ) { |
| 343 | + global $wgLang; |
| 344 | + |
| 345 | + if ( $SInstance->mSimilarArticles ) { |
| 346 | + $message_text = wfMsgExt( |
| 347 | + 'editsimilar-thanks', |
| 348 | + array( 'parsemag' ), |
| 349 | + $wgLang->listToText( $similarities ), |
| 350 | + count( $similarities ) |
| 351 | + ); |
344 | 352 | } else { // the articles we found were rather just articles needing attention |
345 | | - if( count( $similarities ) > 1 ) { |
346 | | - $message_text = wfMsg( 'editsimilar-thanks-notsimilar', implode( ", ", $similarities ) ); |
347 | | - } else { |
348 | | - $message_text = wfMsg( 'editsimilar-thanks-notsimilar-singleresult', implode( ", ", $similarities ) ); |
349 | | - } |
| 353 | + $message_text = wfMsgExt( |
| 354 | + 'editsimilar-thanks-notsimilar', |
| 355 | + array( 'parsemag' ), |
| 356 | + $wgLang->listToText( $similarities ), |
| 357 | + count( $similarities ) |
| 358 | + ); |
350 | 359 | } |
351 | 360 | } else { |
352 | | - if( $wgUser->isLoggedIn() && !empty( $wgEditSimilarAlwaysShowThanks ) ) { |
| 361 | + if ( $wgUser->isLoggedIn() && !empty( $wgEditSimilarAlwaysShowThanks ) ) { |
353 | 362 | $message_text = wfMsg( 'editsimilar-thankyou', $wgUser->getName() ); |
354 | 363 | } |
355 | 364 | } |
356 | 365 | |
357 | | - if( '' != $message_text ) { |
| 366 | + if ( '' != $message_text ) { |
358 | 367 | EditSimilar::showMessage( $message_text, $article_title ); |
359 | 368 | } |
360 | 369 | } |
— | — | @@ -372,10 +381,11 @@ |
373 | 382 | */ |
374 | 383 | function wfEditSimilarToggle( $user, &$preferences ) { |
375 | 384 | wfLoadExtensionMessages( 'EditSimilar' ); |
| 385 | + |
376 | 386 | $preferences['edit-similar'] = array( |
377 | 387 | 'type' => 'toggle', |
378 | 388 | 'section' => 'editing', |
379 | 389 | 'label-message' => 'tog-edit-similar', |
380 | 390 | ); |
381 | 391 | return true; |
382 | | -} |
\ No newline at end of file |
| 392 | +} |
Index: trunk/extensions/EditSimilar/EditSimilar.css |
— | — | @@ -7,4 +7,4 @@ |
8 | 8 | .editsimilar_dismiss { |
9 | 9 | float:right; |
10 | 10 | font-size:0.9em; |
11 | | -} |
\ No newline at end of file |
| 11 | +} |