r37842 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37841‎ | r37842 | r37843 >
Date:11:47, 19 July 2008
Author:brion
Status:old
Tags:
Comment:
Remove bogus alt text generation:
1) Causes a fatal error every time because $wgTitle is not defined in this function. Clearly there was no attempt to test this code, which is poor form. :)
2) Alt text was useless even if it had worked, "Timeline for XX" where XX is $wgTItle's text form. This could use the wrong title when doing background rendering, and generally would just be lame and non-informative. It would fail to distinguish between a set of timelines on the same page.
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
@@ -10,7 +10,6 @@
1111 $messages['en'] = array(
1212 'timeline-desc' => 'Adds <tt>&lt;timeline&gt;</tt> tag to create timelines',
1313 'timeline-install-error' => 'Timeline error: Executable not found. Command line was: $1',
14 - 'timeline' => 'Timeline for page $1', // Where $1 is the page name
1514 );
1615
1716 /** Afrikaans (Afrikaans)
@@ -33,7 +32,6 @@
3433 $messages['ar'] = array(
3534 'timeline-desc' => 'يضيف الوسم <tt>&lt;timeline&gt;</tt> لإنشاء الخطوط الزمنية',
3635 'timeline-install-error' => 'خطأ إطار زمني: المنفذ لم يتم العثور عليه. سطر الأمر كان: $1',
37 - 'timeline' => 'إطار زمني للصفحة $1',
3836 );
3937
4038 /** Asturian (Asturianu)
@@ -48,7 +46,6 @@
4947 */
5048 $messages['bcc'] = array(
5149 'timeline-desc' => 'هورکنت <tt>&lt;timeline&gt;</tt>برچسپء په شرکتن خط زمان',
52 - 'timeline' => 'خط زمان په صفحه $1',
5350 );
5451
5552 /** Bulgarian (Български)
@@ -106,7 +103,6 @@
107104 $messages['fr'] = array(
108105 'timeline-desc' => 'Ajoute la balise <tt>&lt;timeline&gt;</tt> pour créer des frises chronologiques',
109106 'timeline-install-error' => 'Erreur de ligne de temps : Fichier exécutable introuvable. La ligne de commande était : $1',
110 - 'timeline' => 'Ligne de temps pour la page $1',
111107 );
112108
113109 /** Franco-Provençal (Arpetan)
@@ -122,7 +118,6 @@
123119 $messages['gl'] = array(
124120 'timeline-desc' => 'Engade a etiqueta <tt>&lt;timeline&gt;</tt> para crear liñas de tempo',
125121 'timeline-install-error' => 'Erro na liña de tempo: o ficheiro executable non foi atopado. A liña do comandos foi: $1',
126 - 'timeline' => 'Liña de tempo de $1',
127122 );
128123
129124 /** Hebrew (עברית)
@@ -131,7 +126,6 @@
132127 $messages['he'] = array(
133128 'timeline-desc' => 'הוספת תגית <tt>&lt;timeline&gt;</tt> ליצירת צירי זמן',
134129 'timeline-install-error' => 'שגיאת ציר זמן: לא נמצא קובץ ההרצה. הפקודה הייתה:: $1',
135 - 'timeline' => 'ציר זמן לדף $1', // Where $1 is the page name
136130 );
137131
138132 /** Hindi (हिन्दी)
@@ -162,7 +156,6 @@
163157 $messages['id'] = array(
164158 'timeline-desc' => 'Menambahkan tag <tt>&lt;timeline&gt;</tt> untuk membuat garis waktu',
165159 'timeline-install-error' => 'Kesalahan garis waktu: Berkas tidak dapat dijalankan karena tidak ditemukan. Baris perintah adalah: $1',
166 - 'timeline' => 'Garis waktu untuk $1',
167160 );
168161
169162 /** Italian (Italiano)
@@ -234,7 +227,6 @@
235228 $messages['ms'] = array(
236229 'timeline-desc' => 'Menambah tag <tt>&lt;timeline&gt;</tt> untuk mencipta garis masa',
237230 'timeline-install-error' => 'Ralat garis masa: Fail boleh laksana tidak dijumpai. Baris perintah ialah: $1',
238 - 'timeline' => 'Garis masa bagi laman $1',
239231 );
240232
241233 /** Low German (Plattdüütsch)
@@ -250,7 +242,6 @@
251243 $messages['nl'] = array(
252244 'timeline-desc' => 'Voegt de tag <tt>&lt;timeline&gt;</tt> toe om tijdlijnen te maken',
253245 'timeline-install-error' => 'Fout in timeline: het uitvoerbare bestand is niet aangetroffen. De commandoregel was: $1',
254 - 'timeline' => 'Tijdlijn voor pagina $1',
255246 );
256247
257248 /** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
@@ -273,7 +264,6 @@
274265 $messages['pl'] = array(
275266 'timeline-desc' => 'Dodaje znacznik <tt>&lt;timeline&gt;</tt> umożliwiający tworzenie spisu na osi czasu',
276267 'timeline-install-error' => 'Błąd instalacji osi czasu – Nie odnaleziono programu. Linia poleceń zawierała: $1',
277 - 'timeline' => 'Oś czasu dla strony $1',
278268 );
279269
280270 /** Portuguese (Português)
@@ -289,7 +279,6 @@
290280 $messages['ru'] = array(
291281 'timeline-desc' => 'Добавляет тег <tt>&lt;timeline&gt;</tt> для создания временных шкал',
292282 'timeline-install-error' => 'Ошибка временной шкалы. Исполняемый файл не найден. Команда была: $1',
293 - 'timeline' => 'Временная шкала для $1',
294283 );
295284
296285 /** Yakut (Саха тыла)
@@ -328,7 +317,6 @@
329318 $messages['sv'] = array(
330319 'timeline-desc' => 'Lägger till taggen <tt>&lt;timeline&gt;</tt> för att skapa tidslinjer',
331320 'timeline-install-error' => 'Tidslinjefel: Executable ej funnen. Kommandorad var: $1',
332 - 'timeline' => 'Tidslinje för $1',
333321 );
334322
335323 /** Telugu (తెలుగు)
Index: trunk/extensions/timeline/Timeline.php
@@ -78,10 +78,8 @@
7979 $ext = "png";
8080 }
8181
82 - $alt = htmlspecialchars( wfMsg('timeline', $wgTitle->getPrefixedText() ) );
83 -
8482 $txt = "<map id=\"timeline_$hash\">{$map}</map>".
85 - "<img usemap=\"#timeline_{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\" alt=\"$alt\" />";
 83+ "<img usemap=\"#timeline_{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\" />";
8684 }
8785 return $txt;
8886 }

Status & tagging log