r64528 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64527‎ | r64528 | r64529 >
Date:20:09, 2 April 2010
Author:tparscal
Status:ok
Tags:
Comment:
Split the main message so we can conditionally show part of it.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.i18n.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.i18n.php
@@ -65,12 +65,12 @@
6666 * Search improvements: We\'ve improved search suggestions to get you to the article you\'re looking for more quickly.
6767 * Other new features: We\'ve also introduced a table wizard to make creating tables easier and find and a replace feature to simplify article editing.
6868
 69+Return to [$1 $2].',
 70+ 'prefswitch-main-on' => '
6971 ;Feedback?
70 -We\'ve love to hear from you. Please visit our [$4 feedback page].
 72+We\'ve love to hear from you. Please visit our [$1 feedback page].
7173 ;Take me back!
72 -If you would like to turn off the new features, please [$3 click here].
73 -
74 -or return to [$1 $2].',
 74+If you would like to turn off the new features, please [$2 click here].',
7575 'prefswitch-survey-intro-feedback' => 'We\'d love to hear from you. Please fill out the optional survey below.',
7676 'prefswitch-survey-intro-off' => 'Thanks for trying out our new features. To help us improve them, please fill out the optional survey below ',
7777 );
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php
@@ -213,15 +213,18 @@
214214 $wgOut->addHtml( $html );
215215 } else {
216216 $wgOut->addWikiMsgArray(
217 - 'prefswitch-main',
218 - array(
219 - $this->originUrl,
220 - $this->originTitle,
221 - $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'off' ) ) ),
222 - $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'feedback' ) ) )
223 - ),
224 - array( 'parse' )
 217+ 'prefswitch-main', array( $this->originUrl, $this->originTitle ), array( 'parse' )
225218 );
 219+ if ( self::isSwitchedOn( $wgUser ) ) {
 220+ $wgOut->addWikiMsgArray(
 221+ 'prefswitch-main-on',
 222+ array(
 223+ $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'off' ) ) ),
 224+ $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'feedback' ) ) )
 225+ ),
 226+ array( 'parse' )
 227+ );
 228+ }
226229 }
227230 }
228231 }

Status & tagging log