r64525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64524‎ | r64525 | r64526 >
Date:19:47, 2 April 2010
Author:tparscal
Status:ok
Tags:
Comment:
First shot at putting some real messages in.
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
@@ -17,7 +17,9 @@
1818 'prefswitch-survey-true' => 'Yes',
1919 'prefswitch-survey-false' => 'No',
2020 'prefswitch-survey-submit-off' => 'Turn New Features Off',
 21+ 'prefswitch-survey-cancel-off' => 'If you would like to continue using the new features, you can return to $1.',
2122 'prefswitch-survey-submit-feedback' => 'Send Feedback',
 23+ 'prefswitch-survey-cancel-feedback' => 'If you don\'t want to provide feedback, you can return to $1.',
2224 'prefswitch-survey-question-likedislike' => 'What did you like about the new features? What did you dislike about the features?',
2325 'prefswitch-survey-question-whyoff' => 'Why are you turning off the new features? (Please select all that apply.)',
2426 'prefswitch-survey-answer-whyoff-hard' => 'It was too hard to use.',
@@ -54,4 +56,20 @@
5557 'prefswitch-survey-answer-os-linux' => 'Linux',
5658 'prefswitch-survey-answer-os-other' => 'Other operating system:',
5759 'prefswitch-survey-question-res' => 'What is the resolution of your screen?',
 60+ 'prefswitch-main' => 'We\'ve been working hard to make things easier for our users. We\'re excited to share some improvements, including a new look and feel and simplified editing features. Improving the usability of the site is an ongoing effort here at Wikimedia and we\'ll be sharing more updates in the future.
 61+
 62+Here\'s what we\'ve recently launched:
 63+* Navigation: We\'ve improved the navigation for reading and editing articles. Now, the tabs at the top of each page more clearly define whether you\'re viewing the article page or discussion page, and whether you\'re reading or editing an article.
 64+* Editing toolbar improvements: We\'ve reorganized the editing toolbar to make easier to use. Now, formatting articles is simpler and more intuitive.
 65+* Link wizard: An easy-to-use tool allows you to add links to other Wikipedia articles as well as links to external sites.
 66+* Search improvements: We\'ve improved search suggestions to get you to the article you\'re looking for more quickly.
 67+* 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.
 68+
 69+Feedback? We\'ve love to hear from you. Please visit our <a href="$3">feedback page</a>.
 70+Take me back. If you would like to turn off the new features, please <a href="$2">click here</a>.
 71+
 72+
 73+ Provide feedback</a>, turn stuff off</a> or return to $1.',
 74+ 'prefswitch-survey-intro-feedback' => 'We\'d love to hear from you. Please fill out the optional survey below.',
 75+ 'prefswitch-survey-intro-off' => 'Thanks for trying out our new features. To help us improve them, please fill out the optional survey below ',
5876 );
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/SpecialPrefSwitch.php
@@ -170,9 +170,6 @@
171171 $this->render( 'main' );
172172 break;
173173 }
174 - if ( $this->originTitle ) {
175 - $wgOut->addHTML( wfMsg( 'prefswitch-returnto', $this->originLink ) );
176 - }
177174 } else {
178175 $this->render( 'main' );
179176 }
@@ -182,14 +179,15 @@
183180
184181 private function render( $mode = null ) {
185182 global $wgUser, $wgOut, $wgPrefSwitchSurveys;
 183+ // Make sure links will retain the origin
 184+ $query = array( 'from' => $this->origin, 'fromquery' => $this->originQuery );
186185 if ( isset( $wgPrefSwitchSurveys[$mode] ) ) {
187 - $wgOut->addWikiMsg( "prefswitch-survey-{$mode}-intro" );
 186+ $wgOut->addWikiMsg( "prefswitch-survey-intro-{$mode}" );
188187 // Provide a "nevermind" link
189188 if ( $this->originTitle ) {
190 - $wgOut->addHTML( wfMsg( 'prefswitch-survey-cancel', $this->originLink ) );
 189+ $wgOut->addHTML( wfMsg( "prefswitch-survey-cancel-{$mode}", $this->originLink ) );
191190 }
192 - // Setup a form that will retain the origin on submission
193 - $query = array( 'from' => $this->origin, 'fromquery' => $this->originQuery );
 191+ // Setup a form
194192 $html = Xml::openElement(
195193 'form', array(
196194 'method' => 'post',
@@ -214,7 +212,15 @@
215213 $html .= Xml::closeElement( 'form' );
216214 $wgOut->addHtml( $html );
217215 } else {
218 - $wgOut->addWikiMsg( 'prefswitch-main' );
 216+ $wgOut->addWikiMsgArray(
 217+ 'prefswitch-main',
 218+ array(
 219+ $this->originLink,
 220+ $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'off' ) ) ),
 221+ $this->getTitle()->getLinkURL( array_merge( $query, array( 'mode' => 'feedback' ) ) )
 222+ ),
 223+ array( 'parse', 'replaceafter' )
 224+ );
219225 }
220226 }
221227 }

Status & tagging log