r29581 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29580‎ | r29581 | r29582 >
Date:09:05, 11 January 2008
Author:siebrand
Status:old
Tags:
Comment:
* use wfLoadExtensionMessages for SyntaxHighlight_GeSHi
* add version in extension credits
* update Translate extension
Modified paths:
  • /trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php (modified) (history)
  • /trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.i18n.php (modified) (history)
  • /trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php (modified) (history)
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/MessageGroups.php
@@ -1855,17 +1855,11 @@
18561856 }
18571857
18581858 class SyntaxHighlight_GeSHiMessageGroup extends ExtensionMessageGroup {
1859 - protected $fileExporter = null;
18601859 protected $label = 'Syntax Highlight GeSHi';
18611860 protected $id = 'ext-syntaxhighlightgeshi';
18621861
1863 - protected $functionName = 'efSyntaxHighlight_GeSHiMessages';
 1862+ protected $arrName = 'messages';
18641863 protected $messageFile = 'SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.i18n.php';
1865 -
1866 - protected $exportStart = '\'$CODE\' => array(';
1867 - protected $exportPrefix= '';
1868 - protected $exportLineP = "\t";
1869 - protected $exportEnd = '),';
18701864 }
18711865
18721866 class TalkHereExtensionGroup extends MultipleFileMessageGroup {
Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.i18n.php
@@ -1,381 +1,371 @@
22 <?php
3 -
43 /**
5 - * Internationalisation file for the SyntaxHighlight extension
 4+ * Internationalisation file for extension SyntaxHighlight.
65 *
76 * @addtogroup Extensions
8 - */
 7+*/
98
10 -function efSyntaxHighlight_GeSHiMessages() {
11 - $messages = array(
 9+$messages = array();
1210
13 -/* English (Brion Vibber) */
14 -'en' => array(
 11+/* English
 12+ * @author Brion Vibber
 13+ */
 14+$messages['en'] = array(
1515 'syntaxhighlight-specify' => 'You need to specify a language like this:',
1616 'syntaxhighlight-supported' => 'Supported languages for syntax highlighting:',
1717 'syntaxhighlight-err-loading' => '(error loading supported language list)',
1818 'syntaxhighlight-err-language' => 'Invalid language.',
1919 'geshi.css' => '/* CSS placed here will be applied to GeSHi syntax highlighting */',
20 -),
 20+);
2121
22 -'ar' => array(
 22+$messages['ar'] = array(
2323 'syntaxhighlight-specify' => 'يجب عليك تحديد لغة مثل هذه:',
2424 'syntaxhighlight-supported' => 'اللغات المدعومة لتظليل الصياغة:',
2525 'syntaxhighlight-err-loading' => '(خطأ في تحميل قائمة اللغات المدعومة)',
2626 'syntaxhighlight-err-language' => 'لغة غير صحيحة.',
2727 'geshi.css' => '/* الأنماط المتراصة CSS المعروضة هنا ستطبق على GeSHi syntax highlighting */',
28 -),
 28+);
2929
3030 /** Bulgarian (Български)
3131 * @author DCLXVI
3232 */
33 -'bg' => array(
 33+$messages['bg'] = array(
3434 'syntaxhighlight-err-language' => 'Невалиден език.',
35 -),
 35+);
3636
3737 /** Bengali (বাংলা)
3838 * @author Zaheen
3939 */
40 -'bn' => array(
 40+$messages['bn'] = array(
4141 'syntaxhighlight-specify' => 'আপনাকে এভাবে একটি ভাষা নির্দিষ্ট করতে হবে:',
4242 'syntaxhighlight-supported' => 'যেসব ভাষার জন্য সিনট্যাক্স হাইলাইটিং সমর্থিত:',
4343 'syntaxhighlight-err-loading' => '(সমর্থিত ভাষার তালিকা আনতে ত্রুটি)',
4444 'syntaxhighlight-err-language' => 'অবৈধ ভাষা।',
4545 'geshi.css' => '/* এখানে স্থাপিত CSS কোড GeSHi সিনট্যাক্স হাইলাইটিং-এ ব্যবহার করা হবে */',
46 -),
 46+);
4747
4848 /** Catalan (Català)
4949 * @author SMP
5050 */
51 -'ca' => array(
 51+$messages['ca'] = array(
5252 'syntaxhighlight-specify' => "Heu d'especificar un dels llenguatges:",
5353 'syntaxhighlight-supported' => 'Llenguatges admesos per al ressaltament sintàctic:',
5454 'syntaxhighlight-err-loading' => '(error en carregar la llista de llenguatges)',
5555 'syntaxhighlight-err-language' => 'Llenguatge invàlid.',
56 -),
 56+);
5757
5858 /** Czech (Česky)
5959 * @author Li-sung
6060 */
61 -'cs' => array(
 61+$messages['cs'] = array(
6262 'syntaxhighlight-specify' => 'Musíte určit jazyk tímto způsobem:',
6363 'syntaxhighlight-supported' => 'Seznam jazyků, u kterých je podporováno zvýrazňování syntaxe:',
6464 'syntaxhighlight-err-loading' => '(chyba při načítání seznamu podporovaných jazyků)',
6565 'syntaxhighlight-err-language' => 'Neplatný jazyk.',
6666 'geshi.css' => '/* Zde uvedené CSS bude ovlivňovat zvýrazňování syntaxe GeSHi */',
67 -),
 67+);
6868
6969 /* German (Raymond) */
70 -'de' => array(
 70+$messages['de'] = array(
7171 'syntaxhighlight-specify' => 'Die gewünschte Sprache muss wie folgt definiert werden:',
7272 'syntaxhighlight-supported' => 'Unterstützte Sprachen für die Syntax-Hervorhebung:',
7373 'syntaxhighlight-err-loading' => '(Fehler beim Laden der Sprachenliste)',
7474 'syntaxhighlight-err-language' => 'Ungültige Sprache.',
7575 'geshi.css' => '/* CSS in dieser MediaWiki-Systemnachricht wird auf die GeSHi-Syntaxhervorhebung angewendet */',
76 -),
 76+);
7777
7878 /** Greek (Ελληνικά)
7979 * @author Consta
8080 */
81 -'el' => array(
 81+$messages['el'] = array(
8282 'syntaxhighlight-err-language' => 'Άκυρη γλώσσα.',
83 -),
 83+);
8484
8585 /* Estonian [[et:Kasutaja:M2s17]] */
86 -'et' => array(
 86+$messages['et'] = array(
8787 'syntaxhighlight-specify' => 'Sa pead täpsustama keelt nõnda:',
8888 'syntaxhighlight-supported' => 'Süntaksi esiletoomise on toetatud järgnevates keeltes:',
8989 'syntaxhighlight-err-loading' => '(toetatud keelte loetelu laadimisel esines viga)',
9090 'syntaxhighlight-err-language' => 'antud keel on mittekehtiv',
9191 'geshi.css' => '/* CSS mis on asetatud siia, määrab GeSHi süntaksi esiletoomise stiili */',
92 -),
 92+);
9393
94 -'eu' => array(
 94+$messages['eu'] = array(
9595 'syntaxhighlight-err-language' => 'Baliogabeko hizkuntza.',
96 -),
 96+);
9797
9898 # فارسی (Huji)
99 -'fa' => array(
 99+$messages['fa'] = array(
100100 'syntaxhighlight-specify' => 'شما باید به این شکل زبانی را مشخص کنید:',
101101 'syntaxhighlight-supported' => 'زبان‌های پشتیبانی‌شده برای رنگین‌کردن دستورات:',
102102 'syntaxhighlight-err-loading' => '(خطا در بارگذاری فهرست زبان‌های پشتیبانی‌شده)',
103103 'syntaxhighlight-err-language' => 'زبان غیرمجاز.',
104104 'geshi.css' => '/* دستورات CSS این‌جا توسط سامانه رنگین‌کردن دستورات GeSHi به کار گرفته می‌شوند */',
105105
106 -),
 106+);
107107
108108 /** Finnish (Suomi)
109109 * @author Nike
110110 */
111 -'fi' => array(
 111+$messages['fi'] = array(
112112 'syntaxhighlight-specify' => 'Kieli pitää määritellä seuraavasti:',
113113 'syntaxhighlight-supported' => 'Syntaksinkorostus on mahdollista seuraaville kielille:',
114114 'syntaxhighlight-err-loading' => '(tuettujen kielten luettelon lataaminen epäonnistui)',
115115 'syntaxhighlight-err-language' => 'Kelpaamaton kieli.',
116116 'geshi.css' => '/* Tänne lisätty CSS vaikuttaa GeSHi-syntaksinkorostukseen */',
117 -),
 117+);
118118
119119 /** French
120120 *@author
121121 */
122 -'fr' => array(
 122+$messages['fr'] = array(
123123 'syntaxhighlight-specify' => 'Vous devez spécifier un langage comme ceci :',
124124 'syntaxhighlight-supported' => 'Langages supportés pour la coloration syntaxique :',
125125 'syntaxhighlight-err-loading' => '(erreur en chargeant la liste des langages supportés)',
126126 'syntaxhighlight-err-language' => 'Langage invalide',
127127 'geshi.css' => '/* Le code CSS inséré ici sera appliqué par GeSHi pour la coloration syntaxique. */',
128 -),
 128+);
129129
130 -'gl' => array(
 130+$messages['gl'] = array(
131131 'syntaxhighlight-specify' => 'Ten que especificar unha linguaxe así:',
132132 'syntaxhighlight-supported' => 'Linguaxes coñecidas para resaltar a sintaxe:',
133133 'syntaxhighlight-err-loading' => '(erro ao cargar a listaxe de linguaxes coñecidas)',
134134 'syntaxhighlight-err-language' => 'Linguaxe non válida.',
135135 'geshi.css' => '/* O CSS colocado aquí será aplicado ao resalte da sintaxe de GeSHi */',
136 -),
 136+);
137137
138138 /* Hebrew (Rotem Liss) */
139 -'he' => array(
 139+$messages['he'] = array(
140140 'syntaxhighlight-specify' => 'עליכם לציין שפה באופן הבא:',
141141 'syntaxhighlight-supported' => 'שפות נתמכות:',
142142 'syntaxhighlight-err-loading' => '(שגיאה בטעינת הרשימה של השפות הנתמכות)',
143143 'syntaxhighlight-err-language' => 'שפה שגויה.',
144144 'geshi.css' => '/* סגנונות CSS שייכתבו כאן יפעלו על התגית source */',
145 -),
 145+);
146146
147 -'hr' => array(
 147+$messages['hr'] = array(
148148 'syntaxhighlight-specify' => 'Molimo navedite jezik na slijedeći način:',
149149 'syntaxhighlight-supported' => 'Jezici podržani za bojanje sintakse:',
150150 'syntaxhighlight-err-loading' => '(greška pri učitavanju popisa podržanih jezika)',
151151 'syntaxhighlight-err-language' => 'Nevaljani jezik.',
152152 'geshi.css' => '/* CSS kod napisan ovdje će biti primijenjen na GeSHi bojanje sintakse */',
153 -),
 153+);
154154
155 -'hsb' => array(
 155+$messages['hsb'] = array(
156156 'syntaxhighlight-specify' => 'Dyrbiš rěč takle definować:',
157157 'syntaxhighlight-supported' => 'Podpěrowane rěče za syntaksowe wuzběhnjenje:',
158158 'syntaxhighlight-err-loading' => '(Zmylk při začitanju lisćiny rěčow)',
159159 'syntaxhighlight-err-language' => 'Njepłaćiwa rěč.',
160160 'geshi.css' => '/* CSS w tutej zdźělence so na syntaksowe wuzběhnjenje GeSHi nałoži */',
161 -),
 161+);
162162
163 -'hu' => array(
 163+$messages['hu'] = array(
164164 'syntaxhighlight-specify' => 'Meg kell adnod egy nyelvet az alábbi módon:',
165165 'syntaxhighlight-supported' => 'Támogatott programozási nyelvek:',
166166 'syntaxhighlight-err-loading' => '(hiba történt a támogatott nyelvek listájának betöltése közben)',
167167 'syntaxhighlight-err-language' => 'Érvénytelen nyelv.',
168168 'geshi.css' => '/* Az itt elhelyezett CSS-t fogja alkalmazni a GeSHi szintaxiskiemelő */',
169 -),
 169+);
170170
171171 /* Indonesian (Ivan Lanin) */
172 -'id' => array(
 172+$messages['id'] = array(
173173 'syntaxhighlight-specify' => 'Anda harus menentukan suatu bahasa seperti ini:',
174174 'syntaxhighlight-supported' => 'Bahasa-bahasa yang didukung oleh pewarnaan sintaks:',
175175 'syntaxhighlight-err-loading' => '(kesalahan pemuatan daftar bahasa yang didukung)',
176176 'syntaxhighlight-err-language' => 'Bahasa tak sah.',
177 -),
 177+);
178178
179179 /** Italian (Italiano)
180180 * @author BrokenArrow
181181 */
182 -'it' => array(
 182+$messages['it'] = array(
183183 'syntaxhighlight-specify' => 'È necessario specificare un linguaggio in questo modo:',
184184 'syntaxhighlight-supported' => 'Linguaggi di cui è possibile evidenziare la sintassi in colore:',
185185 'syntaxhighlight-err-loading' => "(errore nel caricamento dell'elenco dei linguaggi supportati)",
186186 'syntaxhighlight-err-language' => 'Linguaggio non riconosciuto.',
187187 'geshi.css' => "/* Gli stili CSS inseriti qui si applicano all'evidenziazione di sintassi con GeSHi */",
188 -),
 188+);
189189
190190 /* Japanese */
191 -'ja' => array(
 191+$messages['ja'] = array(
192192 'syntaxhighlight-specify' => '以下のように言語を指定する必要があります:',
193193 'syntaxhighlight-supported' => 'シンタックスハイライト機能に対応している言語は以下の通りです:',
194194 'syntaxhighlight-err-loading' => '(対応言語のロード時にエラーが発生しました)',
195195 'syntaxhighlight-err-language' => '不正な言語名です。',
196 -),
 196+);
197197
198198 /* Kazakh Cyrillic (AlefZet) */
199 -'kk-cyrl' => array(
 199+$messages['kk-cyrl'] = array(
200200 'syntaxhighlight-specify' => 'Тілді былайша көрсетуіңіз қажет:',
201201 'syntaxhighlight-supported' => 'Синтаксисі көмескі жарықталатын сүйемелденген тілдер:',
202202 'syntaxhighlight-err-loading' => '(сүйемелденген тілдер тізімін жүктеу қатесі)',
203203 'syntaxhighlight-err-language' => 'Жарамсыз тіл.',
204204 'geshi.css' => '/* Мындағы CSS әмірлері GeSHi синтаксисті көмескі жарықтауға қолданылады */',
205 -),
 205+);
206206
207207 /* Kazakh Latin (AlefZet) */
208 -'kk-latn' => array(
 208+$messages['kk-latn'] = array(
209209 'syntaxhighlight-specify' => 'Tildi bılaýşa körsetwiñiz qajet:',
210210 'syntaxhighlight-supported' => 'Sïntaksïsi kömeski jarıqtalatın süýemeldengen tilder:',
211211 'syntaxhighlight-err-loading' => '(süýemeldengen tilder tizimin jüktew qatesi)',
212212 'syntaxhighlight-err-language' => 'Jaramsız til.',
213213 'geshi.css' => '/* Mındağı CSS ämirleri GeSHi sïntaksïsti kömeski jarıqtawğa qoldanıladı */',
214 -),
 214+);
215215
216216 /* Kazakh Arabic (AlefZet) */
217 -'kk-arab' => array(
 217+$messages['kk-arab'] = array(
218218 'syntaxhighlight-specify' => 'تٸلدٸ بىلايشا كٶرسەتۋٸڭٸز قاجەت:',
219219 'syntaxhighlight-supported' => 'سينتاكسيسٸ كٶمەسكٸ جارىقتالاتىن سٷيەمەلدەنگەن تٸلدەر:',
220220 'syntaxhighlight-err-loading' => '(سٷيەمەلدەنگەن تٸلدەر تٸزٸمٸن جٷكتەۋ قاتەسٸ)',
221221 'syntaxhighlight-err-language' => 'جارامسىز تٸل.',
222222 'geshi.css' => '/* مىنداعى CSS ٵمٸرلەرٸ GeSHi سينتاكسيستٸ كٶمەسكٸ جارىقتاۋعا قولدانىلادى */',
223 -),
 223+);
224224
225225 /** Luxembourgish (Lëtzebuergesch)
226226 * @author Robby
227227 */
228 -'lb' => array(
 228+$messages['lb'] = array(
229229 'syntaxhighlight-specify' => 'Déi gewënschte Sprooch muss esou definéiert ginn:',
230230 'syntaxhighlight-err-language' => 'Ongëlteg Sprooch',
231 -),
 231+);
232232
233233 /* nld / Dutch (Siebrand Mazeland) */
234 -'nl' => array(
 234+$messages['nl'] = array(
235235 'syntaxhighlight-specify' => 'Geef een taal als volgt op:',
236236 'syntaxhighlight-supported' => 'Ondersteunde talen voor syntaxismarkering:',
237237 'syntaxhighlight-err-loading' => '(fout bij het laden van de lijst met ondersteunde talen)',
238238 'syntaxhighlight-err-language' => 'Onjuiste taal.',
239239 'geshi.css' => '/* Hier geplaatste CSS wordt toegepast op GeSHi syntax highlighting */',
240 -),
 240+);
241241
242242 /** Norwegian (‪Norsk (bokmål)‬)
243243 * @author Jon Harald Søby
244244 */
245 -'no' => array(
 245+$messages['no'] = array(
246246 'syntaxhighlight-specify' => 'Du må oppgi et språk slik:',
247247 'syntaxhighlight-supported' => 'Støttede språk for syntaksutheving:',
248248 'syntaxhighlight-err-loading' => '(feil under last av liste over støttede språk)',
249249 'syntaxhighlight-err-language' => 'Ugyldig språk.',
250250 'geshi.css' => '/* CSS plassert her gjelder GeSHi syntaksutheving */',
251 -),
 251+);
252252
253253 /** Occitan (Occitan)
254254 * @author Cedric31
255255 */
256 -'oc' => array(
 256+$messages['oc'] = array(
257257 'syntaxhighlight-specify' => 'Devètz especificar un lengatge coma aquò :',
258258 'syntaxhighlight-supported' => 'Lengatges suportats per la coloracion sintaxica :',
259259 'syntaxhighlight-err-loading' => '(error en cargant la lista dels lengatges suportats)',
260260 'syntaxhighlight-err-language' => 'Lengatge invalid.',
261261 'geshi.css' => '/* Lo còde CSS inserit aicí serà aplicat per GeSHi per la coloracion sintaxica. */',
262 -),
 262+);
263263
264 -'pl' => array(
 264+$messages['pl'] = array(
265265 'syntaxhighlight-specify' => 'Musisz wybrać język w następujący sposób:',
266266 'syntaxhighlight-supported' => 'Języki obsługiwane w podświetlaniu składni:',
267267 'syntaxhighlight-err-loading' => '(błąd przy wczytywaniu listy obsługiwanych języków)',
268268 'syntaxhighlight-err-language' => 'Niepoprawny język.',
269269 'geshi.css' => '/* CSS umieszczony tutaj będzie zastosowany do kolorowania składni GeSHi */',
270 -),
 270+);
271271
272 -'pms' => array(
 272+$messages['pms'] = array(
273273 'syntaxhighlight-specify' => 'A venta specifiché na lenga coma:',
274274 'syntaxhighlight-supported' => 'Lenghe dont as peul fé l\'evidensiassion dla sintassi:',
275275 'syntaxhighlight-err-loading' => '(eror ën cariand la lista dle lenghe dont sintassi as peul evidensié)',
276276 'syntaxhighlight-err-language' => 'Lenga nen bon-a',
277277 'geshi.css' => '/* ël CSS piassà ambelessì a sarà aplicà a l\'evidensiassion ëd sintassi GeSHi */',
278 -),
 278+);
279279
280280 /* Portuguese (Lugusto) */
281 -'pt' => array(
 281+$messages['pt'] = array(
282282 'syntaxhighlight-specify' => 'Você precisa especificar uma linguagem, tal como:',
283283 'syntaxhighlight-supported' => 'Linguagens suportadas no realce de sintaxe:',
284284 'syntaxhighlight-err-loading' => '(erro ao carregar a lista de linguagens suportadas)',
285285 'syntaxhighlight-err-language' => 'Linguagem inválida.',
286286 'geshi.css' => '/* O código CSS aqui colocado será aplicado ao realce de sintaxe GeSHi */',
287 -),
 287+);
288288
289289 /* Russian */
290 -'ru' => array(
 290+$messages['ru'] = array(
291291 'syntaxhighlight-specify' => 'Вы должны указать язык следующим образом:',
292292 'syntaxhighlight-supported' => 'Поддерживаемые языки:',
293293 'syntaxhighlight-err-loading' => '(невозможно загрузить список языков)',
294294 'syntaxhighlight-err-language' => 'Указан неподдерживаемый язык.',
295295 'geshi.css' => '/* CSS-код, размещённый здесь, будет применён для подсветки синтаксиса GeSHI */',
296 -),
 296+);
297297
298298 /** Slovak (Slovenčina)
299299 * @author Helix84
300300 */
301 -'sk' => array(
 301+$messages['sk'] = array(
302302 'syntaxhighlight-specify' => 'Musíte uviesť jazyk takto:',
303303 'syntaxhighlight-supported' => 'Jazyky, pre ktoré je zvýrazňovanie syntaxe podporované:',
304304 'syntaxhighlight-err-loading' => '(chyba pri načítaní zoznamu podporovaných jazykov)',
305305 'syntaxhighlight-err-language' => 'Neplatný jazyk.',
306306 'geshi.css' => '/* Tu umiestnené CSS sa použije pre zvýrazňovanie syntaxe GeSHi */',
307 -),
 307+);
308308
309309 /** Seeltersk (Seeltersk)
310310 * @author Pyt
311311 */
312 -'stq' => array(
 312+$messages['stq'] = array(
313313 'syntaxhighlight-specify' => 'Ju wonskede Sproake mout as foulget definierd wäide:',
314314 'syntaxhighlight-supported' => 'Unnerstöände Sproaken foar ju Syntax-Betoonenge:',
315315 'syntaxhighlight-err-loading' => '(Failer bie dät Leeden fon ju Sproakenlieste)',
316316 'syntaxhighlight-err-language' => 'Uungultige Sproake.',
317317 'geshi.css' => '/* CSS in disse MediaWiki-Systemättergjucht wäd ap ju GeSHi-Syntaxbetoonenge anwoand */',
318 -),
 318+);
319319
320320 /* Swedish */
321 -'sv' => array(
 321+$messages['sv'] = array(
322322 'syntaxhighlight-specify' => 'Du måste ange vilket språk som används, så här:',
323323 'syntaxhighlight-supported' => 'Det finns stöd för följande språk:',
324324 'syntaxhighlight-err-loading' => '(fel vid laddning av listan över stödda språk)',
325325 'syntaxhighlight-err-language' => 'Ogiltigt språk.',
326326 'geshi.css' => '/* CSS som skrivs här används för syntax highlighting med GeSHI */',
327 -),
 327+);
328328
329329 /** Volapük (Volapük)
330330 * @author Malafaya
331331 */
332 -'vo' => array(
 332+$messages['vo'] = array(
333333 'syntaxhighlight-err-language' => 'Pük no dabinöl.',
334 -),
 334+);
335335
336336 /* Cantonese (Shinjiman) */
337 -'yue' => array(
 337+$messages['yue'] = array(
338338 'syntaxhighlight-specify' => '你需要指定一種語言,好似咁:',
339339 'syntaxhighlight-supported' => '語法醒目標示所支援嘅語言:',
340340 'syntaxhighlight-err-loading' => '(支援語言清單載入錯誤)',
341341 'syntaxhighlight-err-language' => '無效嘅語言。',
342342 'geshi.css' => '/* 放響呢度嘅CSS會以GeSHi語法醒目提示方式顯示 */',
343 -),
 343+);
344344
345345 /* Chinese (Simplified) (Shinjiman) */
346 -'zh-hans' => array(
 346+$messages['zh-hans'] = array(
347347 'syntaxhighlight-specify' => '您需要指定一种语言,像这样:',
348348 'syntaxhighlight-supported' => '语法高亮所支持的语言:',
349349 'syntaxhighlight-err-loading' => '(支持语言列表载入错误)',
350350 'syntaxhighlight-err-language' => '无效的语言。',
351351 'geshi.css' => '/* 放在这里的CSS会以GeSHi语法高亮方式显示 */',
352 -),
 352+);
353353
354354 /* Chinese (Traditional) (Shinjiman) */
355 -'zh-hant' => array(
 355+$messages['zh-hant'] = array(
356356 'syntaxhighlight-specify' => '您需要指定一種語言,像這樣:',
357357 'syntaxhighlight-supported' => '語法醒目標示所支援的語言:',
358358 'syntaxhighlight-err-loading' => '(支援語言清單載入錯誤)',
359359 'syntaxhighlight-err-language' => '無效的語言。',
360360 'geshi.css' => '/* 放在這裏的CSS會以GeSHi語法醒目提示方式顯示 */',
361 -),
 361+);
362362
363 - );
364 -
365 - /* Kazakh fallbacks */
366 - $messages['kk-kz'] = $messages['kk-cyrl'];
367 - $messages['kk-tr'] = $messages['kk-latn'];
368 - $messages['kk-cn'] = $messages['kk-arab'];
369 - $messages['kk'] = $messages['kk-cyrl'];
370 -
371 - /* Chinese defaults, fallback to zh-hans or zh-hant */
372 - $messages['zh'] = $messages['zh-hans'];
373 - $messages['zh-cn'] = $messages['zh-hans'];
374 - $messages['zh-hk'] = $messages['zh-hant'];
375 - $messages['zh-sg'] = $messages['zh-hans'];
376 - $messages['zh-tw'] = $messages['zh-hant'];
377 - /* Cantonese default, fallback to yue */
378 - $messages['zh-yue'] = $messages['yue'];
379 -
380 - return $messages;
381 -
382 -}
 363+$messages['kk-kz'] = $messages['kk-cyrl'];
 364+$messages['kk-tr'] = $messages['kk-latn'];
 365+$messages['kk-cn'] = $messages['kk-arab'];
 366+$messages['kk'] = $messages['kk-cyrl'];
 367+$messages['zh'] = $messages['zh-hans'];
 368+$messages['zh-cn'] = $messages['zh-hans'];
 369+$messages['zh-hk'] = $messages['zh-hant'];
 370+$messages['zh-sg'] = $messages['zh-hans'];
 371+$messages['zh-tw'] = $messages['zh-hant'];
 372+$messages['zh-yue'] = $messages['yue'];
Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php
@@ -43,14 +43,16 @@
4444
4545 $wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi'] = array(
4646 'name' => 'SyntaxHighlight',
 47+ 'version' => '2008-01-11',
4748 'author' => array( 'Brion Vibber', 'Tim Starling', 'Rob Church' ),
4849 'description' => 'Provides syntax highlighting using [http://qbnz.com/highlighter/ GeSHi Highlighter]',
4950 'url' => 'http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi',
5051 );
5152
52 -$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = dirname( __FILE__ ) . '/SyntaxHighlight_GeSHi.class.php';
 53+$dir = dirname(__FILE__) . '/';
 54+$wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php';
 55+$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php';
5356 $wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
54 -$wgHooks['LoadAllMessages'][] = 'SyntaxHighlight_GeSHi::loadMessages';
5557 $wgExtensionFunctions[] = 'efSyntaxHighlight_GeSHiSetup';
5658
5759 /**
@@ -59,4 +61,4 @@
6062 function efSyntaxHighlight_GeSHiSetup() {
6163 global $wgParser;
6264 $wgParser->setHook( 'source', array( 'SyntaxHighlight_GeSHi', 'parserHook' ) );
63 -}
\ No newline at end of file
 65+}
Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
@@ -6,7 +6,7 @@
77 * Has GeSHi been initialised this session?
88 */
99 private static $initialised = false;
10 -
 10+
1111 /**
1212 * List of languages available to GeSHi
1313 */
@@ -67,7 +67,7 @@
6868 return '<div dir="ltr" style="text-align: left;">' . $out . '</div>';
6969 }
7070 }
71 -
 71+
7272 /**
7373 * Hook into Article::view() to provide syntax highlighting for
7474 * custom CSS and JavaScript pages
@@ -115,7 +115,7 @@
116116 $geshi->enable_keyword_links( false );
117117 return $geshi;
118118 }
119 -
 119+
120120 /**
121121 * Prepare a CSS snippet suitable for use as a ParserOutput/OutputPage
122122 * head item
@@ -142,7 +142,7 @@
143143 }
144144 return implode( "\n", $css );
145145 }
146 -
 146+
147147 /**
148148 * Format an error message
149149 *
@@ -159,7 +159,7 @@
160160 . self::formatLanguages();
161161 return "<div style=\"border: solid red 1px; padding: .5em;\">{$html}</div>";
162162 }
163 -
 163+
164164 /**
165165 * Format the list of supported languages
166166 *
@@ -177,7 +177,7 @@
178178 return '<p>' . htmlspecialchars( wfMsgForContent( 'syntaxhighlight-err-loading' ) ) . '</p>';
179179 }
180180 }
181 -
 181+
182182 /**
183183 * Get the list of supported languages
184184 *
@@ -200,28 +200,11 @@
201201 */
202202 private static function initialise() {
203203 if( !self::$initialised ) {
204 - self::loadMessages();
 204+ wfLoadExtensionMessages( 'SyntaxHighlight_GeSHi' );
205205 if( !class_exists( 'GeSHi' ) )
206206 require( 'geshi/geshi.php' );
207207 self::$initialised = true;
208208 }
209209 return true;
210210 }
211 -
212 - /**
213 - * Load extension messages
214 - *
215 - * @return bool
216 - */
217 - public static function loadMessages() {
218 - static $done = false;
219 - if( !$done ) {
220 - global $wgMessageCache;
221 - require_once( dirname( __FILE__ ) . '/SyntaxHighlight_GeSHi.i18n.php' );
222 - foreach( efSyntaxHighlight_GeSHiMessages() as $lang => $messages )
223 - $wgMessageCache->addMessages( $messages, $lang );
224 - }
225 - return true;
226 - }
227 -
228 -}
\ No newline at end of file
 211+}

Status & tagging log