From: Alexandre Emsenhuber Date: Sun, 20 Nov 2011 19:15:39 +0000 (+0000) Subject: Use local context to get messages X-Git-Tag: 1.31.0-rc.0~26378 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=238003d9e1298e3f9e8789a51384ee43236e7193;p=lhc%2Fweb%2Fwiklou.git Use local context to get messages --- diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index 16ca322565..a2b569506d 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -42,7 +42,7 @@ class SpecialCategories extends SpecialPage { $this->getOutput()->addHTML( Html::openElement( 'div', array( 'class' => 'mw-spcontent' ) ) . - wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) . + $this->msg( 'categoriespagetext', $cap->getNumRows() )->parseAsBlock() . $cap->getStartForm( $from ) . $cap->getNavigationBar() . '' . @@ -114,10 +114,8 @@ class CategoryPager extends AlphabeticPager { function formatRow($result) { $title = Title::makeTitle( NS_CATEGORY, $result->cat_title ); $titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) ); - $lang = $this->getLang(); - $count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ), - $lang->formatNum( $result->cat_pages ) ); - return Xml::tags('li', null, $lang->specialList( $titleText, $count ) ) . "\n"; + $count = $this->msg( 'nmembers' )->numParams( $result->cat_pages )->escaped(); + return Xml::tags( 'li', null, $this->getLang()->specialList( $titleText, $count ) ) . "\n"; } public function getStartForm( $from ) { @@ -126,10 +124,10 @@ class CategoryPager extends AlphabeticPager { return Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ), Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . - Xml::fieldset( wfMsg( 'categories' ), - Xml::inputLabel( wfMsg( 'categoriesfrom' ), + Xml::fieldset( $this->msg( 'categories' )->text(), + Xml::inputLabel( $this->msg( 'categoriesfrom' )->text(), 'from', 'from', 20, $from ) . ' ' . - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) ) ); + Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) ) ); } }