r103776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103775‎ | r103776 | r103777 >
Date:19:15, 20 November 2011
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/specials/SpecialCategories.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialCategories.php
@@ -42,7 +42,7 @@
4343
4444 $this->getOutput()->addHTML(
4545 Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) .
46 - wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) .
 46+ $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() .
4747 $cap->getStartForm( $from ) .
4848 $cap->getNavigationBar() .
4949 '<ul>' . $cap->getBody() . '</ul>' .
@@ -114,10 +114,8 @@
115115 function formatRow($result) {
116116 $title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
117117 $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
118 - $lang = $this->getLang();
119 - $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
120 - $lang->formatNum( $result->cat_pages ) );
121 - return Xml::tags('li', null, $lang->specialList( $titleText, $count ) ) . "\n";
 118+ $count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped();
 119+ return Xml::tags( 'li', null, $this->getLang()->specialList( $titleText, $count ) ) . "\n";
122120 }
123121
124122 public function getStartForm( $from ) {
@@ -126,10 +124,10 @@
127125 return
128126 Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ),
129127 Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
130 - Xml::fieldset( wfMsg( 'categories' ),
131 - Xml::inputLabel( wfMsg( 'categoriesfrom' ),
 128+ Xml::fieldset( $this->msg( 'categories' )->text(),
 129+ Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(),
132130 'from', 'from', 20, $from ) .
133131 ' ' .
134 - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) ) );
 132+ Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) );
135133 }
136134 }

Status & tagging log