r106453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106452‎ | r106453 | r106454 >
Date:18:17, 16 December 2011
Author:rmoen
Status:ok (Comments)
Tags:todo 
Comment:
un-hardcoded sitename from dashboard description followup r105613
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -106,7 +106,7 @@
107107 * @return string HTML
108108 */
109109 public function buildForm( $filterType ) {
110 - global $wgRequest, $wgMoodBarConfig;
 110+ global $wgRequest, $wgMoodBarConfig, $wgSitename;
111111 $filtersMsg = wfMessage( 'moodbar-feedback-filters' )->escaped();
112112 $typeMsg = wfMessage( 'moodbar-feedback-filters-type' )->escaped();
113113 $praiseMsg = wfMessage( 'moodbar-feedback-filters-type-happy' )->escaped();
@@ -131,7 +131,7 @@
132132
133133 $moodbarStat = $this->getMoodBarTypeStats();
134134 $moodbarStatMsg = wfMessage( 'moodbar-type-stats' )->params( $moodbarStat['happy'], $moodbarStat['sad'], $moodbarStat['confused'] )->escaped();
135 - $feedbackDashboardDescription = wfMessage( 'moodbar-feedback-description' ); // don't escape because there is html
 135+ $feedbackDashboardDescription = wfMessage( 'moodbar-feedback-description' )->params( $wgSitename ); // don't escape because there is html
136136
137137 return <<<HTML
138138 <div id="fbd-description">
Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -95,7 +95,7 @@
9696 'moodbar-header-own-talk' => 'Own talk page',
9797 // Special:MoodBarFeedback
9898 'moodbar-feedback-title' => 'Feedback dashboard',
99 - 'moodbar-feedback-description' => "This dashboard displays comments from new editors about their experiences editing Wikipedia. [http://en.wikipedia.org/wiki/Wikipedia:New_editor_feedback Learn More]",
 99+ 'moodbar-feedback-description' => "This dashboard displays comments from new editors about their experiences editing $1. [http://en.wikipedia.org/wiki/Wikipedia:New_editor_feedback Learn More]",
100100 'moodbar-feedback-response-title' => '==In response to your [[$1|feedback]]==',
101101 'moodbar-feedback-view-link' => '(View the feedback)',
102102 'moodbar-feedback-filters' => 'Filters',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105613created moodbar user email input / confirm templates and js to post to new ap...rmoen23:43, 8 December 2011

Comments

#Comment by SPQRobin (talk | contribs)   23:30, 16 December 2011

Maybe make the link also not Wikipedia-specific. E.g. a different message with a link destination (in the content language), and then pass it as parameter: [$2 Learn More] or an internal link [[$2|Learn More]].

(Also, since the message is not used in javascript, using {{SITENAME}} instead of a parameter would be sufficient as well.)

#Comment by Raindrift (talk | contribs)   19:21, 19 December 2011

The link could be stored in DefaultSettings. Marking todo. It'd be nice to make the code less WP-specific, but I don't think it's urgent.

#Comment by SPQRobin (talk | contribs)   19:30, 19 December 2011

A message (changeable on-wiki) is preferred to a configuration setting if there is no clear advantage for a setting. It's not "urgent" but it's easy enough to fix it quickly.

Status & tagging log