r66280 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66279‎ | r66280 | r66281 >
Date:18:57, 12 May 2010
Author:tparscal
Status:ok
Tags:
Comment:
Changed around links, questions and language to meet new specifications.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.i18n.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.i18n.php
@@ -20,8 +20,8 @@
2121 'prefswitch-survey-cancel-off' => 'If you would like to continue using the new features, you can return to $1.',
2222 'prefswitch-survey-submit-feedback' => 'Send feedback',
2323 'prefswitch-survey-cancel-feedback' => 'If you do not want to provide feedback, you can return to $1.',
24 - 'prefswitch-survey-question-likedislike' => 'What did you like about the new features?
25 -What did you dislike about the features?',
 24+ 'prefswitch-survey-question-like' => 'What did you like about the new features?',
 25+ 'prefswitch-survey-question-dislike' => 'What did you dislike about the features?',
2626 'prefswitch-survey-question-whyoff' => 'Why are you turning off the new features?
2727 Please select all that apply.',
2828 'prefswitch-survey-answer-whyoff-hard' => 'It was too hard to use.',
@@ -58,13 +58,13 @@
5959 'prefswitch-survey-answer-os-linux' => 'Linux',
6060 'prefswitch-survey-answer-os-other' => 'Other operating system:',
6161 'prefswitch-survey-question-res' => 'What is the resolution of your screen?',
62 - 'prefswitch-title-on' => 'What\'s new?',
 62+ 'prefswitch-title-on' => 'New features',
6363 'prefswitch-title-switched-on' => 'Enjoy!',
6464 'prefswitch-title-off' => 'Turn new features off',
6565 'prefswitch-title-switched-off' => 'Thanks',
6666 'prefswitch-title-feedback' => 'Feedback',
67 - 'prefswitch-success-on' => 'New features are now turned on.',
68 - 'prefswitch-success-off' => 'New features are now turned off.',
 67+ 'prefswitch-success-on' => 'New features are now turned on. We hope you enjoy using the new features. You may always turn them back off by clicking on the "[[Special:UsabilityInitiativePrefSwitch|Take me back]]" link at the top of the page.',
 68+ 'prefswitch-success-off' => 'New features are now turned off. Thanks for trying the new features. You may always turn them back on by clicking on the "[[Special:UsabilityInitiativePrefSwitch|New features]]" link at the top of the page.',
6969 'prefswitch-success-feedback' => 'Your feedback has been sent.',
7070 'prefswitch-return' => '<hr style="clear:both">
7171 Return to <span class="plainlinks">[$1 $2]</span>.',
@@ -87,10 +87,10 @@
8888 If you would like to turn off the new features, please <span class=\"plainlinks\">[$2 click here]</span>.",
8989 'prefswitch-main-off' => "===Try them out!===
9090 If you would like to turn on the new features, please <span class=\"plainlinks\">[$1 click here]</span>.",
91 - 'prefswitch-survey-intro-feedback' => "We would love to hear from you.
92 -Please fill out the optional survey below.",
 91+ 'prefswitch-survey-intro-feedback' => 'We would love to hear from you.
 92+Please fill out the optional survey below before clicking "[[#prefswitch-survey-submit-feedback|{{int:prefswitch-survey-submit-feedback}}]]".',
9393 'prefswitch-survey-intro-off' => 'Thanks for trying out our new features.
94 -To help us improve them, please fill out the optional survey below.',
 94+To help us improve them, please fill out the optional survey below before clicking "[[#prefswitch-survey-submit-off|{{int:prefswitch-survey-submit-off}}]]".',
9595 );
9696
9797 /** Message documentation (Message documentation)
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.php
@@ -63,48 +63,14 @@
6464 'submit-msg' => 'prefswitch-survey-submit-feedback',
6565 'updatable' => true,
6666 'questions' => array(
67 - 'likedislike' => array(
68 - 'question' => 'prefswitch-survey-question-likedislike',
 67+ 'like' => array(
 68+ 'question' => 'prefswitch-survey-question-like',
6969 'type' => 'text',
7070 ),
71 - 'browser' => array(
72 - 'question' => 'prefswitch-survey-question-browser',
73 - 'type' => 'select',
74 - 'answers' => array(
75 - 'ie5' => 'prefswitch-survey-answer-browser-ie5',
76 - 'ie6' => 'prefswitch-survey-answer-browser-ie6',
77 - 'ie7' => 'prefswitch-survey-answer-browser-ie7',
78 - 'ie8' => 'prefswitch-survey-answer-browser-ie8',
79 - 'ff1' => 'prefswitch-survey-answer-browser-ff1',
80 - 'ff2' => 'prefswitch-survey-answer-browser-ff2',
81 - 'ff3'=> 'prefswitch-survey-answer-browser-ff3',
82 - 'cb' => 'prefswitch-survey-answer-browser-cb',
83 - 'c1' => 'prefswitch-survey-answer-browser-c1',
84 - 'c2' => 'prefswitch-survey-answer-browser-c2',
85 - 's3' => 'prefswitch-survey-answer-browser-s3',
86 - 's4' => 'prefswitch-survey-answer-browser-s4',
87 - 'o9' => 'prefswitch-survey-answer-browser-o9',
88 - 'o9.5' => 'prefswitch-survey-answer-browser-o9.5',
89 - 'o10' => 'prefswitch-survey-answer-browser-o10',
90 - ),
91 - 'other' => 'prefswitch-survey-answer-browser-other',
 71+ 'dislike' => array(
 72+ 'question' => 'prefswitch-survey-question-dislike',
 73+ 'type' => 'text',
9274 ),
93 - 'os' => array(
94 - 'question' => 'prefswitch-survey-question-os',
95 - 'type' => 'select',
96 - 'answers' => array(
97 - 'windows' => 'prefswitch-survey-answer-os-windows',
98 - 'windowsmobile' => 'prefswitch-survey-answer-os-windowsmobile',
99 - 'macos' => 'prefswitch-survey-answer-os-macos',
100 - 'iphoneos' => 'prefswitch-survey-answer-os-iphoneos',
101 - 'linux' => 'prefswitch-survey-answer-os-linux',
102 - ),
103 - 'other' => 'prefswitch-survey-answer-os-other',
104 - ),
105 - 'res' => array(
106 - 'question' => 'prefswitch-survey-question-res',
107 - 'type' => 'dimensions',
108 - ),
10975 ),
11076 );
11177 $wgPrefSwitchSurveys['off'] = array(
@@ -129,6 +95,48 @@
13096 )
13197 ),
13298 );
 99+// Always include the browser stuff...
 100+foreach ( $wgPrefSwitchSurveys as &$survey ) {
 101+ $survey['questions']['browser'] = array(
 102+ 'question' => 'prefswitch-survey-question-browser',
 103+ 'type' => 'select',
 104+ 'answers' => array(
 105+ 'ie5' => 'prefswitch-survey-answer-browser-ie5',
 106+ 'ie6' => 'prefswitch-survey-answer-browser-ie6',
 107+ 'ie7' => 'prefswitch-survey-answer-browser-ie7',
 108+ 'ie8' => 'prefswitch-survey-answer-browser-ie8',
 109+ 'ff1' => 'prefswitch-survey-answer-browser-ff1',
 110+ 'ff2' => 'prefswitch-survey-answer-browser-ff2',
 111+ 'ff3'=> 'prefswitch-survey-answer-browser-ff3',
 112+ 'cb' => 'prefswitch-survey-answer-browser-cb',
 113+ 'c1' => 'prefswitch-survey-answer-browser-c1',
 114+ 'c2' => 'prefswitch-survey-answer-browser-c2',
 115+ 's3' => 'prefswitch-survey-answer-browser-s3',
 116+ 's4' => 'prefswitch-survey-answer-browser-s4',
 117+ 'o9' => 'prefswitch-survey-answer-browser-o9',
 118+ 'o9.5' => 'prefswitch-survey-answer-browser-o9.5',
 119+ 'o10' => 'prefswitch-survey-answer-browser-o10',
 120+ ),
 121+ 'other' => 'prefswitch-survey-answer-browser-other',
 122+ );
 123+ $survey['questions']['os'] = array(
 124+ 'question' => 'prefswitch-survey-question-os',
 125+ 'type' => 'select',
 126+ 'answers' => array(
 127+ 'windows' => 'prefswitch-survey-answer-os-windows',
 128+ 'windowsmobile' => 'prefswitch-survey-answer-os-windowsmobile',
 129+ 'macos' => 'prefswitch-survey-answer-os-macos',
 130+ 'iphoneos' => 'prefswitch-survey-answer-os-iphoneos',
 131+ 'linux' => 'prefswitch-survey-answer-os-linux',
 132+ ),
 133+ 'other' => 'prefswitch-survey-answer-os-other',
 134+ );
 135+ $survey['questions']['res'] = array(
 136+ 'question' => 'prefswitch-survey-question-res',
 137+ 'type' => 'dimensions',
 138+ );
 139+}
 140+unset( $survey );
133141
134142 /* Setup */
135143
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php
@@ -32,6 +32,21 @@
3333 $query = array( 'from' => $title->getPrefixedDBKey(), 'fromquery' => wfArrayToCGI( $fromquery ) );
3434 }
3535 $state = SpecialPrefSwitch::userState( $wgUser );
 36+ if ( $state == 'on' ) {
 37+ // Inserts a link into personal tools - this just gets people to the generic new features page
 38+ $personal_urls = array_merge(
 39+ array(
 40+ "prefswitch-link-anon" => array(
 41+ 'text' => wfMsg( 'prefswitch-link-anon' ),
 42+ 'href' => SpecialPage::getTitleFor( 'PrefSwitch' )->getFullURL( $query ),
 43+ 'class' => 'no-text-transform',
 44+ ),
 45+ ),
 46+ $personal_urls
 47+ );
 48+ // Make the next link go to the opt-out page
 49+ $query['mode'] = 'off';
 50+ }
3651 // Inserts a link into personal tools - Uses prefswitch-link-anon, prefswitch-link-on and prefswitch-link-off
3752 $personal_urls = array_merge(
3853 array(

Follow-up revisions

RevisionCommit summaryAuthorDate
r66312Follow-up r66280: Capitalize message key to avoid problems with some wikis wi...raymond22:13, 12 May 2010

Status & tagging log