Index: trunk/extensions/ABC/ABC.i18n.php |
— | — | @@ -13,7 +13,6 @@ |
14 | 14 | $messages['en'] = array( |
15 | 15 | 'abcdesc' => 'Adds <tt><abc></tt> tag to format ABC music', |
16 | 16 | 'abcdownload' => 'Download:', |
17 | | - 'abcsep' => '|', |
18 | 17 | 'abcabc' => 'ABC', |
19 | 18 | 'abcpdf' => 'PDF', |
20 | 19 | 'abcps' => 'PostScript', |
— | — | @@ -55,7 +54,6 @@ |
56 | 55 | $messages['arz'] = array( |
57 | 56 | 'abcdesc' => 'يضيف وسم <tt><abc></tt> لصياغة موسيقى ABC', |
58 | 57 | 'abcdownload' => 'تنزيل:', |
59 | | - 'abcsep' => '|', |
60 | 58 | ); |
61 | 59 | |
62 | 60 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
— | — | @@ -193,12 +191,6 @@ |
194 | 192 | $messages['he'] = array( |
195 | 193 | 'abcdesc' => 'הוספת תגית <tt><abc></tt> למוסיקה בפורמט ABC', |
196 | 194 | 'abcdownload' => 'הורדה:', |
197 | | - 'abcsep' => '|', |
198 | | - 'abcabc' => 'ABC', |
199 | | - 'abcpdf' => 'PDF', |
200 | | - 'abcps' => 'PostScript', |
201 | | - 'abcmidi' => 'MIDI', |
202 | | - 'abcvorbis' => 'Ogg Vorbis', |
203 | 195 | ); |
204 | 196 | |
205 | 197 | /** Croatian (Hrvatski) |
— | — | @@ -261,12 +253,6 @@ |
262 | 254 | $messages['ksh'] = array( |
263 | 255 | 'abcdesc' => 'Deit dä <tt><abc></tt>-Befähl en et Wiki domet mer Mussik em ABC Fommaat opschrieve kann.', |
264 | 256 | 'abcdownload' => 'Eronger lahde:', |
265 | | - 'abcsep' => '|', |
266 | | - 'abcabc' => 'ABC', |
267 | | - 'abcpdf' => 'PDF', |
268 | | - 'abcps' => 'PostScript', |
269 | | - 'abcmidi' => 'MIDI', |
270 | | - 'abcvorbis' => 'Ogg Vorbis', |
271 | 257 | ); |
272 | 258 | |
273 | 259 | /** Luxembourgish (Lëtzebuergesch) |
— | — | @@ -346,9 +332,6 @@ |
347 | 333 | $messages['oc'] = array( |
348 | 334 | 'abcdesc' => 'Apond una balisa <tt><abc></tt> per formatar la musica ABC', |
349 | 335 | 'abcdownload' => 'Telecargar :', |
350 | | - 'abcsep' => '|', |
351 | | - 'abcabc' => 'ABC', |
352 | | - 'abcpdf' => 'PDF', |
353 | 336 | ); |
354 | 337 | |
355 | 338 | /** Polish (Polski) |
— | — | @@ -486,11 +469,6 @@ |
487 | 470 | $messages['tl'] = array( |
488 | 471 | 'abcdesc' => 'Nagdaragdag ng tatak na <tt><abc></tt> para maipormat ang tugtuging ABC', |
489 | 472 | 'abcdownload' => 'Ikargang-pakuha:', |
490 | | - 'abcabc' => 'ABC', |
491 | | - 'abcpdf' => 'PDF', |
492 | | - 'abcps' => 'PostScript', |
493 | | - 'abcmidi' => 'MIDI', |
494 | | - 'abcvorbis' => 'Ogg Vorbis', |
495 | 473 | ); |
496 | 474 | |
497 | 475 | /** Turkish (Türkçe) |
— | — | @@ -570,4 +548,3 @@ |
571 | 549 | $messages['zh-hant'] = array( |
572 | 550 | 'abcdownload' => '下載:', |
573 | 551 | ); |
574 | | - |
Index: trunk/extensions/ABC/ABC.php |
— | — | @@ -86,8 +86,8 @@ |
87 | 87 | function |
88 | 88 | efABCRender($input, $args, $parser) { |
89 | 89 | global $abcPath, $abcURL, $abc2midi, $abctimidity, $abcOggHandler, |
90 | | - $abcDelayedRendering; |
91 | | - |
| 90 | + $abcDelayedRendering, $wgLang; |
| 91 | + |
92 | 92 | if ($abcPath == false || $abcURL == false) |
93 | 93 | return 'Error: $abcPath and $abcURL must be set to use the ABC extension.'; |
94 | 94 | |
— | — | @@ -100,22 +100,22 @@ |
101 | 101 | $float = "left"; |
102 | 102 | if (isset($args['float']) && $args['float'] == 'right') |
103 | 103 | $float = "right"; |
104 | | - |
| 104 | + |
105 | 105 | $abc = preg_replace("/^\n+/", "", $input); |
106 | 106 | $hash = sha1($input); |
107 | 107 | $error = ""; |
108 | | - |
| 108 | + |
109 | 109 | $hashbits = array( |
110 | 110 | substr($hash, 0, 2), |
111 | 111 | substr($hash, 2, 2), |
112 | 112 | substr($hash, 4, 2)); |
113 | 113 | $directory = "{$hashbits[0]}/{$hashbits[1]}/{$hashbits[2]}"; |
114 | 114 | $filename = "$abcPath/$directory/$hash"; |
115 | | - |
| 115 | + |
116 | 116 | if (!@file_exists("$abcPath/$directory")) |
117 | 117 | if (!@mkdir("$abcPath/$directory", 0777, true)) |
118 | 118 | return "Cannot create directory \"$abcPath/$directory\"."; |
119 | | - |
| 119 | + |
120 | 120 | /* |
121 | 121 | * Try to extract the title from the ABC. This is used as the |
122 | 122 | * alt text for the image. |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | $title = "Unknown song"; |
125 | 125 | if (preg_match("/^T:\s*(.*)$/m", $input, $matches)) |
126 | 126 | $title = $matches[1]; |
127 | | - |
| 127 | + |
128 | 128 | if (!abcCreateABC($abc, $filename, $error)) |
129 | 129 | return str_replace("\n", "<br />", htmlspecialchars($error)); |
130 | 130 | |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | if (!abcCreateVorbis($abc, $filename, $error)) |
143 | 143 | return str_replace("\n", "<br />", htmlspecialchars($error)); |
144 | 144 | } |
145 | | - |
| 145 | + |
146 | 146 | /* |
147 | 147 | * Succeeded to create all the output formats, return the |
148 | 148 | * output. We produce an image from the PNG, and include |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | $e_pdfpath = htmlspecialchars("$abcURL/$directory/$hash.pdf"); |
156 | 156 | $e_midipath = htmlspecialchars("$abcURL/$directory/$hash.mid"); |
157 | 157 | $e_vorbispath = htmlspecialchars("$abcURL/$directory/$hash.ogg"); |
158 | | - |
| 158 | + |
159 | 159 | $links = array(); |
160 | 160 | $links[] = "<a href=\"$e_abcpath\">" . wfMsg('abcabc') . "</a>"; |
161 | 161 | $links[] = "<a href=\"$e_pspath\">" . wfMsg('abcps') . "</a>"; |
— | — | @@ -163,12 +163,11 @@ |
164 | 164 | $links[] = "<a href=\"$e_midipath\">" . wfMsg('abcmidi') . "</a>"; |
165 | 165 | if ($abctimidity) |
166 | 166 | $links[] = "<a href=\"$e_vorbispath\">" . wfMsg('abcvorbis') . "</a>"; |
167 | | - |
168 | | - $e_dllinks = wfMsg('abcdownload') . " " . |
169 | | - join(" " . wfMsg('abcsep') . " ", $links); |
170 | | - |
| 167 | + |
| 168 | + $e_dllinks = wfMsg('abcdownload') . " " . $wgLang->pipeList( $links ); |
| 169 | + |
171 | 170 | $ogghtml = ""; |
172 | | - |
| 171 | + |
173 | 172 | if ($abcOggHandler) { |
174 | 173 | $oh = new OggTransformOutput(null, |
175 | 174 | "$filename.ogg", false, |
— | — | @@ -176,7 +175,7 @@ |
177 | 176 | "$filename.ogg", false); |
178 | 177 | $ogghtml = $oh->toHtml(array('alt' => $title)); |
179 | 178 | } |
180 | | - |
| 179 | + |
181 | 180 | $output = <<<EOF |
182 | 181 | <div style="float: $float; border: solid 1px #aaaaaa; margin: 0.2em;" class="abc-music"> |
183 | 182 | <img src="$e_imgpath" alt="$e_title" /> |
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | ABC |
3 | 3 | descmsg = abcdesc |
4 | | -optional = abcsep, abcabc, abcpdf, abcps, abcmidi, abcvorbis |
| 4 | +optional = abcabc, abcpdf, abcps, abcmidi, abcvorbis |
5 | 5 | |
6 | 6 | Absentee Landlord |
7 | 7 | |