r112234 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112233‎ | r112234 | r112235 >
Date:19:57, 23 February 2012
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -181,17 +181,17 @@
182182
183183 $form = Xml::openElement( 'form', array( 'method' => 'post',
184184 'action' => $this->getTitle()->getLocalUrl( 'action=submit' ) ) );
185 - $form .= Xml::inputLabel( wfMsg( 'export-addcattext' ) , 'catname', 'catname', 40 ) . ' ';
186 - $form .= Xml::submitButton( wfMsg( 'export-addcat' ), array( 'name' => 'addcat' ) ) . '<br />';
 185+ $form .= Xml::inputLabel( $this->msg( 'export-addcattext' )->text(), 'catname', 'catname', 40 ) . '&#160;';
 186+ $form .= Xml::submitButton( $this->msg( 'export-addcat' )->text(), array( 'name' => 'addcat' ) ) . '<br />';
187187
188188 if ( $wgExportFromNamespaces ) {
189 - $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . '&#160;';
190 - $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '<br />';
 189+ $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', $this->msg( 'export-addnstext' )->text() ) . '&#160;';
 190+ $form .= Xml::submitButton( $this->msg( 'export-addns' )->text(), array( 'name' => 'addns' ) ) . '<br />';
191191 }
192192
193193 if ( $wgExportAllowAll ) {
194194 $form .= Xml::checkLabel(
195 - wfMsg( 'exportall' ),
 195+ $this->msg( 'exportall' )->text(),
196196 'exportall',
197197 'exportall',
198198 $request->wasPosted() ? $request->getCheck( 'exportall' ) : false
@@ -203,29 +203,29 @@
204204
205205 if( $wgExportAllowHistory ) {
206206 $form .= Xml::checkLabel(
207 - wfMsg( 'exportcuronly' ),
 207+ $this->msg( 'exportcuronly' )->text(),
208208 'curonly',
209209 'curonly',
210210 $request->wasPosted() ? $request->getCheck( 'curonly' ) : true
211211 ) . '<br />';
212212 } else {
213 - $out->addHTML( wfMsgExt( 'exportnohistory', 'parse' ) );
 213+ $out->addWikiMsg( 'exportnohistory' );
214214 }
215215
216216 $form .= Xml::checkLabel(
217 - wfMsg( 'export-templates' ),
 217+ $this->msg( 'export-templates' )->text(),
218218 'templates',
219219 'wpExportTemplates',
220220 $request->wasPosted() ? $request->getCheck( 'templates' ) : false
221221 ) . '<br />';
222222
223223 if( $wgExportMaxLinkDepth || $this->userCanOverrideExportDepth() ) {
224 - $form .= Xml::inputLabel( wfMsg( 'export-pagelinks' ), 'pagelink-depth', 'pagelink-depth', 20, 0 ) . '<br />';
 224+ $form .= Xml::inputLabel( $this->msg( 'export-pagelinks' )->text(), 'pagelink-depth', 'pagelink-depth', 20, 0 ) . '<br />';
225225 }
226226 // Enable this when we can do something useful exporting/importing image information. :)
227 - //$form .= Xml::checkLabel( wfMsg( 'export-images' ), 'images', 'wpExportImages', false ) . '<br />';
 227+ //$form .= Xml::checkLabel( $this->msg( 'export-images' )->text(), 'images', 'wpExportImages', false ) . '<br />';
228228 $form .= Xml::checkLabel(
229 - wfMsg( 'export-download' ),
 229+ $this->msg( 'export-download' )->text(),
230230 'wpDownload',
231231 'wpDownload',
232232 $request->wasPosted() ? $request->getCheck( 'wpDownload' ) : true
@@ -233,14 +233,14 @@
234234
235235 if ( $wgExportAllowListContributors ) {
236236 $form .= Xml::checkLabel(
237 - wfMsg( 'exportlistauthors' ),
 237+ $this->msg( 'exportlistauthors' )->text(),
238238 'listauthors',
239239 'listauthors',
240240 $request->wasPosted() ? $request->getCheck( 'listauthors' ) : false
241241 ) . '<br />';
242242 }
243243
244 - $form .= Xml::submitButton( wfMsg( 'export-submit' ), Linker::tooltipAndAccesskeyAttribs( 'export' ) );
 244+ $form .= Xml::submitButton( $this->msg( 'export-submit' )->text(), Linker::tooltipAndAccesskeyAttribs( 'export' ) );
245245 $form .= Xml::closeElement( 'form' );
246246
247247 $out->addHTML( $form );

Sign-offs

UserFlagDate
Nikerabbitinspected09:10, 24 February 2012

Status & tagging log