Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.i18n.php |
— | — | @@ -20,8 +20,8 @@ |
21 | 21 | 'prefswitch-survey-cancel-off' => 'If you would like to continue using the new features, you can return to $1.', |
22 | 22 | 'prefswitch-survey-submit-feedback' => 'Send feedback', |
23 | 23 | '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?', |
26 | 26 | 'prefswitch-survey-question-whyoff' => 'Why are you turning off the new features? |
27 | 27 | Please select all that apply.', |
28 | 28 | 'prefswitch-survey-answer-whyoff-hard' => 'It was too hard to use.', |
— | — | @@ -58,13 +58,13 @@ |
59 | 59 | 'prefswitch-survey-answer-os-linux' => 'Linux', |
60 | 60 | 'prefswitch-survey-answer-os-other' => 'Other operating system:', |
61 | 61 | 'prefswitch-survey-question-res' => 'What is the resolution of your screen?', |
62 | | - 'prefswitch-title-on' => 'What\'s new?', |
| 62 | + 'prefswitch-title-on' => 'New features', |
63 | 63 | 'prefswitch-title-switched-on' => 'Enjoy!', |
64 | 64 | 'prefswitch-title-off' => 'Turn new features off', |
65 | 65 | 'prefswitch-title-switched-off' => 'Thanks', |
66 | 66 | '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.', |
69 | 69 | 'prefswitch-success-feedback' => 'Your feedback has been sent.', |
70 | 70 | 'prefswitch-return' => '<hr style="clear:both"> |
71 | 71 | Return to <span class="plainlinks">[$1 $2]</span>.', |
— | — | @@ -87,10 +87,10 @@ |
88 | 88 | If you would like to turn off the new features, please <span class=\"plainlinks\">[$2 click here]</span>.", |
89 | 89 | 'prefswitch-main-off' => "===Try them out!=== |
90 | 90 | 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}}]]".', |
93 | 93 | '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}}]]".', |
95 | 95 | ); |
96 | 96 | |
97 | 97 | /** Message documentation (Message documentation) |
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.php |
— | — | @@ -63,48 +63,14 @@ |
64 | 64 | 'submit-msg' => 'prefswitch-survey-submit-feedback', |
65 | 65 | 'updatable' => true, |
66 | 66 | 'questions' => array( |
67 | | - 'likedislike' => array( |
68 | | - 'question' => 'prefswitch-survey-question-likedislike', |
| 67 | + 'like' => array( |
| 68 | + 'question' => 'prefswitch-survey-question-like', |
69 | 69 | 'type' => 'text', |
70 | 70 | ), |
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', |
92 | 74 | ), |
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 | | - ), |
109 | 75 | ), |
110 | 76 | ); |
111 | 77 | $wgPrefSwitchSurveys['off'] = array( |
— | — | @@ -129,6 +95,48 @@ |
130 | 96 | ) |
131 | 97 | ), |
132 | 98 | ); |
| 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 ); |
133 | 141 | |
134 | 142 | /* Setup */ |
135 | 143 | |
Index: trunk/extensions/UsabilityInitiative/PrefSwitch/PrefSwitch.hooks.php |
— | — | @@ -32,6 +32,21 @@ |
33 | 33 | $query = array( 'from' => $title->getPrefixedDBKey(), 'fromquery' => wfArrayToCGI( $fromquery ) ); |
34 | 34 | } |
35 | 35 | $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 | + } |
36 | 51 | // Inserts a link into personal tools - Uses prefswitch-link-anon, prefswitch-link-on and prefswitch-link-off |
37 | 52 | $personal_urls = array_merge( |
38 | 53 | array( |