r77535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77534‎ | r77535 | r77536 >
Date:20:19, 1 December 2010
Author:tparscal
Status:resolved (Comments)
Tags:
Comment:
Setup support for the beta version
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -41,6 +41,23 @@
4242 'ext.articleFeedback-beta' => array(
4343 'scripts' => 'ext.articleFeedback-beta/ext.articleFeedback-beta.js',
4444 '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+ ),
4562 'dependencies' => array( 'jquery.tipsy' ),
4663 ),
4764 'jquery.stars' => array(
@@ -92,7 +109,7 @@
93110 * BeforePageDisplay hook
94111 */
95112 public static function beforePageDisplay( $out ) {
96 - global $wgRequest, $wgArticleFeedbackCategories;
 113+ global $wgRequest, $wgArticleFeedbackCategories, $wgArticleFeedbackVersion;
97114
98115 $title = $out->getTitle();
99116
@@ -109,8 +126,11 @@
110127 && count( $wgArticleFeedbackCategories )
111128 && self::isInCategories( $title->getArticleId(), $wgArticleFeedbackCategories )
112129 ) {
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+ }
115135 }
116136 return true;
117137 }
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php
@@ -5,10 +5,12 @@
66 * @author Nimish Gautam
77 * @author Sam Reed
88 * @author Brandon Harris
 9+ * @author Trevor Parscal
910 */
1011 $messages['en'] = array(
1112 'articlefeedback' => 'Article Feedback',
1213 'articlefeedback-desc' => 'Article Feedback',
 14+ /* Alpha Messages */
1315 'articlefeedback-alpha-yourfeedback' => 'Your feedback',
1416 'articlefeedback-alpha-pleaserate' => 'Please take a moment to rate this page below.',
1517 'articlefeedback-alpha-submit' => 'Submit',
@@ -45,6 +47,22 @@
4648 'articlefeedback-alpha-survey-submit' => 'Submit',
4749 'articlefeedback-alpha-survey-title' => 'Please answer a few questions',
4850 '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?',
4967 );
5068
5169 /** Message documentation (Message documentation)
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php
@@ -16,6 +16,9 @@
1717
1818 /* Configuration */
1919
 20+// Which version of the UI to render
 21+$wgArticleFeedbackVersion = 'alpha';
 22+
2023 // If the number of page revisions (since users last rating) is greater than this then consider the
2124 // last rating "stale"
2225 $wgArticleFeedbackStaleCount = 5;

Comments

#Comment by Siebrand (talk | contribs)   23:41, 1 December 2010

Please get rid of title case in messages.

#Comment by Catrope (talk | contribs)   23:36, 3 December 2010

Siebrand did this himself in r77616

Status & tagging log