r72769 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72768‎ | r72769 | r72770 >
Date:23:44, 10 September 2010
Author:kaldari
Status:resolved (Comments)
Tags:
Comment:
localizing new interface components from r72765
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.i18n.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -508,11 +508,11 @@
509509 $htmlOut .= Xml::closeElement( 'tr' );
510510 // Countries
511511 $htmlOut .= Xml::openElement( 'tr' );
512 - $htmlOut .= Xml::tags( 'td', array(), Xml::label( 'Geotargeted', 'geotargeted' ) );
 512+ $htmlOut .= Xml::tags( 'td', array(), Xml::label( wfMsgHtml( 'centralnotice-geotargeted' ), 'geotargeted' ) );
513513 $htmlOut .= Xml::tags( 'td', array(), Xml::check( 'geotargeted', false, wfArrayMerge( $readonly, array( 'value' => 1, 'id' => 'geotargeted' ) ) ) );
514514 $htmlOut .= Xml::closeElement( 'tr' );
515515 $htmlOut .= Xml::openElement( 'tr', array( 'id'=>'geoMultiSelector' ) );
516 - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), 'Countries' );
 516+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), wfMsgHtml( 'centralnotice-countries' ) );
517517 $htmlOut .= Xml::tags( 'td', array(), $this->geoMultiSelector() );
518518 $htmlOut .= Xml::closeElement( 'tr' );
519519
@@ -811,11 +811,11 @@
812812 $htmlOut .= Xml::closeElement( 'tr' );
813813 // Countries
814814 $htmlOut .= Xml::openElement( 'tr' );
815 - $htmlOut .= Xml::tags( 'td', array(), Xml::label( 'Geotargeted', 'geotargeted' ) );
 815+ $htmlOut .= Xml::tags( 'td', array(), Xml::label( wfMsgHtml( 'centralnotice-geotargeted' ), 'geotargeted' ) );
816816 $htmlOut .= Xml::tags( 'td', array(), Xml::check( 'geotargeted', false, wfArrayMerge( $readonly, array( 'value' => $row->not_name, 'id' => 'geotargeted' ) ) ) );
817817 $htmlOut .= Xml::closeElement( 'tr' );
818818 $htmlOut .= Xml::openElement( 'tr', array( 'id'=>'geoMultiSelector' ) );
819 - $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), 'Countries' );
 819+ $htmlOut .= Xml::tags( 'td', array( 'valign' => 'top' ), wfMsgHtml( 'centralnotice-countries' ) );
820820 $htmlOut .= Xml::tags( 'td', array(), $this->geoMultiSelector() );
821821 $htmlOut .= Xml::closeElement( 'tr' );
822822 // Enabled
@@ -1684,12 +1684,12 @@
16851685 $htmlOut = '';
16861686 if ( $this->editable ) {
16871687 $htmlOut .= Xml::tags( 'select',
1688 - array( 'multiple' => 'multiple', 'size' => 4, 'id' => 'geo_countries[]', 'name' => 'geo_countries[]' ),
 1688+ array( 'multiple' => 'multiple', 'size' => 5, 'id' => 'geo_countries[]', 'name' => 'geo_countries[]' ),
16891689 $options
16901690 );
16911691 } else {
16921692 $htmlOut .= Xml::tags( 'select',
1693 - array( 'multiple' => 'multiple', 'size' => 4, 'id' => 'geo_countries[]', 'name' => 'geo_countries[]', 'disabled' => 'disabled' ),
 1693+ array( 'multiple' => 'multiple', 'size' => 5, 'id' => 'geo_countries[]', 'name' => 'geo_countries[]', 'disabled' => 'disabled' ),
16941694 $options
16951695 );
16961696 }
Index: trunk/extensions/CentralNotice/CentralNotice.i18n.php
@@ -120,6 +120,8 @@
121121 'centralnotice-banner-type' => 'Banner type:',
122122 'centralnotice-banner-hidable' => 'Static/Hidable',
123123 'centralnotice-banner-collapsible' => 'Collapsible',
 124+ 'centralnotice-geotargeted' => 'Geotargeted',
 125+ 'centralnotice-countries' => 'Countries',
124126
125127 'right-centralnotice-admin' => 'Manage central notices',
126128 'right-centralnotice-translate' => 'Translate central notices',
@@ -179,6 +181,7 @@
180182 'centralnotice-message' => '{{Identical|Message}}',
181183 'centralnotice-clone-name' => '{{Identical|Name}}',
182184 'centralnotice-insert' => '{{Identical|Insert}}',
 185+ 'centralnotice-geotargeted' => 'Used to label a checkbox which activates geotargeting',
183186 'right-centralnotice-admin' => '{{doc-right}}',
184187 'right-centralnotice-translate' => '{{doc-right}}',
185188 'action-centralnotice-admin' => '{{doc-action}}',

Follow-up revisions

RevisionCommit summaryAuthorDate
r73001fixing double-escaping per comment at r72769kaldari17:56, 14 September 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72765beginning to add geotargetting interfacekaldari23:07, 10 September 2010

Comments

#Comment by Catrope (talk | contribs)   17:16, 14 September 2010
+			$htmlOut .= Xml::tags( 'td', array(), Xml::label( wfMsgHtml( 'centralnotice-geotargeted' ), 'geotargeted' ) );

That'll escape the label's caption twice (one in wfMsgHtml(), once in Xml::label()).

#Comment by Kaldari (talk | contribs)   21:45, 14 September 2010

Should be fixed in r73001 (I think).

Status & tagging log