Index: trunk/phase3/includes/specials/SpecialImport.php |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | if( $user->isAllowed( 'importupload' ) ) { |
181 | 181 | $out->addWikiMsg( "importtext" ); |
182 | 182 | $out->addHTML( |
183 | | - Xml::fieldset( wfMsg( 'import-upload' ) ). |
| 183 | + Xml::fieldset( $this->msg( 'import-upload' )->text() ). |
184 | 184 | Xml::openElement( 'form', array( 'enctype' => 'multipart/form-data', 'method' => 'post', |
185 | 185 | 'action' => $action, 'id' => 'mw-import-upload-form' ) ) . |
186 | 186 | Html::hidden( 'action', 'submit' ) . |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | |
190 | 190 | "<tr> |
191 | 191 | <td class='mw-label'>" . |
192 | | - Xml::label( wfMsg( 'import-upload-filename' ), 'xmlimport' ) . |
| 192 | + Xml::label( $this->msg( 'import-upload-filename' )->text(), 'xmlimport' ) . |
193 | 193 | "</td> |
194 | 194 | <td class='mw-input'>" . |
195 | 195 | Xml::input( 'xmlimport', 50, '', array( 'type' => 'file' ) ) . ' ' . |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | </tr> |
198 | 198 | <tr> |
199 | 199 | <td class='mw-label'>" . |
200 | | - Xml::label( wfMsg( 'import-comment' ), 'mw-import-comment' ) . |
| 200 | + Xml::label( $this->msg( 'import-comment' )->text(), 'mw-import-comment' ) . |
201 | 201 | "</td> |
202 | 202 | <td class='mw-input'>" . |
203 | 203 | Xml::input( 'log-comment', 50, '', |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | <tr> |
208 | 208 | <td></td> |
209 | 209 | <td class='mw-submit'>" . |
210 | | - Xml::submitButton( wfMsg( 'uploadbtn' ) ) . |
| 210 | + Xml::submitButton( $this->msg( 'uploadbtn' )->text() ) . |
211 | 211 | "</td> |
212 | 212 | </tr>" . |
213 | 213 | Xml::closeElement( 'table' ). |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | if( $wgExportMaxLinkDepth > 0 ) { |
228 | 228 | $importDepth = "<tr> |
229 | 229 | <td class='mw-label'>" . |
230 | | - wfMsgExt( 'export-pagelinks', 'parseinline' ) . |
| 230 | + $this->msg( 'export-pagelinks' )->parse() . |
231 | 231 | "</td> |
232 | 232 | <td class='mw-input'>" . |
233 | 233 | Xml::input( 'pagelink-depth', 3, 0 ) . |
— | — | @@ -235,16 +235,16 @@ |
236 | 236 | } |
237 | 237 | |
238 | 238 | $out->addHTML( |
239 | | - Xml::fieldset( wfMsg( 'importinterwiki' ) ) . |
| 239 | + Xml::fieldset( $this->msg( 'importinterwiki' )->text() ) . |
240 | 240 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'mw-import-interwiki-form' ) ) . |
241 | | - wfMsgExt( 'import-interwiki-text', array( 'parse' ) ) . |
| 241 | + $this->msg( 'import-interwiki-text' )->parseAsBlock() . |
242 | 242 | Html::hidden( 'action', 'submit' ) . |
243 | 243 | Html::hidden( 'source', 'interwiki' ) . |
244 | 244 | Html::hidden( 'editToken', $user->getEditToken() ) . |
245 | 245 | Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) . |
246 | 246 | "<tr> |
247 | 247 | <td class='mw-label'>" . |
248 | | - Xml::label( wfMsg( 'import-interwiki-source' ), 'interwiki' ) . |
| 248 | + Xml::label( $this->msg( 'import-interwiki-source' )->text(), 'interwiki' ) . |
249 | 249 | "</td> |
250 | 250 | <td class='mw-input'>" . |
251 | 251 | Xml::openElement( 'select', array( 'name' => 'interwiki' ) ) |
— | — | @@ -263,20 +263,20 @@ |
264 | 264 | <td> |
265 | 265 | </td> |
266 | 266 | <td class='mw-input'>" . |
267 | | - Xml::checkLabel( wfMsg( 'import-interwiki-history' ), 'interwikiHistory', 'interwikiHistory', $this->history ) . |
| 267 | + Xml::checkLabel( $this->msg( 'import-interwiki-history' )->text(), 'interwikiHistory', 'interwikiHistory', $this->history ) . |
268 | 268 | "</td> |
269 | 269 | </tr> |
270 | 270 | <tr> |
271 | 271 | <td> |
272 | 272 | </td> |
273 | 273 | <td class='mw-input'>" . |
274 | | - Xml::checkLabel( wfMsg( 'import-interwiki-templates' ), 'interwikiTemplates', 'interwikiTemplates', $this->includeTemplates ) . |
| 274 | + Xml::checkLabel( $this->msg( 'import-interwiki-templates' )->text(), 'interwikiTemplates', 'interwikiTemplates', $this->includeTemplates ) . |
275 | 275 | "</td> |
276 | 276 | </tr> |
277 | 277 | $importDepth |
278 | 278 | <tr> |
279 | 279 | <td class='mw-label'>" . |
280 | | - Xml::label( wfMsg( 'import-interwiki-namespace' ), 'namespace' ) . |
| 280 | + Xml::label( $this->msg( 'import-interwiki-namespace' )->text(), 'namespace' ) . |
281 | 281 | "</td> |
282 | 282 | <td class='mw-input'>" . |
283 | 283 | Xml::namespaceSelector( $this->namespace, '' ) . |
— | — | @@ -284,7 +284,7 @@ |
285 | 285 | </tr> |
286 | 286 | <tr> |
287 | 287 | <td class='mw-label'>" . |
288 | | - Xml::label( wfMsg( 'import-comment' ), 'mw-interwiki-comment' ) . |
| 288 | + Xml::label( $this->msg( 'import-comment' )->text(), 'mw-interwiki-comment' ) . |
289 | 289 | "</td> |
290 | 290 | <td class='mw-input'>" . |
291 | 291 | Xml::input( 'log-comment', 50, '', |
— | — | @@ -295,7 +295,7 @@ |
296 | 296 | <td> |
297 | 297 | </td> |
298 | 298 | <td class='mw-submit'>" . |
299 | | - Xml::submitButton( wfMsg( 'import-interwiki-submit' ), Linker::tooltipAndAccesskeyAttribs( 'import' ) ) . |
| 299 | + Xml::submitButton( $this->msg( 'import-interwiki-submit' )->text(), Linker::tooltipAndAccesskeyAttribs( 'import' ) ) . |
300 | 300 | "</td> |
301 | 301 | </tr>" . |
302 | 302 | Xml::closeElement( 'table' ). |
— | — | @@ -369,25 +369,25 @@ |
370 | 370 | |
371 | 371 | if( $successCount > 0 ) { |
372 | 372 | $this->getOutput()->addHTML( "<li>" . Linker::linkKnown( $title ) . " " . |
373 | | - wfMsgExt( 'import-revision-count', array( 'parsemag', 'escape' ), $localCount ) . |
| 373 | + $this->msg( 'import-revision-count', $localCount ) . |
374 | 374 | "</li>\n" |
375 | 375 | ); |
376 | 376 | |
377 | 377 | $log = new LogPage( 'import' ); |
378 | 378 | if( $this->mIsUpload ) { |
379 | | - $detail = wfMsgExt( 'import-logentry-upload-detail', array( 'content', 'parsemag' ), |
380 | | - $contentCount ); |
| 379 | + $detail = $this->msg( 'import-logentry-upload-detail', |
| 380 | + $contentCount )->inContentLanguage()->text(); |
381 | 381 | if ( $this->reason ) { |
382 | | - $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
| 382 | + $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; |
383 | 383 | } |
384 | 384 | $log->addEntry( 'upload', $title, $detail ); |
385 | 385 | } else { |
386 | 386 | $interwiki = '[[:' . $this->mInterwiki . ':' . |
387 | 387 | $origTitle->getPrefixedText() . ']]'; |
388 | | - $detail = wfMsgExt( 'import-logentry-interwiki-detail', array( 'content', 'parsemag' ), |
389 | | - $contentCount, $interwiki ); |
| 388 | + $detail = $this->msg( 'import-logentry-interwiki-detail', |
| 389 | + $contentCount, $interwiki )->inContentLanguage()->text(); |
390 | 390 | if ( $this->reason ) { |
391 | | - $detail .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
| 391 | + $detail .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->reason; |
392 | 392 | } |
393 | 393 | $log->addEntry( 'interwiki', $title, $detail ); |
394 | 394 | } |
— | — | @@ -405,15 +405,14 @@ |
406 | 406 | } |
407 | 407 | } else { |
408 | 408 | $this->getOutput()->addHTML( "<li>" . Linker::linkKnown( $title ) . " " . |
409 | | - wfMsgHtml( 'import-nonewrevisions' ) . "</li>\n" ); |
| 409 | + $this->msg( 'import-nonewrevisions' )->escaped() . "</li>\n" ); |
410 | 410 | } |
411 | 411 | } |
412 | 412 | |
413 | 413 | function close() { |
414 | 414 | $out = $this->getOutput(); |
415 | 415 | if ( $this->mLogItemCount > 0 ) { |
416 | | - $msg = wfMsgExt( 'imported-log-entries', 'parseinline', |
417 | | - $this->getLanguage()->formatNum( $this->mLogItemCount ) ); |
| 416 | + $msg = $this->msg( 'imported-log-entries' )->numParams( $this->mLogItemCount )->parse(); |
418 | 417 | $out->addHTML( Xml::tags( 'li', null, $msg ) ); |
419 | 418 | } elseif( $this->mPageCount == 0 && $this->mLogItemCount == 0 ) { |
420 | 419 | $out->addHTML( "</ul>\n" ); |