Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -41,6 +41,23 @@ |
42 | 42 | 'ext.articleFeedback-beta' => array( |
43 | 43 | 'scripts' => 'ext.articleFeedback-beta/ext.articleFeedback-beta.js', |
44 | 44 | 'styles' => 'ext.articleFeedback-beta/ext.articleFeedback-beta.css', |
| 45 | + 'messages' => array( |
| 46 | + 'articlefeedback-beta-form-tab-label', |
| 47 | + 'articlefeedback-beta-form-panel-title', |
| 48 | + 'articlefeedback-beta-form-panel-instructions', |
| 49 | + 'articlefeedback-beta-form-panel-notice', |
| 50 | + 'articlefeedback-beta-form-panel-submit', |
| 51 | + 'articlefeedback-beta-report-tab-label', |
| 52 | + 'articlefeedback-beta-report-panel-title', |
| 53 | + 'articlefeedback-beta-field-wellsourced-label', |
| 54 | + 'articlefeedback-beta-field-wellsourced-tip', |
| 55 | + 'articlefeedback-beta-field-complete-label', |
| 56 | + 'articlefeedback-beta-field-complete-tip', |
| 57 | + 'articlefeedback-beta-field-neutral-label', |
| 58 | + 'articlefeedback-beta-field-neutral-tip', |
| 59 | + 'articlefeedback-beta-field-readable-label', |
| 60 | + 'articlefeedback-beta-field-readable-tip', |
| 61 | + ), |
45 | 62 | 'dependencies' => array( 'jquery.tipsy' ), |
46 | 63 | ), |
47 | 64 | 'jquery.stars' => array( |
— | — | @@ -92,7 +109,7 @@ |
93 | 110 | * BeforePageDisplay hook |
94 | 111 | */ |
95 | 112 | public static function beforePageDisplay( $out ) { |
96 | | - global $wgRequest, $wgArticleFeedbackCategories; |
| 113 | + global $wgRequest, $wgArticleFeedbackCategories, $wgArticleFeedbackVersion; |
97 | 114 | |
98 | 115 | $title = $out->getTitle(); |
99 | 116 | |
— | — | @@ -109,8 +126,11 @@ |
110 | 127 | && count( $wgArticleFeedbackCategories ) |
111 | 128 | && self::isInCategories( $title->getArticleId(), $wgArticleFeedbackCategories ) |
112 | 129 | ) { |
113 | | - $out->addModules( 'ext.articleFeedback-alpha' ); |
114 | | - //$out->addModules( 'ext.articleFeedback-beta' ); |
| 130 | + if ( $wgArticleFeedbackVersion == 'beta' ) { |
| 131 | + $out->addModules( 'ext.articleFeedback-beta' ); |
| 132 | + } else { |
| 133 | + $out->addModules( 'ext.articleFeedback-alpha' ); |
| 134 | + } |
115 | 135 | } |
116 | 136 | return true; |
117 | 137 | } |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -5,10 +5,12 @@ |
6 | 6 | * @author Nimish Gautam |
7 | 7 | * @author Sam Reed |
8 | 8 | * @author Brandon Harris |
| 9 | + * @author Trevor Parscal |
9 | 10 | */ |
10 | 11 | $messages['en'] = array( |
11 | 12 | 'articlefeedback' => 'Article Feedback', |
12 | 13 | 'articlefeedback-desc' => 'Article Feedback', |
| 14 | + /* Alpha Messages */ |
13 | 15 | 'articlefeedback-alpha-yourfeedback' => 'Your feedback', |
14 | 16 | 'articlefeedback-alpha-pleaserate' => 'Please take a moment to rate this page below.', |
15 | 17 | 'articlefeedback-alpha-submit' => 'Submit', |
— | — | @@ -45,6 +47,22 @@ |
46 | 48 | 'articlefeedback-alpha-survey-submit' => 'Submit', |
47 | 49 | 'articlefeedback-alpha-survey-title' => 'Please answer a few questions', |
48 | 50 | 'articlefeedback-alpha-survey-thanks' => 'Thanks for filling out the survey.', |
| 51 | + /* Beta Messages */ |
| 52 | + 'articlefeedback-beta-form-tab-label' => 'Provide Feedback', |
| 53 | + 'articlefeedback-beta-form-panel-title' => 'Your Feedback', |
| 54 | + 'articlefeedback-beta-form-panel-instructions' => 'Please take a moment to rate this page.', |
| 55 | + 'articlefeedback-beta-form-panel-notice' => 'Your ratings will expire over time.', |
| 56 | + 'articlefeedback-beta-form-panel-submit' => 'Submit feedback', |
| 57 | + 'articlefeedback-beta-report-tab-label' => 'Show Results', |
| 58 | + 'articlefeedback-beta-report-panel-title' => 'Feedback Results', |
| 59 | + 'articlefeedback-beta-field-wellsourced-label' => 'Well-sourced', |
| 60 | + 'articlefeedback-beta-field-wellsourced-tip' => 'Do you feel this page has sufficient citations and that those citations come from trustworthy sources?', |
| 61 | + 'articlefeedback-beta-field-complete-label' => 'Complete', |
| 62 | + 'articlefeedback-beta-field-complete-tip' => 'Do you feel that this page covers the essential topic areas that it should?', |
| 63 | + 'articlefeedback-beta-field-neutral-label' => 'Neutral', |
| 64 | + 'articlefeedback-beta-field-neutral-tip' => 'Do you feel that this page shows a fair representation of all perspectives on the issue?', |
| 65 | + 'articlefeedback-beta-field-readable-label' => 'Readable', |
| 66 | + 'articlefeedback-beta-field-readable-tip' => 'Do you feel that this page is well-organized and well written?', |
49 | 67 | ); |
50 | 68 | |
51 | 69 | /** Message documentation (Message documentation) |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php |
— | — | @@ -16,6 +16,9 @@ |
17 | 17 | |
18 | 18 | /* Configuration */ |
19 | 19 | |
| 20 | +// Which version of the UI to render |
| 21 | +$wgArticleFeedbackVersion = 'alpha'; |
| 22 | + |
20 | 23 | // If the number of page revisions (since users last rating) is greater than this then consider the |
21 | 24 | // last rating "stale" |
22 | 25 | $wgArticleFeedbackStaleCount = 5; |