r37843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37842‎ | r37843 | r37844 >
Date:12:04, 19 July 2008
Author:brion
Status:old
Tags:
Comment:
Just revert to r35980 for now, can't get even the fixed version working right live and I can't get it to work at all locally for testing
Modified paths:
  • /trunk/extensions/timeline/Timeline.i18n.php (modified) (history)
  • /trunk/extensions/timeline/Timeline.php (modified) (history)

Diff [purge]

Index: trunk/extensions/timeline/Timeline.i18n.php
@@ -9,16 +9,8 @@
1010
1111 $messages['en'] = array(
1212 'timeline-desc' => 'Adds <tt>&lt;timeline&gt;</tt> tag to create timelines',
13 - 'timeline-install-error' => 'Timeline error: Executable not found. Command line was: $1',
1413 );
1514
16 -/** Afrikaans (Afrikaans)
17 - * @author Naudefj
18 - */
19 -$messages['af'] = array(
20 - 'timeline-desc' => 'Maak die <tt>&lt;timeline&gt;</tt> etiket beskikbaar om tydslyne te maak',
21 -);
22 -
2315 /** Aragonese (Aragonés)
2416 * @author Juanpabl
2517 */
@@ -30,8 +22,7 @@
3123 * @author Meno25
3224 */
3325 $messages['ar'] = array(
34 - 'timeline-desc' => 'يضيف الوسم <tt>&lt;timeline&gt;</tt> لإنشاء الخطوط الزمنية',
35 - 'timeline-install-error' => 'خطأ إطار زمني: المنفذ لم يتم العثور عليه. سطر الأمر كان: $1',
 26+ 'timeline-desc' => 'يضيف الوسم <tt>&lt;timeline&gt;</tt> لإنشاء الخطوط الزمنية',
3627 );
3728
3829 /** Asturian (Asturianu)
@@ -41,13 +32,6 @@
4233 'timeline-desc' => 'Añade la etiqueta <tt>&lt;timeline&gt;</tt> pa crear llinies de tiempu',
4334 );
4435
45 -/** Southern Balochi (بلوچی مکرانی)
46 - * @author Mostafadaneshvar
47 - */
48 -$messages['bcc'] = array(
49 - 'timeline-desc' => 'هورکنت <tt>&lt;timeline&gt;</tt>برچسپء په شرکتن خط زمان',
50 -);
51 -
5236 /** Bulgarian (Български)
5337 * @author DCLXVI
5438 */
@@ -69,13 +53,6 @@
7054 'timeline-desc' => 'Fügt das <tt>&lt;timeline&gt;</tt>-Tag zur Erstellung von Zeitleisten hinzu',
7155 );
7256
73 -/** Lower Sorbian (Dolnoserbski)
74 - * @author Michawiki
75 - */
76 -$messages['dsb'] = array(
77 - 'timeline-desc' => 'Pśidawa toflicku <tt>&lt;timeline&gt;</tt> za napóranje casoweje bałki',
78 -);
79 -
8057 /** Esperanto (Esperanto)
8158 * @author Yekrats
8259 */
@@ -83,11 +60,12 @@
8461 'timeline-desc' => 'Aldonas etikedon <tt>&lt;timeline&gt;</tt> por krei tempoaksojn',
8562 );
8663
87 -/** Persian (فارسی)
 64+/** فارسی (فارسی)
8865 * @author Huji
8966 */
9067 $messages['fa'] = array(
9168 'timeline-desc' => 'برچسب <tt>&lt;timeline&gt;</tt> را برای نمایش خطوط زمانی می‌افزاید',
 69+
9270 );
9371
9472 /** Finnish (Suomi)
@@ -101,8 +79,7 @@
10280 * @author Grondin
10381 */
10482 $messages['fr'] = array(
105 - 'timeline-desc' => 'Ajoute la balise <tt>&lt;timeline&gt;</tt> pour créer des frises chronologiques',
106 - 'timeline-install-error' => 'Erreur de ligne de temps : Fichier exécutable introuvable. La ligne de commande était : $1',
 83+ 'timeline-desc' => 'Ajoute la balise <tt>&lt;timeline&gt;</tt> pour créer des frises chronologiques',
10784 );
10885
10986 /** Franco-Provençal (Arpetan)
@@ -112,22 +89,6 @@
11390 'timeline-desc' => 'Apond la balisa <tt>&lt;timeline&gt;</tt> por crèar des frises cronologiques.',
11491 );
11592
116 -/** Galician (Galego)
117 - * @author Toliño
118 - */
119 -$messages['gl'] = array(
120 - 'timeline-desc' => 'Engade a etiqueta <tt>&lt;timeline&gt;</tt> para crear liñas de tempo',
121 - 'timeline-install-error' => 'Erro na liña de tempo: o ficheiro executable non foi atopado. A liña do comandos foi: $1',
122 -);
123 -
124 -/** Hebrew (עברית)
125 - * @author Rotem Liss
126 - */
127 -$messages['he'] = array(
128 - 'timeline-desc' => 'הוספת תגית <tt>&lt;timeline&gt;</tt> ליצירת צירי זמן',
129 - 'timeline-install-error' => 'שגיאת ציר זמן: לא נמצא קובץ ההרצה. הפקודה הייתה:: $1',
130 -);
131 -
13293 /** Hindi (हिन्दी)
13394 * @author Kaustubh
13495 */
@@ -151,11 +112,9 @@
152113
153114 /** Indonesian (Bahasa Indonesia)
154115 * @author IvanLanin
155 - * @author Rex
156116 */
157117 $messages['id'] = array(
158 - 'timeline-desc' => 'Menambahkan tag <tt>&lt;timeline&gt;</tt> untuk membuat garis waktu',
159 - 'timeline-install-error' => 'Kesalahan garis waktu: Berkas tidak dapat dijalankan karena tidak ditemukan. Baris perintah adalah: $1',
 118+ 'timeline-desc' => 'Menambahkan tag <tt>&lt;timeline&gt;</tt> untuk membuat garis waktu',
160119 );
161120
162121 /** Italian (Italiano)
@@ -221,14 +180,6 @@
222181 'timeline-desc' => 'टाईमलाईन तयार करण्यासाठी <tt>&lt;timeline&gt;</tt> टॅग वाढवितो',
223182 );
224183
225 -/** Malay (Bahasa Melayu)
226 - * @author Aviator
227 - */
228 -$messages['ms'] = array(
229 - 'timeline-desc' => 'Menambah tag <tt>&lt;timeline&gt;</tt> untuk mencipta garis masa',
230 - 'timeline-install-error' => 'Ralat garis masa: Fail boleh laksana tidak dijumpai. Baris perintah ialah: $1',
231 -);
232 -
233184 /** Low German (Plattdüütsch)
234185 * @author Slomox
235186 */
@@ -240,11 +191,10 @@
241192 * @author Siebrand
242193 */
243194 $messages['nl'] = array(
244 - 'timeline-desc' => 'Voegt de tag <tt>&lt;timeline&gt;</tt> toe om tijdlijnen te maken',
245 - 'timeline-install-error' => 'Fout in timeline: het uitvoerbare bestand is niet aangetroffen. De commandoregel was: $1',
 195+ 'timeline-desc' => 'Voegt de tag <tt>&lt;timeline&gt;</tt> toe om tijdlijnen te maken',
246196 );
247197
248 -/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 198+/** Norwegian (‪Norsk (bokmål)‬)
249199 * @author Jon Harald Søby
250200 */
251201 $messages['no'] = array(
@@ -262,8 +212,7 @@
263213 * @author Sp5uhe
264214 */
265215 $messages['pl'] = array(
266 - 'timeline-desc' => 'Dodaje znacznik <tt>&lt;timeline&gt;</tt> umożliwiający tworzenie spisu na osi czasu',
267 - 'timeline-install-error' => 'Błąd instalacji osi czasu – Nie odnaleziono programu. Linia poleceń zawierała: $1',
 216+ 'timeline-desc' => 'Dodaje znacznik <tt>&lt;timeline&gt;</tt> umożliwiający tworzenie spisu na osi czasu',
268217 );
269218
270219 /** Portuguese (Português)
@@ -277,8 +226,7 @@
278227 * @author Александр Сигачёв
279228 */
280229 $messages['ru'] = array(
281 - 'timeline-desc' => 'Добавляет тег <tt>&lt;timeline&gt;</tt> для создания временных шкал',
282 - 'timeline-install-error' => 'Ошибка временной шкалы. Исполняемый файл не найден. Команда была: $1',
 230+ 'timeline-desc' => 'Добавляет тег <tt>&lt;timeline&gt;</tt> для создания временных шкал',
283231 );
284232
285233 /** Yakut (Саха тыла)
@@ -295,13 +243,6 @@
296244 'timeline-desc' => 'Pridáva značku <tt>&lt;timeline&gt;</tt> pre tvorbu časových línií',
297245 );
298246
299 -/** Serbian Cyrillic ekavian (ћирилица)
300 - * @author Millosh
301 - */
302 -$messages['sr-ec'] = array(
303 - 'timeline-desc' => 'Додаје <tt>&lt;timeline&gt;</tt> ознаку за стварање временских оса.',
304 -);
305 -
306247 /** Sundanese (Basa Sunda)
307248 * @author Kandar
308249 */
@@ -311,12 +252,9 @@
312253
313254 /** Swedish (Svenska)
314255 * @author Lejonel
315 - * @author M.M.S.
316 - * @author Boivie
317256 */
318257 $messages['sv'] = array(
319 - 'timeline-desc' => 'Lägger till taggen <tt>&lt;timeline&gt;</tt> för att skapa tidslinjer',
320 - 'timeline-install-error' => 'Tidslinjefel: Executable ej funnen. Kommandorad var: $1',
 258+ 'timeline-desc' => 'Lägger till taggen <tt>&lt;timeline&gt;</tt> för att skapa tidslinjer',
321259 );
322260
323261 /** Telugu (తెలుగు)
@@ -326,20 +264,13 @@
327265 'timeline-desc' => 'కాలరేఖలని సృష్టించడానికై <tt>&lt;timeline&gt;</tt> అనే టాగుని చేరుస్తుంది',
328266 );
329267
330 -/** Tajik (Cyrillic) (Тоҷикӣ/tojikī (Cyrillic))
 268+/** Tajik (Тоҷикӣ)
331269 * @author Ibrahim
332270 */
333271 $messages['tg-cyrl'] = array(
334272 'timeline-desc' => 'Барчасби <tt>&lt;timeline&gt;</tt>-ро баро намоиши хати замоне илова мекунад',
335273 );
336274
337 -/** Ukrainian (Українська)
338 - * @author Ahonc
339 - */
340 -$messages['uk'] = array(
341 - 'timeline-desc' => 'Додає тег <tt>&lt;timeline&gt;</tt> для створення часових шкал',
342 -);
343 -
344275 /** Vèneto (Vèneto)
345276 * @author Candalua
346277 */
@@ -354,21 +285,21 @@
355286 'timeline-desc' => 'Thêm thẻ <tt>&lt;timeline&gt;</tt> để xây dựng các thời biểu',
356287 );
357288
358 -/** Yue (粵語)
 289+/** Cantonese
359290 * @author Shinjiman
360291 */
361292 $messages['yue'] = array(
362293 'timeline-desc' => '加 <tt>&lt;timeline&gt;</tt> 標籤去建立時間綫',
363294 );
364295
365 -/** Simplified Chinese (‪中文(简体)‬)
 296+/** Chinese (Simplified)
366297 * @author Shinjiman
367298 */
368299 $messages['zh-hans'] = array(
369300 'timeline-desc' => '加入 <tt>&lt;timeline&gt;</tt> 标签以建立时间线',
370301 );
371302
372 -/** Traditional Chinese (‪中文(繁體)‬)
 303+/** Chinese (Traditional)
373304 * @author Shinjiman
374305 */
375306 $messages['zh-hant'] = array(
Index: trunk/extensions/timeline/Timeline.php
@@ -39,9 +39,8 @@
4040 global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory;
4141 $hash = md5( $timelinesrc );
4242 $dest = $wgUploadDirectory."/timeline/";
43 - wfLoadExtensionMessages('Timeline');
44 - if ( ! is_dir( $dest ) ) { wfMkdirParents( $dest, 0777 ); }
45 - if ( ! is_dir( $wgTmpDirectory ) ) { wfMkdirParents( $wgTmpDirectory, 0777 ); }
 43+ if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); }
 44+ if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); }
4645
4746 $fname = $dest . $hash;
4847 if ( ! ( file_exists( $fname.".png" ) || file_exists( $fname.".err" ) ) )
@@ -59,8 +58,8 @@
6059 unlink($fname);
6160
6261 if ( $ret == "" ) {
63 - $error = htmlspecialchars( wfMsg( 'timeline-install-error', $cmdline ) );
64 - return "<div id=\"toc\"><tt>$error</tt></div>";
 62+ // Message not localized, only relevant during install
 63+ return "<div id=\"toc\"><tt>Timeline error: Executable not found. Command line was: {$cmdline}</tt></div>";
6564 }
6665
6766 }
@@ -78,8 +77,8 @@
7978 $ext = "png";
8079 }
8180
82 - $txt = "<map id=\"timeline_$hash\">{$map}</map>".
83 - "<img usemap=\"#timeline_{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\" />";
 81+ $txt = "<map name=\"$hash\">{$map}</map>".
 82+ "<img usemap=\"#{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\">";
8483 }
8584 return $txt;
8685 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35980Update a bunch of extensions to avoid unstubbing $wgParser early for setHook(...brion20:38, 6 June 2008

Status & tagging log