r70778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70777‎ | r70778 | r70779 >
Date:20:25, 9 August 2010
Author:kaldari
Status:ok (Comments)
Tags:
Comment:
localization improvements per comments at r70529 and r70531
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.i18n.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -1346,9 +1346,13 @@
13471347 array( 'multiple' => 'multiple', 'size' => 4, 'id' => 'project_languages[]', 'name' => 'project_languages[]' ),
13481348 $options
13491349 );
 1350+ $buttons = array();
 1351+ $buttons[] = '<a href="#" onclick="selectLanguages(true);return false;">' . wfMsg( 'powersearch-toggleall' ) . '</a>';
 1352+ $buttons[] = '<a href="#" onclick="selectLanguages(false);return false;">' . wfMsg( 'powersearch-togglenone' ) . '</a>';
 1353+ $buttons[] = '<a href="#" onclick="top10Languages();return false;">' . wfMsg( 'centralnotice-top-ten-languages' ) . '</a>';
13501354 $htmlOut .= Xml::tags( 'div',
13511355 array( 'style' => 'margin-top: 0.2em;' ),
1352 - '<img src="'.$scriptPath.'/up-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-select' ) . ' <a href="#" onclick="selectLanguages(true);return false;">' . wfMsg( 'powersearch-toggleall' ) . '</a>, <a href="#" onclick="selectLanguages(false);return false;">' . wfMsg( 'powersearch-togglenone' ) . '</a>, <a href="#" onclick="top10Languages();return false;">' . wfMsg( 'centralnotice-top-ten-languages' ) . '</a>'
 1356+ '<img src="'.$scriptPath.'/up-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-select', Language::commaList( $buttons ) )
13531357 );
13541358 } else {
13551359 $htmlOut .= Xml::tags( 'select',
Index: trunk/extensions/CentralNotice/CentralNotice.i18n.php
@@ -62,7 +62,7 @@
6363 'centralnotice-hours' => 'Hour',
6464 'centralnotice-min' => 'Minute',
6565 'centralnotice-project-lang' => 'Project language',
66 - 'centralnotice-select' => 'Select: ',
 66+ 'centralnotice-select' => 'Select: $1',
6767 'centralnotice-top-ten-languages' => 'Top 10 languages',
6868 'centralnotice-project-name' => 'Project name',
6969 'centralnotice-start-date' => 'Start date',
@@ -101,10 +101,10 @@
102102 'centralnotice-clone-notice' => 'Create a copy of the banner',
103103 'centralnotice-clone-name' => 'Name:',
104104 'centralnotice-preview-all-template-translations' => 'Preview all available translations of banner',
105 - 'centralnotice-insert' => 'Insert:',
106 - 'centralnotice-hide-button' => 'Hide button',
107 - 'centralnotice-collapse-button' => 'Collapse button',
108 - 'centralnotice-expand-button' => 'Expand button',
 105+ 'centralnotice-insert' => 'Insert: $1',
 106+ 'centralnotice-hide-button' => '{{int:centralnotice-shared-hide}} button',
 107+ 'centralnotice-collapse-button' => '{{int:centralnotice-shared-collapse}} button',
 108+ 'centralnotice-expand-button' => '{{int:centralnotice-shared-expand}} button',
109109 'centralnotice-translate-button' => 'Help translate button',
110110 'centralnotice-donate-button' => 'Donate button',
111111 'centralnotice-expanded-banner' => 'Expanded banner',
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -196,9 +196,12 @@
197197 );
198198 $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-banner' ) );
199199 $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
 200+ $buttons = array();
 201+ $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>';
 202+ $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
200203 $htmlOut .= Xml::tags( 'div',
201204 array( 'style' => 'margin-bottom: 0.2em;' ),
202 - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert' ) . ' <a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>, <a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'
 205+ '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', Language::commaList( $buttons ) )
203206 );
204207 $htmlOut .= Xml::textarea( 'templateBody', '', 60, 20 );
205208 $htmlOut .= Xml::closeElement( 'fieldset' );
@@ -396,9 +399,12 @@
397400 }
398401 $htmlOut .= Xml::fieldset( wfMsg( 'centralnotice-edit-template' ) );
399402 $htmlOut .= wfMsg( 'centralnotice-edit-template-summary' );
 403+ $buttons = array();
 404+ $buttons[] = '<a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>';
 405+ $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
400406 $htmlOut .= Xml::tags( 'div',
401407 array( 'style' => 'margin-bottom: 0.2em;' ),
402 - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert' ) . ' <a href="#" onclick="insertButton(\'hide\');return false;">' . wfMsg( 'centralnotice-hide-button' ) . '</a>, <a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>'
 408+ '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', Language::commaList( $buttons ) )
403409 );
404410 $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly );
405411 if ( $this->editable ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70529some interface/localization clean-up for CentralNoticekaldari23:24, 5 August 2010
r70531switching some hard-coded text to localizable for CentralNoticekaldari23:48, 5 August 2010

Comments

#Comment by Tim Starling (talk | contribs)   09:49, 20 August 2010

The static calls to the non-static function Language::commaList() were fixed in r70979.

Status & tagging log