r114196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114195‎ | r114196 | r114197 >
Date:21:59, 19 March 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix up a bunch of messages
Modified paths:
  • /trunk/extensions/EducationProgram/includes/EPCourse.php (modified) (history)
  • /trunk/extensions/EducationProgram/includes/EPOrg.php (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialInstitutions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/specials/SpecialInstitutions.php
@@ -40,7 +40,7 @@
4141
4242 if ( $this->getUser()->isAllowed( 'ep-org' ) ) {
4343 $this->getOutput()->addModules( 'ep.addorg' );
44 - $this->addCachedHTML( 'EPOrg::getAddNewControl' );
 44+ $this->addCachedHTML( 'EPOrg::getAddNewControl', $this->getContext() );
4545 }
4646
4747 $this->addCachedHTML( 'EPOrg::getPager', $this->getContext() );
Index: trunk/extensions/EducationProgram/includes/EPOrg.php
@@ -140,11 +140,12 @@
141141 *
142142 * @since 0.1
143143 *
 144+ * @param IContextSource $context
144145 * @param array $args
145146 *
146147 * @return string
147148 */
148 - public static function getAddNewControl( array $args = array() ) {
 149+ public static function getAddNewControl( IContextSource $context, array $args = array() ) {
149150 $html = '';
150151
151152 $html .= Html::openElement(
@@ -157,12 +158,12 @@
158159
159160 $html .= '<fieldset>';
160161
161 - $html .= '<legend>' . wfMsgHtml( 'ep-institutions-addnew' ) . '</legend>';
 162+ $html .= '<legend>' . $context->msg( 'ep-institutions-addnew' )->escaped() . '</legend>';
162163
163 - $html .= Html::element( 'p', array(), wfMsg( 'ep-institutions-namedoc' ) );
 164+ $html .= Html::element( 'p', array(), $context->msg( 'ep-institutions-namedoc' )->plain() );
164165
165166 $html .= Xml::inputLabel(
166 - wfMsg( 'ep-institutions-newname' ),
 167+ $context->msg( 'ep-institutions-newname' )->plain(),
167168 'newname',
168169 'newname',
169170 false,
@@ -171,7 +172,7 @@
172173
173174 $html .= '&#160;' . Html::input(
174175 'addneworg',
175 - wfMsg( 'ep-institutions-add' ),
 176+ $context->msg( 'ep-institutions-add' )->plain(),
176177 'submit',
177178 array(
178179 'disabled' => 'disabled',
Index: trunk/extensions/EducationProgram/includes/EPCourse.php
@@ -316,7 +316,7 @@
317317
318318 $html .= '<p>' . $context->msg( 'ep-courses-namedoc' )->escaped() . '</p>';
319319
320 - $html .= Html::element( 'label', array( 'for' => 'neworg' ), $context->msg( 'ep-courses-neworg' ) );
 320+ $html .= Html::element( 'label', array( 'for' => 'neworg' ), $context->msg( 'ep-courses-neworg' )->plain() );
321321
322322 $select = new XmlSelect(
323323 'neworg',
@@ -328,7 +328,7 @@
329329 $html .= $select->getHTML();
330330
331331 $html .= '&#160;' . Xml::inputLabel(
332 - $context->msg( 'ep-courses-newname' )->escaped(),
 332+ $context->msg( 'ep-courses-newname' )->plain(),
333333 'newname',
334334 'newname',
335335 20,
@@ -336,7 +336,7 @@
337337 );
338338
339339 $html .= '&#160;' . Xml::inputLabel(
340 - $context->msg( 'ep-courses-newterm' )->escaped(),
 340+ $context->msg( 'ep-courses-newterm' )->plain(),
341341 'newterm',
342342 'newterm',
343343 10,
@@ -345,7 +345,7 @@
346346
347347 $html .= '&#160;' . Html::input(
348348 'addnewcourse',
349 - $context->msg( 'ep-courses-add' )->escaped(),
 349+ $context->msg( 'ep-courses-add' )->plain(),
350350 'submit',
351351 array(
352352 'disabled' => 'disabled',

Status & tagging log