Index: trunk/extensions/timeline/Timeline.i18n.php |
— | — | @@ -9,6 +9,8 @@ |
10 | 10 | |
11 | 11 | $messages['en'] = array( |
12 | 12 | 'timeline-desc' => 'Adds <tt><timeline></tt> tag to create timelines', |
| 13 | + 'timeline-install-error' => 'Timeline error: Executable not found. Command line was: $1', |
| 14 | + 'timeline' => 'Timeline for $1', // Where $1 is the article name |
13 | 15 | ); |
14 | 16 | |
15 | 17 | /** Afrikaans (Afrikaans) |
Index: trunk/extensions/timeline/Timeline.php |
— | — | @@ -39,6 +39,7 @@ |
40 | 40 | global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, $wgArticlePath, $wgTmpDirectory; |
41 | 41 | $hash = md5( $timelinesrc ); |
42 | 42 | $dest = $wgUploadDirectory."/timeline/"; |
| 43 | + wfLoadExtensionMessages('Timeline'); |
43 | 44 | if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); } |
44 | 45 | if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); } |
45 | 46 | |
— | — | @@ -58,8 +59,7 @@ |
59 | 60 | unlink($fname); |
60 | 61 | |
61 | 62 | if ( $ret == "" ) { |
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>"; |
| 63 | + return "<div id=\"toc\"><tt>" . wfMsgReplaceArgs( 'timeline-install-error', $cmdline ) . "</tt></div>"; |
64 | 64 | } |
65 | 65 | |
66 | 66 | } |
— | — | @@ -77,8 +77,11 @@ |
78 | 78 | $ext = "png"; |
79 | 79 | } |
80 | 80 | |
81 | | - $txt = "<map name=\"$hash\">{$map}</map>". |
82 | | - "<img usemap=\"#{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\">"; |
| 81 | + $txt = "<map id=\"timeline_$hash\">{$map}</map>". |
| 82 | + "<img usemap=\"#timeline_{$hash}\" src=\"{$wgUploadPath}/timeline/{$hash}.{$ext}\" alt=\"" . |
| 83 | + wfMsgReplaceArgs('timeline', $wgTitle->getPrefixedText() ) . "\">"; |
83 | 84 | } |
| 85 | + |
| 86 | + } |
84 | 87 | return $txt; |
85 | 88 | } |