Index: branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php |
— | — | @@ -58,18 +58,18 @@ |
59 | 59 | $output->setPageTitle( $this->msg( 'watchnologin' ) ); |
60 | 60 | $llink = Linker::linkKnown( |
61 | 61 | SpecialPage::getTitleFor( 'Userlogin' ), |
62 | | - wfMsgHtml( 'loginreqlink' ), |
| 62 | + $this->msg( 'loginreqlink' )->escaped(), |
63 | 63 | array(), |
64 | 64 | array( 'returnto' => $this->getTitle()->getPrefixedText() ) |
65 | 65 | ); |
66 | | - $output->addHTML( wfMessage( 'watchlistanontext' )->rawParams( $llink )->parse() ); |
| 66 | + $output->addHTML( $this->msg( 'watchlistanontext' )->rawParams( $llink )->parse() ); |
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $this->setHeaders(); |
71 | 71 | $this->outputHeader(); |
72 | 72 | |
73 | | - $output->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName() |
| 73 | + $output->addSubtitle( $this->msg( 'watchlistfor2', $user->getName() |
74 | 74 | )->rawParams( SpecialEditWatchlist::buildTools( null ) ) ); |
75 | 75 | |
76 | 76 | $request = $this->getRequest(); |
— | — | @@ -240,23 +240,21 @@ |
241 | 241 | $output->showLagWarning( $lag ); |
242 | 242 | } |
243 | 243 | |
244 | | - $lang = $this->getLanguage(); |
245 | | - |
246 | 244 | # Create output form |
247 | | - $form = Xml::fieldset( wfMsg( 'watchlist-options' ), false, array( 'id' => 'mw-watchlist-options' ) ); |
| 245 | + $form = Xml::fieldset( $this->msg( 'watchlist-options' )->text(), false, array( 'id' => 'mw-watchlist-options' ) ); |
248 | 246 | |
249 | 247 | # Show watchlist header |
250 | | - $form .= wfMsgExt( 'watchlist-details', array( 'parseinline' ), $lang->formatNum( $nitems ) ); |
| 248 | + $form .= $this->msg( 'watchlist-details' )->numParams( $nitems )->parse(); |
251 | 249 | |
252 | 250 | if( $user->getOption( 'enotifwatchlistpages' ) && $wgEnotifWatchlist) { |
253 | | - $form .= wfMsgExt( 'wlheader-enotif', 'parse' ) . "\n"; |
| 251 | + $form .= $this->msg( 'wlheader-enotif' )->parseAsBlock() . "\n"; |
254 | 252 | } |
255 | 253 | if( $wgShowUpdatedMarker ) { |
256 | 254 | $form .= Xml::openElement( 'form', array( 'method' => 'post', |
257 | 255 | 'action' => $this->getTitle()->getLocalUrl(), |
258 | 256 | 'id' => 'mw-watchlist-resetbutton' ) ) . |
259 | | - wfMsgExt( 'wlheader-showupdated', array( 'parseinline' ) ) . ' ' . |
260 | | - Xml::submitButton( wfMsg( 'enotif_reset' ), array( 'name' => 'dummy' ) ) . |
| 257 | + $this->msg( 'wlheader-showupdated' )->parse() . ' ' . |
| 258 | + Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . |
261 | 259 | Html::hidden( 'reset', 'all' ) . |
262 | 260 | Xml::closeElement( 'form' ); |
263 | 261 | } |
— | — | @@ -292,15 +290,12 @@ |
293 | 291 | |
294 | 292 | /* Start bottom header */ |
295 | 293 | |
| 294 | + $lang = $this->getLanguage(); |
296 | 295 | $wlInfo = ''; |
297 | 296 | if( $values['days'] > 0 ) { |
298 | 297 | $timestamp = wfTimestampNow(); |
299 | | - $wlInfo = wfMsgExt( 'wlnote', 'parseinline', |
300 | | - $lang->formatNum( $numRows ), |
301 | | - $lang->formatNum( round( $values['days'] * 24 ) ), |
302 | | - $lang->date( $timestamp, true ), |
303 | | - $lang->time( $timestamp, true ) |
304 | | - ) . '<br />'; |
| 298 | + $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $values['days'] * 24 ) )->params( |
| 299 | + $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user ) )->parse() . '<br />'; |
305 | 300 | } |
306 | 301 | |
307 | 302 | $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], $nondefaults ) . "<br />\n"; |
— | — | @@ -333,10 +328,10 @@ |
334 | 329 | $form .= $lang->pipeList( $links ); |
335 | 330 | $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl(), 'id' => 'mw-watchlist-form-namespaceselector' ) ); |
336 | 331 | $form .= '<hr /><p>'; |
337 | | - $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' '; |
| 332 | + $form .= Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) . ' '; |
338 | 333 | $form .= Xml::namespaceSelector( $nameSpace, '' ) . ' '; |
339 | | - $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $invert ) . ' '; |
340 | | - $form .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . '</p>'; |
| 334 | + $form .= Xml::checkLabel( $this->msg( 'invert' )->text(), 'invert', 'nsinvert', $invert ) . ' '; |
| 335 | + $form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . '</p>'; |
341 | 336 | $form .= Html::hidden( 'days', $values['days'] ); |
342 | 337 | foreach ( $filters as $key => $msg ) { |
343 | 338 | if ( $values[$key] ) { |
— | — | @@ -405,13 +400,10 @@ |
406 | 401 | } |
407 | 402 | |
408 | 403 | protected function showHideLink( $options, $message, $name, $value ) { |
409 | | - $showLinktext = wfMsgHtml( 'show' ); |
410 | | - $hideLinktext = wfMsgHtml( 'hide' ); |
411 | | - |
412 | | - $label = $value ? $showLinktext : $hideLinktext; |
| 404 | + $label = $this->msg( $value ? 'show' : 'hide' )->escaped(); |
413 | 405 | $options[$name] = 1 - (int) $value; |
414 | 406 | |
415 | | - return wfMsgHtml( $message, Linker::linkKnown( $this->getTitle(), $label, array(), $options ) ); |
| 407 | + return $this->msg( $message )->rawParams( Linker::linkKnown( $this->getTitle(), $label, array(), $options ) )->escaped(); |
416 | 408 | } |
417 | 409 | |
418 | 410 | protected function hoursLink( $h, $options = array() ) { |
— | — | @@ -427,7 +419,7 @@ |
428 | 420 | |
429 | 421 | protected function daysLink( $d, $options = array() ) { |
430 | 422 | $options['days'] = $d; |
431 | | - $message = ( $d ? $this->getLanguage()->formatNum( $d ) : wfMsgHtml( 'watchlistall2' ) ); |
| 423 | + $message = ( $d ? $this->getLanguage()->formatNum( $d ) : $this->msg( 'watchlistall2' )->escaped() ); |
432 | 424 | |
433 | 425 | return Linker::linkKnown( |
434 | 426 | $this->getTitle(), |
— | — | @@ -453,11 +445,10 @@ |
454 | 446 | foreach( $days as $d ) { |
455 | 447 | $days[$i++] = $this->daysLink( $d, $options ); |
456 | 448 | } |
457 | | - return wfMsgExt('wlshowlast', |
458 | | - array('parseinline', 'replaceafter'), |
| 449 | + return $this->msg( 'wlshowlast' )->rawParams( |
459 | 450 | $this->getLanguage()->pipeList( $hours ), |
460 | 451 | $this->getLanguage()->pipeList( $days ), |
461 | | - $this->daysLink( 0, $options ) ); |
| 452 | + $this->daysLink( 0, $options ) )->parse(); |
462 | 453 | } |
463 | 454 | |
464 | 455 | /** |
Property changes on: branches/wmf/1.19wmf1/includes/specials/SpecialWatchlist.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
465 | 456 | Merged /branches/JSTesting/includes/specials/SpecialWatchlist.php:r100352-107913 |
466 | 457 | Merged /branches/REL1_15/phase3/includes/specials/SpecialWatchlist.php:r51646 |
467 | 458 | Merged /branches/sqlite/includes/specials/SpecialWatchlist.php:r58211-58321 |
468 | 459 | Merged /trunk/phase3/includes/specials/SpecialWatchlist.php:r111085,111128,111144,111251,111750,111882,112397,112408,112474 |
469 | 460 | Merged /branches/wmf-deployment/includes/specials/SpecialWatchlist.php:r53381,56967 |