r104760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104759‎ | r104760 | r104761 >
Date:21:55, 30 November 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Merge MoodBar to trunk state
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MoodBar/ApiFeedbackDashboardResponse.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/ApiQueryMoodBarComments.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/Formatter.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/SpecialFeedbackDashboard.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-error.png (added) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-success.png (added) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.elastic (added) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MoodBar/sql/mbfr_timestamp_id_index.sql (added) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MoodBar/SpecialFeedbackDashboard.php
@@ -128,9 +128,10 @@
129129 * @param $params An array of flags. Valid flags:
130130 * * admin (user can show/hide feedback items)
131131 * * show-anyway (user has asked to see this hidden item)
 132+ * @param $response An array of response for feedback
132133 * @return string HTML
133134 */
134 - public static function formatListItem( $row, $params = array() ) {
 135+ public static function formatListItem( $row, $params = array(), $response = array() ) {
135136 global $wgLang, $wgUser;
136137
137138 $classes = array('fbd-item');
@@ -142,6 +143,7 @@
143144 $feedbackItem = MBFeedbackItem::load( $row );
144145 }
145146 catch (Exception $e) {
 147+ $classes = Sanitizer::encodeAttribute( implode(' ', $classes) );
146148 $error_message = wfMessage('moodbar-feedback-load-record-error')->escaped();
147149 return <<<HTML
148150 <li class="$classes">
@@ -200,22 +202,10 @@
201203
202204 }
203205
204 - //only show response elements if feedback is not hidden, and user is logged in
205 - if ($feedbackItem->getProperty('hidden-state') == false
206 - && !$wgUser->isAnon() ) {
207 - $respondToThis = "<span>".wfMessage('moodbar-respond-collapsed')->escaped().'</span> '.wfMessage("moodbar-respond-text")->escaped();
208 - $responseElements = <<<HTML
209 - <div class="fbd-item-response">
210 - <a class="fbd-respond-link">$respondToThis</a>
211 - </div>
212 -HTML;
213 - }
 206+ $responseElements = self::buildResponseElement( $feedbackItem, $response );
214207
215208 $classes = Sanitizer::encodeAttribute( implode(' ', $classes) );
216209 $toolLinks = implode("\n", $toolLinks );
217 - if (!isset($responseElements)) {
218 - $responseElements = "";
219 - }
220210
221211 return <<<HTML
222212 <li class="$classes" data-mbccontinue="$continueData">
@@ -232,6 +222,66 @@
233223 HTML;
234224 }
235225
 226+ protected static function buildResponseElement( $feedbackItem, $response ) {
 227+ global $wgLang, $wgUser;
 228+
 229+ $responseElements = '';
 230+
 231+ $id = $feedbackItem->getProperty('id');
 232+
 233+ $showResponseBox = true;
 234+
 235+ //Do not show response box if there is a response already
 236+ if ( isset( $response[$id] ) ) {
 237+ //for now we only display the latest response
 238+ foreach ( $response[$id] AS $response_detail ) {
 239+
 240+ $responder = User::newFromId( $response_detail->mbfr_user_id );
 241+
 242+ if ( !$responder->isAnon() ) {
 243+
 244+ $now = wfTimestamp( TS_UNIX );
 245+ $responsetimestamp = wfTimestamp( TS_UNIX, $response_detail->mbfr_timestamp );
 246+
 247+ $responsetime = $wgLang->formatTimePeriod( $now - $responsetimestamp,
 248+ array( 'avoid' => 'avoidminutes', 'noabbrevs' => true )
 249+ );
 250+
 251+ $permalinkTitle = $feedbackItem->getProperty('user')->getTalkPage()->getFullText();
 252+
 253+ $individual_response = wfMsgExt('moodbar-feedback-response-summary', array('parse'),
 254+ $responder->getUserPage()->getFullText(),
 255+ $responder->getName(),
 256+ $permalinkTitle . '#feedback-dashboard-response-' . $response_detail->mbfr_id,
 257+ $responsetime);
 258+ $showResponseBox = false;
 259+
 260+ $responseElements = <<<HTML
 261+ <div class="fbd-item-response">
 262+ $individual_response
 263+ </div>
 264+HTML;
 265+ break;
 266+
 267+ }
 268+ }
 269+
 270+ }
 271+ //only show response elements if feedback is not hidden, and user is logged in
 272+ else if ( $showResponseBox && $feedbackItem->getProperty('hidden-state') == false
 273+ && !$wgUser->isAnon() ) {
 274+ $respondToThis = "<span>".wfMessage('moodbar-respond-collapsed')->escaped().'</span> '.wfMessage("moodbar-respond-text")->escaped();
 275+ $responseElements = <<<HTML
 276+ <div class="fbd-item-response">
 277+ <a class="fbd-respond-link">$respondToThis</a>
 278+ </div>
 279+HTML;
 280+ }
 281+
 282+ return $responseElements;
 283+
 284+ }
 285+
236286 /**
237287 * Build the "user information" part of an item on the feedback dashboard.
238288 * @param $feedbackItem MBFeedbackItem representing the feedback to show
@@ -350,8 +400,10 @@
351401 }
352402 }
353403
 404+ $response = self::getResponseSummary( $res['rows'] );
 405+
354406 foreach ( $res['rows'] as $row ) {
355 - $list .= self::formatListItem( $row, $params );
 407+ $list .= self::formatListItem( $row, $params, $response );
356408 }
357409
358410 if ( $list === '' ) {
@@ -555,4 +607,37 @@
556608 );
557609 }
558610
 611+ /**
 612+ * Get the response summary for a set of feedback
 613+ * @param $res Iterator of Db row with index mbf_id for feedback
 614+ * @return array
 615+ */
 616+ public static function getResponseSummary( $res ) {
 617+ $dbr = wfGetDB( DB_SLAVE );
 618+
 619+ $feedback = array();
 620+
 621+ foreach ( $res as $row ) {
 622+ $feedback[] = $row->mbf_id;
 623+ }
 624+
 625+ $response = array();
 626+
 627+ if ( count( $feedback ) > 0 ) {
 628+ $res = $dbr->select( array( 'moodbar_feedback_response' ),
 629+ array( 'mbfr_id', 'mbfr_mbf_id', 'mbfr_user_id', 'mbfr_timestamp' ),
 630+ array( 'mbfr_mbf_id' => $feedback, 'mbfr_user_id != 0' ),
 631+ __METHOD__,
 632+ array( 'ORDER BY' => "mbfr_mbf_id DESC, mbfr_timestamp DESC, mbfr_id DESC" )
 633+ );
 634+
 635+ foreach ( $res AS $row ) {
 636+ $response[$row->mbfr_mbf_id][] = $row;
 637+ }
 638+ }
 639+
 640+
 641+ return $response;
 642+ }
 643+
559644 }
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php
@@ -37,7 +37,7 @@
3838 'moodbar-respond-expanded' => '▼', // Ignore, do not translate. &#x25BC;
3939 'moodbar-respond-text' => 'Respond to this',
4040 'moodbar-response-add' => 'Add a response',
41 - 'moodbar-response-nosig' => 'signature not required',
 41+ 'moodbar-response-desc' => 'Response will reference original comment. Signature not required.',
4242 'moodbar-response-btn' => 'Send response',
4343 'moodbar-what-content' => 'This feature is designed to help the community understand the experience of people editing the site.
4444 For more information, please visit the $1.',
@@ -80,7 +80,7 @@
8181 'moodbar-header-own-talk' => 'Own talk page',
8282 // Special:MoodBarFeedback
8383 'moodbar-feedback-title' => 'Feedback dashboard',
84 - 'moodbar-feedback-response-title' => 'Feedback dashboard response',
 84+ 'moodbar-feedback-response-title' => '==In response to your [[$1|feedback]]==',
8585 'moodbar-feedback-view-link' => '(View the feedback)',
8686 'moodbar-feedback-filters' => 'Filters',
8787 'moodbar-feedback-filters-type' => 'Mood:',
@@ -116,6 +116,7 @@
117117 'moodbar-restore-intro' => '',
118118 'moodbar-invalid-item' => 'The system was unable to find the correct feedback item.',
119119 'moodbar-feedback-action-error' => 'An error occurred when trying to perform this action.',
 120+ 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|responded]] to this comment $4 ago',
120121 // Mood types
121122 'moodbar-type-happy' => '{{GENDER:$1|Happy}}',
122123 'moodbar-type-sad' => '{{GENDER:$1|Sad}}',
@@ -130,15 +131,19 @@
131132 'moodbar-log-hide' => 'hid [[$1]]',
132133 'moodbar-log-restore' => 'restored the visibility for [[$1]]',
133134 //Feedback Response
134 - 'moodbar-response-ula' => 'By clicking the "$1" button, you agree to the $2, and you irrevocably agree to release your contribution under the under the $3 license and the $4.
135 -You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.',
136 - 'moodbar-response-terms-of-use' => 'Terms of use',
137 - 'moodbar-response-terms-of-use-link' => '#',
138 - 'moodbar-response-cc' => 'Creative Commons',
139 - 'moodbar-response-cc-link' => 'http://creativecommons.org/licenses/by-sa/3.0/us/legalcode',
140 - 'moodbar-response-gfdl' => 'GFDL',
141 - 'moodbar-response-gfdl-link' => 'http://www.gnu.org/copyleft/fdl.html',
142 - 'feedbackresponse-success' => 'Thank you. Your response was added to the user\'s talk page.',
 135+ 'moodbar-response-terms' => 'By submitting, you agree to transparency under these $1.',
 136+ 'moodbar-response-link' => 'terms',
 137+ 'moodbar-response-url' => '//wikimediafoundation.org/wiki/Feedback_privacy_statement',
 138+ 'response-back-text' => 'Back',
 139+ 'response-preview-text' => 'Preview',
 140+ 'response-ajax-action-head' => 'Responding...',
 141+ 'response-ajax-action-body' => 'Your response is being added.',
 142+ 'response-ajax-success-head' => 'Thanks!',
 143+ 'response-ajax-success-body' => 'Your response has been added.',
 144+ 'response-ajax-error-head' => 'Oops!',
 145+ 'response-ajax-error-body' => 'There was an error adding your response. <br />Please try again later.',
 146+
 147+
143148 );
144149
145150 /** Message documentation (Message documentation)
@@ -180,7 +185,7 @@
181186 'moodbar-respond-expanded' => 'Special character for response form expanded',
182187 'moodbar-respond-text' => 'Text for Response toggle',
183188 'moodbar-response-add' => 'Text for Response heading',
184 - 'moodbar-response-nosig' => 'Text explaining signature is not required',
 189+ 'moodbar-response-desc' => 'Text explaining signature is not required, and indicating that the original feedback will be referenced in response',
185190 'moodbar-response-btn' => 'Text for Response button',
186191 'moodbar-what-content' => '$1 is the message {{msg-mw|moodbar-what-link}} which links to the page [[mw:MoodBar|MoodBar]] on MediaWiki.org.',
187192 'moodbar-what-link' => 'This is the link embedded as parameter $1 in {{msg-mw|moodbar-what-content}}.',
@@ -213,7 +218,7 @@
214219 'moodbar-header-user' => '{{Identical|User}}',
215220 'moodbar-header-comment' => '{{Identical|Comment}}',
216221 'moodbar-header-namespace' => '{{Identical|Namespace}}',
217 - 'moodbar-feedback-response-title' => 'The title for appending feedback response text to a user talk page',
 222+ 'moodbar-feedback-response-title' => 'The title for appending feedback response text to a user talk page, $1 is the dashboard page',
218223 'moodbar-feedback-view-link' => 'link to an individual feedback',
219224 'moodbar-feedback-filters' => '{{Identical|Filter}}',
220225 'moodbar-feedback-filters-type' => '{{Identical|Mood}}',
@@ -236,19 +241,23 @@
237242 'moodbar-hidden-footer-without-log' => '* $1 is a link to restore the item displaying {{msg-mw|moodbar-feedback-restore}}',
238243 'moodbar-action-reason' => 'Text for Admin action reason',
239244 'moodbar-action-reason-required' => 'Text explaining admin action reason is required',
 245+ 'moodbar-feedback-response-summary' => 'Text providing a summary of a user response, $1 is user page, $2 is user name, $3 is user talk page, $4 is time',
240246 'moodbar-type-happy' => '$1 is the username that can be used for GENDER',
241247 'moodbar-type-sad' => '$1 is the username that can be used for GENDER',
242248 'moodbar-type-confused' => '$1 is the username that can be used for GENDER',
243249 'moodbar-user-ip' => '{{Identical|IP Address}}',
244 - 'moodbar-response-ula' => 'Text of the user license agreement. Parameters:
245 -* $1 {{msg-mw|moodbar-response-btn}}
246 -* $2 {{msg-mw|moodbar-response-terms-of-use}}
247 -* $3 {{msg-mw|moodbar-response-cc}}
248 -* $4 {{msg-mw|moodbar-response-gfdl}}',
249 - 'moodbar-response-terms-of-use' => 'Terms of Use Text',
250 - 'moodbar-response-cc' => 'Creative Commons Text',
251 - 'moodbar-response-gfdl' => 'GFDL Text',
252 - 'feedbackresponse-success' => 'Text for successful feedback response',
 250+ 'moodbar-response-terms' => 'Text of the user license agreement. Parameters:
 251+* $1 {{msg-mw|moodbar-response-link}}',
 252+ 'moodbar-response-link' => 'Terms of Use Text',
 253+ 'moodbar-response-url' => 'Terms of use URL',
 254+ 'response-back-text' => 'Text for response preview back button',
 255+ 'response-preview-text' => 'Text for preview response preview button',
 256+ 'response-ajax-action-head' => 'Text for ajax status heading while request is being made',
 257+ 'response-ajax-action-body' => 'Text for ajax status body while request is being made (can be html)',
 258+ 'response-ajax-success-head' => 'Text for ajax status heading on successful response',
 259+ 'response-ajax-success-body' => 'Text for ajax status body on successful response (can be html)',
 260+ 'response-ajax-error-head' => 'Text for ajax status heading on error',
 261+ 'response-ajax-error-body' => 'Text for ajax status body on error (can be html)',
253262 );
254263
255264 /** Afrikaans (Afrikaans)
@@ -303,7 +312,7 @@
304313 'moodbar-trigger-feedback' => 'تعليق على التحرير',
305314 'moodbar-trigger-share' => 'تبادل الخبرات',
306315 'moodbar-trigger-editing' => 'تعديل $1...',
307 - 'moodbar-close' => '(إغلاق)',
 316+ 'moodbar-close' => '(أغلق)',
308317 'moodbar-intro-feedback' => 'تعديل $1 جعلني...',
309318 'moodbar-intro-share' => 'تجربتي في $1 جعلتني...',
310319 'moodbar-intro-editing' => 'تعديل $1 جعلني...',
@@ -353,11 +362,11 @@
354363 'moodbar-feedback-title' => 'لوحة الملاحظات',
355364 'moodbar-feedback-filters' => 'مرشحات',
356365 'moodbar-feedback-filters-type' => 'النوع:',
357 - 'moodbar-feedback-filters-type-happy' => 'شكر',
358 - 'moodbar-feedback-filters-type-confused' => 'إرتباك',
359 - 'moodbar-feedback-filters-type-sad' => 'قضايا',
 366+ 'moodbar-feedback-filters-type-happy' => 'سعيد',
 367+ 'moodbar-feedback-filters-type-confused' => 'مرتبك',
 368+ 'moodbar-feedback-filters-type-sad' => 'حزين',
360369 'moodbar-feedback-filters-username' => 'اسم المستخدم',
361 - 'moodbar-feedback-filters-button' => 'إضبط المرشحات',
 370+ 'moodbar-feedback-filters-button' => 'اضبط المُرشِّحات',
362371 'moodbar-feedback-whatis' => 'ماهذه الميزة؟',
363372 'moodbar-feedback-permalink' => 'وصلة تصل الى هنا',
364373 'moodbar-feedback-noresults' => 'لا يوجد تعليقات مطابقة للمرشحات الخاصة بك.',
@@ -370,9 +379,12 @@
371380 'moodbar-comment-hidden' => '(الملاحظات مخفية بواسطة إجراءات إدارية)',
372381 'moodbar-feedback-show' => 'أظهر الملاحظات المخفية',
373382 'moodbar-feedback-hide' => 'إخف الملاحظات',
 383+ 'moodbar-feedback-action-confirm' => 'أكّد',
 384+ 'moodbar-feedback-action-cancel' => 'ألغِ',
374385 'moodbar-hidden-footer' => 'الملاحظات المخفية$1',
375386 'moodbar-feedback-restore' => 'إستعد الملاحظات المخفية',
376387 'moodbar-action-item' => 'بند الملاحظات:',
 388+ 'moodbar-action-reason' => 'السبب:',
377389 'moodbar-hide-header' => 'إخف هذا العنصر من الظهور',
378390 'moodbar-restore-header' => 'إستعد ظهور هذا العنصر',
379391 'moodbar-invalid-item' => 'لم يتمكن النظام من العثور على عنصر الملاحظات الصحيح.',
@@ -661,7 +673,7 @@
662674 'moodbar-respond-expanded' => '▼',
663675 'moodbar-respond-text' => 'Hierauf antworten',
664676 'moodbar-response-add' => 'Eine Antwort hinzufügen',
665 - 'moodbar-response-nosig' => 'Eine Signatur ist nicht erforderlich.',
 677+ 'moodbar-response-desc' => 'Die Antwort wird auf den ursprünglichen Kommentar verweisen. Eine Signatur ist nicht erforderlich.',
666678 'moodbar-response-btn' => 'Antwort senden',
667679 'moodbar-what-content' => 'Diese Funktion wurde entwickelt, damit man eine Rückmeldung geben kann, wie man sich beim Bearbeiten von Seiten dieser Website fühlt.
668680 Weitere Informationen hierzu sind an der folgenden Stelle zu finden: $1.',
@@ -701,7 +713,7 @@
702714 'moodbar-header-namespace' => 'Namensraum',
703715 'moodbar-header-own-talk' => 'Eigene Diskussionsseite',
704716 'moodbar-feedback-title' => 'Rückmeldungen',
705 - 'moodbar-feedback-response-title' => 'Administrations- und Übersichtsseite zu Rückmeldungen',
 717+ 'moodbar-feedback-response-title' => '== Antwort auf deine [[$1|Rückmeldung]] ==',
706718 'moodbar-feedback-view-link' => '(Rückmeldungen ansehen)',
707719 'moodbar-feedback-filters' => 'Filter',
708720 'moodbar-feedback-filters-type' => 'Stimmung:',
@@ -735,6 +747,7 @@
736748 'moodbar-restore-header' => 'versteckten Teil der Rückmeldung wiederherstellen',
737749 'moodbar-invalid-item' => 'Das System konnte den richtigen Teil der Rückmeldung nicht finden.',
738750 'moodbar-feedback-action-error' => 'Während des Ausführens dieser Aktion ist ein Fehler aufgetreten.',
 751+ 'moodbar-feedback-response-summary' => '[[$1|$2]] hat vor $4 auf diese Rückmeldung [[$3|geantwortet]]',
739752 'moodbar-type-happy' => 'glücklich',
740753 'moodbar-type-sad' => 'traurig',
741754 'moodbar-type-confused' => 'verwirrt',
@@ -745,12 +758,14 @@
746759 'moodbar-log-header' => 'Dies ist das Logbuch der Aktionen zu den Rückmeldungen, die auf der [[Special:FeedbackDashboard|Administrations- und Übersichtsseite]] der Rückmeldungen angezeigt werden.',
747760 'moodbar-log-hide' => 'blendete [[$1]] aus',
748761 'moodbar-log-restore' => 'blendete [[$1]] wieder ein',
749 - 'moodbar-response-ula' => 'Durch Klicken auf die Schaltfläche „$1“ stimmst du den $2 zu. Zudem bist du unwiderruflich damit einverstanden, deinen Beitrag gemäß der $3-Lizenz sowie der $4 zu veröffentlichen.
750 -Du stimmst auch zu, dass ein Hyperlink oder die Angabe einer URL für die Namensnennung gemäß der $3-Lizenz ausreichend ist.',
751 - 'moodbar-response-terms-of-use' => 'Nutzungsbedingungen',
752 - 'moodbar-response-cc' => 'Creative-Commons',
753 - 'moodbar-response-gfdl' => 'GFDL',
754 - 'feedbackresponse-success' => 'Vielen Dank. Deine Antwort wurde auf der Diskussionsseite des Benutzers hinzugefügt.',
 762+ 'response-back-text' => 'Zurück',
 763+ 'response-preview-text' => 'Vorschau',
 764+ 'response-ajax-action-head' => 'Am Antworten ...',
 765+ 'response-ajax-action-body' => 'Die Antwort wird hinzugefügt.',
 766+ 'response-ajax-success-head' => 'Vielen Dank!',
 767+ 'response-ajax-success-body' => 'Die Antwort wurde hinzugefügt.',
 768+ 'response-ajax-error-head' => 'Hoppla!',
 769+ 'response-ajax-error-body' => 'Es ist beim Hinzufügen der Antwort ein Fehler aufgetreten. <br />Bitte versuche es später noch einmal.',
755770 );
756771
757772 /** German (formal address) (‪Deutsch (Sie-Form)‬)
@@ -761,9 +776,8 @@
762777 'moodbar-privacy' => 'Mit dem Speichern erklären Sie sich mit diesen $1 einverstanden.',
763778 'moodbar-success-subtitle' => 'Uns Ihre Stimmung mitzuteilen hilft uns dabei $1 weiter zu verbessern.',
764779 'moodbar-error-subtitle' => 'Etwas ist schief gelaufen. Bitte versuchen Sie es später noch einmal uns Ihre Rückmeldung mitzuteilen.',
765 - 'moodbar-response-ula' => 'Durch Klicken auf die Schaltfläche „$1“ stimmen Sie den $2 zu. Zudem sind Sie unwiderruflich damit einverstanden, Ihrem Beitrag gemäß der $3-Lizenz sowie der $4 zu veröffentlichen.
766 -Sie stimmen auch zu, dass ein Hyperlink oder die Angabe einer URL für die Namensnennung gemäß der $3-Lizenz ausreichend ist.',
767 - 'feedbackresponse-success' => 'Vielen Dank. Ihre Antwort wurde auf der Diskussionsseite des Benutzers hinzugefügt.',
 780+ 'moodbar-feedback-response-title' => '== Antwort auf Ihre [[$1|Rückmeldung]] ==',
 781+ 'response-ajax-error-body' => 'Es ist beim Hinzufügen der Antwort ein Fehler aufgetreten. <br />Bitte versuchen Sie es später noch einmal.',
768782 );
769783
770784 /** Greek (Ελληνικά)
@@ -929,6 +943,7 @@
930944
931945 /** Persian (فارسی)
932946 * @author Mjbmr
 947+ * @author ZxxZxxZ
933948 */
934949 $messages['fa'] = array(
935950 'moodbar-desc' => 'به کاربران مشخص این اجازه را می‌دهد که بازخوردی از تجربهٔ ویرایش‌هایشان، ارائه دهند',
@@ -945,6 +960,8 @@
946961 'tooltip-moodbar-what' => 'دربارهٔ این ویژگی بیشتر مطالعه کنید',
947962 'moodbar-what-label' => 'این چیست؟',
948963 'moodbar-what-collapsed' => '◄',
 964+ 'moodbar-respond-text' => 'پاسخ به این',
 965+ 'moodbar-response-add' => 'افزودن پاسخ',
949966 'moodbar-what-content' => 'این ویژگی طوری طراحی شده است که به جامعه برای فهم تجربهٔ مردم از ویرایش در این تارنما کمک می‌کند.
950967 برای اطلاعات بیشتر، به $1 مراجعه کنید.',
951968 'moodbar-what-link' => 'صفحهٔ ویژگی',
@@ -981,12 +998,31 @@
982999 'moodbar-header-user-editcount' => 'شمار ویرایش‌های کاربر',
9831000 'moodbar-header-namespace' => 'فضای نام',
9841001 'moodbar-header-own-talk' => 'صفحهٔ بحث خود',
 1002+ 'moodbar-feedback-filters-type-happy' => 'شاد',
 1003+ 'moodbar-feedback-filters-type-confused' => 'گیج',
 1004+ 'moodbar-feedback-filters-type-sad' => 'غمگین',
 1005+ 'moodbar-feedback-filters-username' => 'نام کاربری',
 1006+ 'moodbar-feedback-permalink' => 'پیوند به اینجا',
 1007+ 'moodbar-feedback-more' => 'بیشتر',
 1008+ 'moodbar-feedback-newer' => 'جدیدتر',
 1009+ 'moodbar-feedback-older' => 'قدیمی‌تر',
 1010+ 'moodbar-feedback-action-confirm' => 'تأیید',
 1011+ 'moodbar-feedback-action-cancel' => 'لغو',
 1012+ 'moodbar-action-reason' => 'دلیل:',
9851013 'moodbar-type-happy' => 'شاد',
9861014 'moodbar-type-sad' => 'غمگین',
9871015 'moodbar-type-confused' => 'گیج',
9881016 'moodbar-user-anonymized' => 'گمنام',
9891017 'moodbar-user-ip' => 'نشانی آی‌پی',
9901018 'moodbar-user-user' => 'کاربر ثبت شده',
 1019+ 'moodbar-log-name' => 'سیاههٔ بازخورد',
 1020+ 'response-back-text' => 'بازگشت',
 1021+ 'response-preview-text' => 'پیش‌نمایش',
 1022+ 'response-ajax-action-head' => 'در حال پاسخ...',
 1023+ 'response-ajax-action-body' => 'پاسخ شما در حال افزوده‌شدن است.',
 1024+ 'response-ajax-success-head' => 'سپاس!',
 1025+ 'response-ajax-success-body' => 'پاسخ شما افزوده شده‌است.',
 1026+ 'response-ajax-error-head' => 'اوه!',
9911027 );
9921028
9931029 /** Finnish (Suomi)
@@ -1056,6 +1092,7 @@
10571093 * @author Gomoko
10581094 * @author Hashar
10591095 * @author IAlex
 1096+ * @author McDutchie
10601097 * @author Tpt
10611098 */
10621099 $messages['fr'] = array(
@@ -1072,6 +1109,9 @@
10731110 'moodbar-type-confused-title' => 'Confus',
10741111 'tooltip-moodbar-what' => 'En savoir plus sur cette fonctionnalité',
10751112 'moodbar-what-label' => "Qu'est-ce que c'est?",
 1113+ 'moodbar-respond-text' => 'Répondre à cela',
 1114+ 'moodbar-response-add' => 'Ajouter une réponse',
 1115+ 'moodbar-response-btn' => 'Envoyer la réponse',
10761116 'moodbar-what-content' => "Cette fonctionnalité est conçue pour aider la communauté à comprendre le ressenti des personnes éditant le site.
10771117 Pour plus d'information, consultez la $1.",
10781118 'moodbar-what-link' => 'page décrivant la fonction',
@@ -1110,6 +1150,7 @@
11111151 'moodbar-header-namespace' => 'Espace de noms',
11121152 'moodbar-header-own-talk' => 'Page de discussion personnelle',
11131153 'moodbar-feedback-title' => 'Tableau de bord des ressentis',
 1154+ 'moodbar-feedback-response-title' => "Réponse d'avis du tableau de bord",
11141155 'moodbar-feedback-view-link' => '(Voir les commentaires)',
11151156 'moodbar-feedback-filters' => 'Filtres',
11161157 'moodbar-feedback-filters-type' => 'Humeur:',
@@ -1131,6 +1172,8 @@
11321173 'moodbar-comment-hidden' => '(Commentaire caché par mesure administrative)',
11331174 'moodbar-feedback-show' => 'afficher les commentaires cachés',
11341175 'moodbar-feedback-hide' => 'masquer les commentaires',
 1176+ 'moodbar-feedback-action-confirm' => 'Confirmer',
 1177+ 'moodbar-feedback-action-cancel' => 'Annuler',
11351178 'moodbar-hidden-footer' => 'Avis caché de $1 sur $2, motif: $3 $4',
11361179 'moodbar-hidden-footer-without-log' => 'Commentaire caché $1',
11371180 'moodbar-feedback-restore' => 'restaurer les commentaires cachés',
@@ -1239,6 +1282,7 @@
12401283 );
12411284
12421285 /** Galician (Galego)
 1286+ * @author McDutchie
12431287 * @author Toliño
12441288 */
12451289 $messages['gl'] = array(
@@ -1255,6 +1299,10 @@
12561300 'moodbar-type-confused-title' => 'Confuso',
12571301 'tooltip-moodbar-what' => 'Máis información sobre esta característica',
12581302 'moodbar-what-label' => 'Que é isto?',
 1303+ 'moodbar-respond-text' => 'Responder a isto',
 1304+ 'moodbar-response-add' => 'Engadir unha resposta',
 1305+ 'moodbar-response-desc' => 'A resposta terá unha referencia ao comentario orixinal. Non é necesario asinar.',
 1306+ 'moodbar-response-btn' => 'Enviar a resposta',
12591307 'moodbar-what-content' => 'Esta característica está deseñada para axudar á comunidade a entender a experiencia da xente á hora de editar o sitio.
12601308 Para obter máis información, bótelle unha ollada á $1 .',
12611309 'moodbar-what-link' => 'páxina da característica',
@@ -1292,7 +1340,8 @@
12931341 'moodbar-header-user-editcount' => 'Número de edición do usuario',
12941342 'moodbar-header-namespace' => 'Espazo de nomes',
12951343 'moodbar-header-own-talk' => 'Páxina de conversa propia',
1296 - 'moodbar-feedback-title' => 'Comentarios sobre o taboleiro',
 1344+ 'moodbar-feedback-title' => 'Taboleiro de comentarios',
 1345+ 'moodbar-feedback-response-title' => '==En resposta aos seus [[$1|comentarios]]==',
12971346 'moodbar-feedback-view-link' => '(Ollar os comentarios)',
12981347 'moodbar-feedback-filters' => 'Filtros',
12991348 'moodbar-feedback-filters-type' => 'Humor:',
@@ -1314,6 +1363,8 @@
13151364 'moodbar-comment-hidden' => '(Comentario agochado por un administrador)',
13161365 'moodbar-feedback-show' => 'mostrar o comentario agochado',
13171366 'moodbar-feedback-hide' => 'agochar o comentario',
 1367+ 'moodbar-feedback-action-confirm' => 'Confirmar',
 1368+ 'moodbar-feedback-action-cancel' => 'Cancelar',
13181369 'moodbar-hidden-footer' => 'Comentario agochado por $1 o $2 ás $3; motivo: $4 $5',
13191370 'moodbar-hidden-footer-without-log' => 'Comentario agochado $1',
13201371 'moodbar-feedback-restore' => 'restaurar o comentario agochado',
@@ -1324,6 +1375,7 @@
13251376 'moodbar-restore-header' => 'Restaurar a visibilidade deste elemento',
13261377 'moodbar-invalid-item' => 'O sistema non puido atopar o elemento de valoración correcto.',
13271378 'moodbar-feedback-action-error' => 'Produciuse un erro ao intentar levar a cabo esta acción.',
 1379+ 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|respondeu]] este comentario hai $4',
13281380 'moodbar-type-happy' => 'Contento',
13291381 'moodbar-type-sad' => 'Triste',
13301382 'moodbar-type-confused' => 'Confuso',
@@ -1334,6 +1386,14 @@
13351387 'moodbar-log-header' => 'Este é o rexistro das accións levadas a cabo nos elementos de valoración listados no [[Special:FeedbackDashboard|taboleiro de comentarios]].',
13361388 'moodbar-log-hide' => 'agochou "[[$1]]"',
13371389 'moodbar-log-restore' => 'restaurou a visibilidade de "[[$1]]"',
 1390+ 'response-back-text' => 'Volver',
 1391+ 'response-preview-text' => 'Vista previa',
 1392+ 'response-ajax-action-head' => 'Respondendo...',
 1393+ 'response-ajax-action-body' => 'Estase engadindo a resposta.',
 1394+ 'response-ajax-success-head' => 'Grazas!',
 1395+ 'response-ajax-success-body' => 'Engadiuse a resposta.',
 1396+ 'response-ajax-error-head' => 'Vaites!',
 1397+ 'response-ajax-error-body' => 'Houbo un erro ao engadir a resposta.<br />Inténteo de novo.',
13381398 );
13391399
13401400 /** Swiss German (Alemannisch)
@@ -1397,6 +1457,9 @@
13981458 'tooltip-moodbar-what' => 'מידע נוסף על התכונה הזאת',
13991459 'moodbar-what-label' => 'מה זה?',
14001460 'moodbar-what-collapsed' => '◄',
 1461+ 'moodbar-respond-text' => 'להשיב לזה',
 1462+ 'moodbar-response-add' => 'להוסיף תשובה',
 1463+ 'moodbar-response-btn' => 'שליחת תגובה',
14011464 'moodbar-what-content' => 'התכונה הזאת נועדה לעזור לקהילה להבין את החוויה של האנשים שעורכים את האתר.
14021465 למידע נוסף, בקרו בדף $1.',
14031466 'moodbar-what-link' => 'דף תכונה',
@@ -1435,6 +1498,8 @@
14361499 'moodbar-header-namespace' => 'מרחב שם',
14371500 'moodbar-header-own-talk' => 'דף שיחה של עצמי',
14381501 'moodbar-feedback-title' => 'לוח בקרה של משובים',
 1502+ 'moodbar-feedback-response-title' => '==בתגובה ל[[$1|משוב שלך]]==',
 1503+ 'moodbar-feedback-view-link' => '(הצגת המשוב)',
14391504 'moodbar-feedback-filters' => 'מסננים',
14401505 'moodbar-feedback-filters-type' => 'מצב רוח:',
14411506 'moodbar-feedback-filters-type-happy' => 'שמחה',
@@ -1451,13 +1516,19 @@
14521517 'moodbar-feedback-newer' => 'חדשות יותר',
14531518 'moodbar-feedback-older' => 'ישנות יותר',
14541519 'moodbar-feedback-ajaxerror' => 'אירעה שגיאה בעת אחזור תוצאות נוספות.',
 1520+ 'moodbar-feedback-load-record-error' => 'אירעה שגיאה בעת טעינת רשומה.',
14551521 'moodbar-user-hidden' => '(חשבון מוסתר)',
14561522 'moodbar-comment-hidden' => '(המשוב הוסתר על־ידי פעולת מנהל)',
14571523 'moodbar-feedback-show' => 'הצגת משוב מוסתר',
14581524 'moodbar-feedback-hide' => 'הסתרת משוב',
 1525+ 'moodbar-feedback-action-confirm' => 'אישור',
 1526+ 'moodbar-feedback-action-cancel' => 'ביטול',
14591527 'moodbar-hidden-footer' => 'משוב מוסתר $1 מ־$2 $3, סיבה: $4&rlm; $5',
 1528+ 'moodbar-hidden-footer-without-log' => 'משוב מוסתר $1',
14601529 'moodbar-feedback-restore' => 'שחזור משוב מוסתר',
14611530 'moodbar-action-item' => 'פריט משוב:',
 1531+ 'moodbar-action-reason' => 'סיבה:',
 1532+ 'moodbar-action-reason-required' => 'נא להזין סיבה.',
14621533 'moodbar-hide-header' => 'הסתרת הפריט הזה מהתצוגה',
14631534 'moodbar-restore-header' => 'שחזור הנראוּת של הפריט הזה',
14641535 'moodbar-invalid-item' => 'המערכת לא הצליחה למצא את פריט המשוב הנכון.',
@@ -1528,6 +1599,9 @@
15291600 'moodbar-type-confused-title' => 'Confuse',
15301601 'tooltip-moodbar-what' => 'Lege plus a proposito de iste function',
15311602 'moodbar-what-label' => 'Que es isto?',
 1603+ 'moodbar-respond-text' => 'Responder a isto',
 1604+ 'moodbar-response-add' => 'Adder un responsa',
 1605+ 'moodbar-response-btn' => 'Inviar responsa',
15321606 'moodbar-what-content' => 'Iste function es concipite pro adjutar le communitate a comprender le experientia del personas qui modifica le sito.
15331607 Pro ulterior information, per favor visita le $1.',
15341608 'moodbar-what-link' => 'pagina de function',
@@ -1566,6 +1640,8 @@
15671641 'moodbar-header-namespace' => 'Spatio de nomines',
15681642 'moodbar-header-own-talk' => 'Pagina de discussion proprie',
15691643 'moodbar-feedback-title' => 'Pannello de retroaction',
 1644+ 'moodbar-feedback-response-title' => 'Responsa de pannello de retroaction',
 1645+ 'moodbar-feedback-view-link' => '(Vider le commentario)',
15701646 'moodbar-feedback-filters' => 'Filtros',
15711647 'moodbar-feedback-filters-type' => 'Humor:',
15721648 'moodbar-feedback-filters-type-happy' => 'Felice',
@@ -1586,6 +1662,8 @@
15871663 'moodbar-comment-hidden' => '(Commentario celate per action administrative)',
15881664 'moodbar-feedback-show' => 'monstrar commentario celate',
15891665 'moodbar-feedback-hide' => 'celar commentario',
 1666+ 'moodbar-feedback-action-confirm' => 'Confirmar',
 1667+ 'moodbar-feedback-action-cancel' => 'Cancellar',
15901668 'moodbar-hidden-footer' => 'Commentario celate scribite per $1 le $2 a $3, motivo: $4 $5',
15911669 'moodbar-hidden-footer-without-log' => 'Commentario celate $1',
15921670 'moodbar-feedback-restore' => 'restaurar commentario celate',
@@ -1685,8 +1763,11 @@
16861764 'moodbar-user-hidden' => '(Benotzer verstoppt)',
16871765 'moodbar-feedback-show' => 'verstoppte Feedback weisen',
16881766 'moodbar-feedback-hide' => 'Feedback verstoppen',
 1767+ 'moodbar-feedback-action-confirm' => 'Confirméieren',
 1768+ 'moodbar-feedback-action-cancel' => 'Ofbriechen',
16891769 'moodbar-hidden-footer' => 'Vum $1 den $2 ëm $3 verstoppte Feedback, Grond: $4 $5',
16901770 'moodbar-action-reason' => 'Grond:',
 1771+ 'moodbar-action-reason-required' => 'Gitt w.e.g. e Grond un.',
16911772 'moodbar-type-happy' => 'Glécklech',
16921773 'moodbar-type-sad' => 'Traureg',
16931774 'moodbar-type-confused' => 'Duercherneen',
@@ -1733,6 +1814,7 @@
17341815
17351816 /** Macedonian (Македонски)
17361817 * @author Bjankuloski06
 1818+ * @author McDutchie
17371819 */
17381820 $messages['mk'] = array(
17391821 'moodbar-desc' => 'Им овозможува на одредени корисници да даваат мислење за уредувањето',
@@ -1750,7 +1832,7 @@
17511833 'moodbar-what-label' => 'Што е ова?',
17521834 'moodbar-respond-text' => 'Одговори на ова',
17531835 'moodbar-response-add' => 'Додајте ваш одѕив',
1754 - 'moodbar-response-nosig' => 'потписот не е задолжителен',
 1836+ 'moodbar-response-desc' => 'Во одговорот ќе биде наведен изворниот коментар (мислење). Потписот не е задолжителен.',
17551837 'moodbar-response-btn' => 'Испрати одѕив',
17561838 'moodbar-what-content' => 'Оваа функција е предвидена да ѝ овозможува на заедницата да го осознае искуството на луѓето што го уредуваат мрежното место.
17571839 Повеќе информации ќе добиете на $1.',
@@ -1790,7 +1872,7 @@
17911873 'moodbar-header-namespace' => 'Именски простор',
17921874 'moodbar-header-own-talk' => 'Сопствена страница за разговор',
17931875 'moodbar-feedback-title' => 'Табла за мислења',
1794 - 'moodbar-feedback-response-title' => 'Одѕив на таблата за мислења',
 1876+ 'moodbar-feedback-response-title' => '==Одговор на Вашето [[$1|искажано мислење]]==',
17951877 'moodbar-feedback-view-link' => '(Погл. мислењето)',
17961878 'moodbar-feedback-filters' => 'Филтри',
17971879 'moodbar-feedback-filters-type' => 'Расположение:',
@@ -1824,6 +1906,7 @@
18251907 'moodbar-restore-header' => 'Врати ја видливоста на мислењето',
18261908 'moodbar-invalid-item' => 'Системот не можеше да го најде бараното мислење',
18271909 'moodbar-feedback-action-error' => 'Настана грешка при обидот да се изврши дејството.',
 1910+ 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|одговори]] на овој коментар пред $4',
18281911 'moodbar-type-happy' => 'Среќен',
18291912 'moodbar-type-sad' => 'Тажен',
18301913 'moodbar-type-confused' => 'Збунет',
@@ -1834,12 +1917,14 @@
18351918 'moodbar-log-header' => 'Ова е дневник на дејства што се однесуваат на мислењата искажани на [[Special:FeedbackDashboard|таблата за мислења и коментари]].',
18361919 'moodbar-log-hide' => 'скриено [[$1]]',
18371920 'moodbar-log-restore' => 'вратена видливоста на [[$1]]',
1838 - 'moodbar-response-ula' => 'Стискајќи на копчето „$1“ се согласувате со $2, и неотповикливо прифаќате да го објавите придонесеното под лиценците $3 и $4.
1839 -Се согласувате дека хиперврска или URL-адреса претставува достатно признание за авторство под лиценцата на Криејтив комонс.',
1840 - 'moodbar-response-terms-of-use' => 'Условите на употреба',
1841 - 'moodbar-response-cc' => 'Криејтив комонс',
1842 - 'moodbar-response-gfdl' => 'ГЛСД',
1843 - 'feedbackresponse-success' => 'Ви благодариме. Вашиот одѕив е поставен на корисничката страница за разговор.',
 1921+ 'response-back-text' => 'Назад',
 1922+ 'response-preview-text' => 'Преглед',
 1923+ 'response-ajax-action-head' => 'Пишува одговор...',
 1924+ 'response-ajax-action-body' => 'Го додавам вашиот одговор.',
 1925+ 'response-ajax-success-head' => 'Благодариме!',
 1926+ 'response-ajax-success-body' => 'Вашиот одговор е додаден.',
 1927+ 'response-ajax-error-head' => 'Упс!',
 1928+ 'response-ajax-error-body' => 'Се појави грешка при додавањето на вашиот одговор. <br />Обидете се подоцна.',
18441929 );
18451930
18461931 /** Malayalam (മലയാളം)
@@ -1857,10 +1942,13 @@
18581943 'moodbar-type-confused-title' => 'ആശയക്കുഴപ്പമായി',
18591944 'tooltip-moodbar-what' => 'ഈ വിശേഷഗുണത്തെക്കുറിച്ച് കൂടുതൽ അറിയുക',
18601945 'moodbar-what-label' => 'എന്താണിത്?',
 1946+ 'moodbar-respond-text' => 'ഇതിനോട് പ്രതികരിക്കുക',
 1947+ 'moodbar-response-add' => 'പ്രതികരണം ചേർക്കുക',
 1948+ 'moodbar-response-btn' => 'പ്രതികരണം അയയ്ക്കുക',
18611949 'moodbar-what-content' => 'വിജ്ഞാനകോശം തിരുത്തുന്നവരുടെ അനുഭവങ്ങൾ വിക്കിപീഡിയ സമൂഹത്തിനു മനസ്സിലാക്കാനായാണ് ഈ സൗകര്യം രൂപകല്പന ചെയ്തിരിക്കുന്നത്.
18621950 കൂടുതൽ വിവരങ്ങൾക്ക് ദയവായി $1 സന്ദർശിക്കുക.',
18631951 'moodbar-what-link' => 'സവിശേഷതാ താൾ',
1864 - 'moodbar-privacy' => 'സമർപ്പിക്കുമ്പോൾ, $1 പ്രകാരമുള്ള സുതാര്യത താങ്കൾ അംഗീകരിക്കുന്നതായി കരുതപ്പെടുന്നതാണ്.',
 1952+ 'moodbar-privacy' => 'സമർപ്പിക്കുമ്പോൾ, $1 പ്രകാരമുള്ള സുതാര്യത താങ്കൾ അംഗീകരിക്കുന്നതാണ്.',
18651953 'moodbar-privacy-link' => 'നിബന്ധനകൾ',
18661954 'moodbar-disable-link' => 'എനിക്കു താത്പര്യമില്ല. ദയവായി ഈ സൗകര്യം വേണ്ട.',
18671955 'moodbar-form-title' => 'കാരണം...',
@@ -1891,6 +1979,7 @@
18921980 'moodbar-feedback-filters-type' => 'തരം:',
18931981 'moodbar-feedback-filters-username' => 'ഉപയോക്തൃനാമം',
18941982 'moodbar-feedback-filters-button' => 'അരിപ്പകൾ സജ്ജീകരിക്കുക',
 1983+ 'moodbar-feedback-whatis' => 'ഈ സവിശേഷത എന്താണ്?',
18951984 'moodbar-feedback-permalink' => 'ഇങ്ങോട്ടുള്ള കണ്ണികൾ',
18961985 'moodbar-feedback-more' => 'കൂടുതൽ',
18971986 'moodbar-feedback-nomore' => 'പ്രദർശിപ്പിക്കാൻ കൂടുതൽ ഫലങ്ങളിലില്ല.',
@@ -1898,6 +1987,8 @@
18991988 'moodbar-feedback-older' => 'പഴയവ',
19001989 'moodbar-feedback-ajaxerror' => 'കൂടുതൽ ഫലങ്ങൾ ശേഖരിക്കുന്നതിനിടെ പിഴവുണ്ടയി.',
19011990 'moodbar-user-hidden' => '(ഉപയോക്താവ് മറയ്ക്കപ്പെട്ടിരിക്കുന്നു)',
 1991+ 'moodbar-feedback-action-confirm' => 'സ്ഥിരീകരിക്കുക',
 1992+ 'moodbar-feedback-action-cancel' => 'റദ്ദാക്കുക',
19021993 'moodbar-action-reason' => 'കാരണം:',
19031994 'moodbar-action-reason-required' => 'ദയവായി ഒരു കാരണം നൽകുക.',
19041995 'moodbar-type-happy' => 'സന്തോഷം',
@@ -1910,6 +2001,7 @@
19112002
19122003 /** Malay (Bahasa Melayu)
19132004 * @author Anakmalaysia
 2005+ * @author McDutchie
19142006 */
19152007 $messages['ms'] = array(
19162008 'moodbar-desc' => 'Membolehkan pengguna tertentu menghantar maklum balas mereka kepada pengendali tapak',
@@ -1927,7 +2019,7 @@
19282020 'moodbar-what-label' => 'Apakah ini?',
19292021 'moodbar-respond-text' => 'Balas',
19302022 'moodbar-response-add' => 'Tulis balasan',
1931 - 'moodbar-response-nosig' => 'tandatangan tidak diperlukan',
 2023+ 'moodbar-response-desc' => 'Balasan akan merujuk komen asal. Tandatangan tidak diperlukan.',
19322024 'moodbar-response-btn' => 'Hantar balasan',
19332025 'moodbar-what-content' => 'Ciri ini direka untuk membantu komuniti memahami pengalaman sesiapa yang menyunting ensiklopedia ini.
19342026 Untuk maklumat lanjut, sila layari $1.',
@@ -1967,7 +2059,7 @@
19682060 'moodbar-header-namespace' => 'Ruang nama',
19692061 'moodbar-header-own-talk' => 'Laman perbincangan sendiri',
19702062 'moodbar-feedback-title' => 'Papan pemuka maklum balas',
1971 - 'moodbar-feedback-response-title' => 'Respons papan pemuka maklum balas',
 2063+ 'moodbar-feedback-response-title' => '==Sebagai balasan keada [[$1|maklum balas]] anda==',
19722064 'moodbar-feedback-view-link' => '(Baca maklum balas)',
19732065 'moodbar-feedback-filters' => 'Penapis',
19742066 'moodbar-feedback-filters-type' => 'Angin:',
@@ -2001,6 +2093,7 @@
20022094 'moodbar-restore-header' => 'Perlihatkan semula butiran ini',
20032095 'moodbar-invalid-item' => 'Sistem tidak dapat mencari butiran maklum balas yang betul.',
20042096 'moodbar-feedback-action-error' => 'Ralat berlaku ketika cuba melakukan tindakan ini.',
 2097+ 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|membalas]] komen ini $4 lalu',
20052098 'moodbar-type-happy' => 'Gembira',
20062099 'moodbar-type-sad' => 'Sedih',
20072100 'moodbar-type-confused' => 'Keliru',
@@ -2011,15 +2104,18 @@
20122105 'moodbar-log-header' => 'Inilah log tindakan kepada butiran maklum balas yang tersenarai dalam [[Special:FeedbackDashboard|papan pemuka maklum balas]].',
20132106 'moodbar-log-hide' => 'menyorokkan [[$1]]',
20142107 'moodbar-log-restore' => 'memperlihatkan semula [[$1]]',
2015 - 'moodbar-response-ula' => 'Dengan mengklik butang "$1", anda bersetuju dengan $2, dan anda bersetuju tanpa tertarik balik untuk melepaskan sumbangan-sumbangan anda di bawah Lesen $3 dan $4.
2016 -Anda bersetuju bahawa pautan hiper atau URL merupakan atribusi yang memadai di bawah lesen Creative Commons.',
2017 - 'moodbar-response-terms-of-use' => 'Syarat-syarat penggunaan',
2018 - 'moodbar-response-cc' => 'Creative Commons',
2019 - 'moodbar-response-gfdl' => 'GFDL',
2020 - 'feedbackresponse-success' => 'Terima kasih. Balasan anda telah dikirim kepada laman Perbincangan Pengguna itu.',
 2108+ 'response-back-text' => 'Belakang',
 2109+ 'response-preview-text' => 'Pralihat',
 2110+ 'response-ajax-action-head' => 'Membalas...',
 2111+ 'response-ajax-action-body' => 'Balasan anda sedang disampaikan.',
 2112+ 'response-ajax-success-head' => 'Terima kasih!',
 2113+ 'response-ajax-success-body' => 'Balasan anda telah disampaikan.',
 2114+ 'response-ajax-error-head' => 'Alamak!',
 2115+ 'response-ajax-error-body' => 'Terdapat ralat ketika menyampaikan balasan anda.<br />Sila cuba lagi nanti.',
20212116 );
20222117
20232118 /** Dutch (Nederlands)
 2119+ * @author McDutchie
20242120 * @author SPQRobin
20252121 * @author Saruman
20262122 * @author Siebrand
@@ -2042,7 +2138,7 @@
20432139 'moodbar-respond-expanded' => '▼',
20442140 'moodbar-respond-text' => 'Hierop reageren',
20452141 'moodbar-response-add' => 'Reactie toevoegen',
2046 - 'moodbar-response-nosig' => 'ondertekening niet vereist',
 2142+ 'moodbar-response-desc' => 'Uw reactie verwijst terug naar de oorspronkelijke opmerking. U hoeft niet te ondertekenen.',
20472143 'moodbar-response-btn' => 'Antwoord verzenden',
20482144 'moodbar-what-content' => 'Deze functie is ontworpen om de ervaring van mensen die de site bewerken te helpen begrijpen.
20492145 Ga naar de $1 voor mee informatie.',
@@ -2082,7 +2178,7 @@
20832179 'moodbar-header-namespace' => 'Naamruimte',
20842180 'moodbar-header-own-talk' => 'Eigen overlegpagina',
20852181 'moodbar-feedback-title' => 'Dashboard voor terugkoppeling',
2086 - 'moodbar-feedback-response-title' => 'Dashboardreactie',
 2182+ 'moodbar-feedback-response-title' => '== Antwoord op uw [[$1|terugkoppeling]] ==',
20872183 'moodbar-feedback-view-link' => '(terugkoppeling bekijken)',
20882184 'moodbar-feedback-filters' => 'Filters',
20892185 'moodbar-feedback-filters-type' => 'Stemming:',
@@ -2116,6 +2212,7 @@
21172213 'moodbar-restore-header' => 'De zichtbaarheid van dit item herstellen',
21182214 'moodbar-invalid-item' => 'Het systeem kon het juiste terugkoppelingsitem niet vinden.',
21192215 'moodbar-feedback-action-error' => 'Er is een fout opgetreden tijdens het uitvoeren van deze handeling.',
 2216+ 'moodbar-feedback-response-summary' => '[[$1|$2]] heeft $4 geleden [[$3|gereageerd]] op deze opmerking',
21202217 'moodbar-type-happy' => '{{GENDER:$1|Blij}}',
21212218 'moodbar-type-sad' => '{{GENDER:$1|Somber}}',
21222219 'moodbar-type-confused' => '{{GENDER:$1|Verward}}',
@@ -2126,8 +2223,14 @@
21272224 'moodbar-log-header' => 'Dit is een logboek met uitgevoerde handelingen op items uit het [[Special:FeedbackDashboard|terugkoppelingsdashboard]].',
21282225 'moodbar-log-hide' => 'heeft [[$1]] verborgen',
21292226 'moodbar-log-restore' => 'heeft [[$1]] weer zichtbaar gemaakt',
2130 - 'moodbar-response-terms-of-use' => 'Gebruiksvoorwaarden',
2131 - 'feedbackresponse-success' => 'Dank u wel. Uw reactie is toegevoegd aan de overlegpagina van de gebruiker.',
 2227+ 'response-back-text' => 'Terug',
 2228+ 'response-preview-text' => 'Voorvertoning',
 2229+ 'response-ajax-action-head' => 'Bezig met reageren...',
 2230+ 'response-ajax-action-body' => 'Uw reactie wordt toegevoegd.',
 2231+ 'response-ajax-success-head' => 'Bedankt!',
 2232+ 'response-ajax-success-body' => 'Uw reactie is toegevoegd.',
 2233+ 'response-ajax-error-head' => 'Er is iets misgegaan',
 2234+ 'response-ajax-error-body' => 'Er is een fout opgetreden tijdens het toevoegen van uw antwoord.<br />Probeer het later opnieuw.',
21322235 );
21332236
21342237 /** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
@@ -2774,6 +2877,7 @@
27752878
27762879 /** Slovenian (Slovenščina)
27772880 * @author Dbc334
 2881+ * @author McDutchie
27782882 */
27792883 $messages['sl'] = array(
27802884 'moodbar-desc' => 'Omogoča določenim uporabnikom pošiljanje povratne informacije o svoji urejevalski izkušnji',
@@ -2789,6 +2893,10 @@
27902894 'moodbar-type-confused-title' => 'Zmeden',
27912895 'tooltip-moodbar-what' => 'Več informacij o tej funkciji',
27922896 'moodbar-what-label' => 'Kaj je to?',
 2897+ 'moodbar-respond-text' => 'Odgovori na to',
 2898+ 'moodbar-response-add' => 'Dodaj odgovor',
 2899+ 'moodbar-response-desc' => 'Odziv se bo skliceval na izvirno pripombo. Podpis ni potreben.',
 2900+ 'moodbar-response-btn' => 'Pošlji odgovor',
27932901 'moodbar-what-content' => 'Funkcija je oblikovana kot pomoč skupnosti pri razumevanju izkušnje ljudi, ki urejajo stran.
27942902 Za več informacij obiščite $1.',
27952903 'moodbar-what-link' => 'stran z opisom',
@@ -2827,7 +2935,7 @@
28282936 'moodbar-header-namespace' => 'Imenski prostor',
28292937 'moodbar-header-own-talk' => 'Lastna pogovorna stran',
28302938 'moodbar-feedback-title' => 'Pregledna plošča povratnih informacij',
2831 - 'moodbar-feedback-response-title' => 'Odziv pregledne plošče povratnih informacij',
 2939+ 'moodbar-feedback-response-title' => '== V odgovoru na vašo [[$1|povratno informacijo]] ==',
28322940 'moodbar-feedback-view-link' => '(Ogled povratne informacije)',
28332941 'moodbar-feedback-filters' => 'Filtri',
28342942 'moodbar-feedback-filters-type' => 'Razpoloženje:',
@@ -2849,6 +2957,8 @@
28502958 'moodbar-comment-hidden' => '(Povratno informacijo je skril ukrep administratorja)',
28512959 'moodbar-feedback-show' => 'prikaži skrito povratno informacijo',
28522960 'moodbar-feedback-hide' => 'skrij povratno informacijo',
 2961+ 'moodbar-feedback-action-confirm' => 'Potrdi',
 2962+ 'moodbar-feedback-action-cancel' => 'Prekliči',
28532963 'moodbar-hidden-footer' => 'Skrita povratna informacija $1 dne $2 $3, razlog: $4 $5',
28542964 'moodbar-hidden-footer-without-log' => 'Skrita povratna informacija $1',
28552965 'moodbar-feedback-restore' => 'obnovi skrito povratno informacijo',
@@ -2859,6 +2969,7 @@
28602970 'moodbar-restore-header' => 'Obnovi vidljivost tega predmeta',
28612971 'moodbar-invalid-item' => 'Sistem ni mogel najti ustreznega predmeta povratne informacije.',
28622972 'moodbar-feedback-action-error' => 'Med poskusom izvedbe tega dejanja je prišlo do napake.',
 2973+ 'moodbar-feedback-response-summary' => '[[$1|$2]] se je [[$3|odzval(-a)]] na to pripombo pred $4',
28632974 'moodbar-type-happy' => 'Veselega',
28642975 'moodbar-type-sad' => 'Žalostnega',
28652976 'moodbar-type-confused' => 'Zmedenega',
@@ -2869,6 +2980,14 @@
28702981 'moodbar-log-header' => 'To je dnevnik dejanj, izvedenih na predmetih povratnih informacij, navedenih na [[Special:FeedbackDashboard|pregledni plošči povratnih informacij]].',
28712982 'moodbar-log-hide' => 'je skril(-a) [[$1]]',
28722983 'moodbar-log-restore' => 'je obnovil(-a) vidljivost [[$1]]',
 2984+ 'response-back-text' => 'Nazaj',
 2985+ 'response-preview-text' => 'Predogled',
 2986+ 'response-ajax-action-head' => 'Odgovarjanje ...',
 2987+ 'response-ajax-action-body' => 'Dodajamo vaš odziv.',
 2988+ 'response-ajax-success-head' => 'Hvala!',
 2989+ 'response-ajax-success-body' => 'Vaš odziv smo dodali.',
 2990+ 'response-ajax-error-head' => 'Ups!',
 2991+ 'response-ajax-error-body' => 'Med dodajanjem vašega odgovora je prišlo do napake. <br />Prosimo, poskusite znova pozneje.',
28732992 );
28742993
28752994 /** Serbian (Cyrillic script) (‪Српски (ћирилица)‬)
@@ -3064,6 +3183,9 @@
30653184 'moodbar-type-confused-title' => 'Bối rối',
30663185 'tooltip-moodbar-what' => 'Tìm hiểu thêm về tính năng này',
30673186 'moodbar-what-label' => 'Đây là gì?',
 3187+ 'moodbar-respond-text' => 'Hồi đáp cái này',
 3188+ 'moodbar-response-add' => 'Thêm hồi đáp',
 3189+ 'moodbar-response-btn' => 'Gửi hồi đáp',
30683190 'moodbar-what-content' => 'Tính năng này nhằm mục đích giúp cộng đồng hiểu biết những ấn tượng của người sửa đổi trang này.
30693191 Để biết thêm chi tiết, xin ghé vào $1.',
30703192 'moodbar-what-link' => 'trang tính năng',
@@ -3102,6 +3224,8 @@
31033225 'moodbar-header-namespace' => 'Không gian tên',
31043226 'moodbar-header-own-talk' => 'Trang thảo luận của chính mình',
31053227 'moodbar-feedback-title' => 'Bảng điều khiển phản hồi',
 3228+ 'moodbar-feedback-response-title' => 'Hồi đáp trên bảng điều khiển phản hồi',
 3229+ 'moodbar-feedback-view-link' => '(Xem phản hồi)',
31063230 'moodbar-feedback-filters' => 'Bộ lọc',
31073231 'moodbar-feedback-filters-type' => 'Tâm trạng:',
31083232 'moodbar-feedback-filters-type-happy' => 'Hài lòng',
@@ -3117,10 +3241,13 @@
31183242 'moodbar-feedback-newer' => 'Mới hơn',
31193243 'moodbar-feedback-older' => 'Cũ hơn',
31203244 'moodbar-feedback-ajaxerror' => 'Lỗi đã xảy ra khi lấy thêm kết quả.',
 3245+ 'moodbar-feedback-load-record-error' => 'Xuất hiện lỗi khi tải một hồ sơ.',
31213246 'moodbar-user-hidden' => '(Người dùng được ẩn)',
31223247 'moodbar-comment-hidden' => '(Phản hồi được bảo quản viên ẩn)',
31233248 'moodbar-feedback-show' => 'hiện phản hồi đã ẩn',
31243249 'moodbar-feedback-hide' => 'ẩn phản hồi',
 3250+ 'moodbar-feedback-action-confirm' => 'Xác nhận',
 3251+ 'moodbar-feedback-action-cancel' => 'Hủy bỏ',
31253252 'moodbar-hidden-footer' => 'Phản hồi ẩn của $1 vào $2 lúc $3 với lý do: $4 $5',
31263253 'moodbar-hidden-footer-without-log' => 'Phản hồi ẩn $1',
31273254 'moodbar-feedback-restore' => 'phục hồi phản hồi đã ẩn',
Index: branches/wmf/1.18wmf1/extensions/MoodBar/Formatter.php
@@ -66,7 +66,7 @@
6767 $user = $data->getProperty('user');
6868 if ( $data->getProperty('anonymize') ) {
6969 $outData = 'anonymized';
70 - } else if ( $user->isAnon() ) {
 70+ } elseif ( $user->isAnon() ) {
7171 $outData = 'ip';
7272 } else {
7373 $outData = 'user';
Index: branches/wmf/1.18wmf1/extensions/MoodBar/ApiFeedbackDashboardResponse.php
@@ -3,7 +3,7 @@
44 class ApiFeedbackDashboardResponse extends ApiBase {
55
66 public function execute() {
7 - global $wgRequest, $wgUser, $wgContLang;
 7+ global $wgRequest, $wgUser, $wgContLang, $wgParser;
88
99 if ( $wgUser->isAnon() ) {
1010 $this->dieUsage( "You don't have permission to do that", 'permission-denied' );
@@ -28,16 +28,17 @@
2929
3030 if ( $commenter !== null && $commenter->isAnon() == false ) {
3131 $talkPage = $commenter->getTalkPage();
 32+
 33+ $feedback_link = wfMessage('moodbar-feedback-response-title')->params($wgContLang->getNsText( NS_SPECIAL ) .
 34+ ':FeedbackDashboard/' . $item->getProperty('feedback'))->escaped();
3235
3336 $api = new ApiMain( new FauxRequest( array(
3437 'action' => 'edit',
3538 'title' => $talkPage->getFullText(),
3639 'appendtext' => ( $talkPage->exists() ? "\n\n" : '' ) .
37 - '==' . wfMessage('moodbar-feedback-response-title')->escaped() . '==' . "\n\n" .
38 - '[[' . $wgContLang->getNsText( NS_SPECIAL ) . ':FeedbackDashboard/' . $item->getProperty('feedback') . '|' .
39 - wfMessage('moodbar-feedback-view-link')->escaped() . ']]' . "\n\n".
40 - '[['. $wgUser->getTalkPage()->getFullText() . '|' . $wgUser->getName() . ']] ' .
41 - '<nowiki>' . $params['response'] . '</nowiki>',
 40+ $feedback_link . "\n" .
 41+ '<span id="feedback-dashboard-response-' . $item->getProperty('id') . '"></span>' . "\n\n" .
 42+ $wgParser->cleanSigInSig($params['response']) . "\n\n~~~~",
4243 'token' => $params['token'],
4344 'summary' => '',
4445 'notminor' => true,
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.hooks.php
@@ -105,6 +105,10 @@
106106 $updater->addExtensionUpdate( array( 'addTable', 'moodbar_feedback_response',
107107 dirname(__FILE__).'/sql/moodbar_feedback_response.sql', true ) );
108108
 109+ $updater->addExtensionUpdate( array( 'addIndex', 'moodbar_feedback_response',
 110+ 'mbfr_timestamp_id', dirname( __FILE__ ) . '/sql/mbfr_timestamp_id_index.sql', true )
 111+ );
 112+
109113 return true;
110114 }
111115
Index: branches/wmf/1.18wmf1/extensions/MoodBar/sql/mbfr_timestamp_id_index.sql
@@ -0,0 +1,2 @@
 2+
 3+CREATE INDEX /*i*/mbfr_timestamp_id ON /*_*/moodbar_feedback_response (mbfr_mbf_id, mbfr_timestamp, mbfr_id);
Index: branches/wmf/1.18wmf1/extensions/MoodBar/ApiQueryMoodBarComments.php
@@ -45,6 +45,9 @@
4646 $res = $this->select( __METHOD__ );
4747 $result = $this->getResult();
4848 $count = 0;
 49+
 50+ $response = SpecialFeedbackDashboard::getResponseSummary( $res );
 51+
4952 foreach ( $res as $row ) {
5053 if ( ++$count > $params['limit'] ) {
5154 // We've reached the one extra which shows that there are additional rows. Stop here
@@ -52,7 +55,7 @@
5356 break;
5457 }
5558
56 - $vals = $this->extractRowInfo( $row, $prop );
 59+ $vals = $this->extractRowInfo( $row, $prop, $response );
5760 $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals );
5861 if ( !$fit ) {
5962 $this->setContinueEnumParameter( 'continue', $this->getContinue( $row ) );
@@ -85,7 +88,7 @@
8689 );
8790 }
8891
89 - protected function extractRowInfo( $row, $prop ) {
 92+ protected function extractRowInfo( $row, $prop, $response = array() ) {
9093 global $wgUser;
9194
9295 $r = array();
@@ -114,7 +117,7 @@
115118 $params[] = 'show-anyway';
116119 }
117120
118 - $r['formatted'] = SpecialFeedbackDashboard::formatListItem( $row, $params );
 121+ $r['formatted'] = SpecialFeedbackDashboard::formatListItem( $row, $params, $response );
119122 }
120123
121124 if ( $isHidden && !$showHidden ) {
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js
@@ -19,25 +19,25 @@
2020 */
2121 'submit': function( fbProps ) {
2222 var clientData = $.client.profile(),
23 - fbProps = $.extend( {
 23+ fb = $.extend( {
2424 'page': mw.config.get( 'wgPageName' ),
2525 'editmode': mw.config.get( 'wgAction' ) == 'edit' ? 1 : 0
2626 }, fbProps ),
2727 apiRequest = {
2828 'action': 'moodbar',
29 - 'page': fbProps.page,
30 - 'comment': fbProps.comment,
31 - 'anonymize': fbProps.anonymize,
 29+ 'page': fb.page,
 30+ 'comment': fb.comment,
 31+ 'anonymize': fb.anonymize,
3232 'useragent': clientData.name + '/' + clientData.versionNumber,
3333 'system': clientData.platform,
34 - 'bucket': fbProps.bucket,
35 - 'type': fbProps.type,
 34+ 'bucket': fb.bucket,
 35+ 'type': fb.type,
3636 'token': mw.config.get('mbEditToken'),
3737 'format': 'json'
3838 };
3939
4040 // API treats any value as true.
41 - if ( fbProps.editmode ) {
 41+ if ( fb.editmode ) {
4242 apiRequest.editmode = true;
4343 }
4444
@@ -45,7 +45,7 @@
4646 type: 'post',
4747 url: mw.util.wikiScript( 'api' ),
4848 data: apiRequest,
49 - success: fbProps.callback,
 49+ success: fb.callback,
5050 dataType: 'json'
5151 } );
5252 }
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.elastic/jquery.elastic.js
@@ -0,0 +1,164 @@
 2+/**
 3+* @name Elastic
 4+* @descripton Elastic is jQuery plugin that grow and shrink your textareas automatically
 5+* @version 1.6.10
 6+* @requires jQuery 1.2.6+
 7+*
 8+* @author Jan Jarfalk
 9+* @author-email jan.jarfalk@unwrongest.com
 10+* @author-website http://www.unwrongest.com
 11+*
 12+* @licence MIT License - http://www.opensource.org/licenses/mit-license.php
 13+*
 14+* This file has been downloaded from http://unwrongest.com/projects/elastic/, please notify the author of
 15+* any changes.
 16+*/
 17+
 18+(function(jQuery){
 19+ jQuery.fn.extend({
 20+ elastic: function() {
 21+
 22+ // We will create a div clone of the textarea
 23+ // by copying these attributes from the textarea to the div.
 24+ var mimics = [
 25+ 'paddingTop',
 26+ 'paddingRight',
 27+ 'paddingBottom',
 28+ 'paddingLeft',
 29+ 'fontSize',
 30+ 'lineHeight',
 31+ 'fontFamily',
 32+ 'width',
 33+ 'fontWeight',
 34+ 'border-top-width',
 35+ 'border-right-width',
 36+ 'border-bottom-width',
 37+ 'border-left-width',
 38+ 'borderTopStyle',
 39+ 'borderTopColor',
 40+ 'borderRightStyle',
 41+ 'borderRightColor',
 42+ 'borderBottomStyle',
 43+ 'borderBottomColor',
 44+ 'borderLeftStyle',
 45+ 'borderLeftColor'
 46+ ];
 47+
 48+ return this.each( function() {
 49+
 50+ // Elastic only works on textareas
 51+ if ( this.type !== 'textarea' ) {
 52+ return false;
 53+ }
 54+
 55+ var $textarea = jQuery(this),
 56+ $twin = jQuery('<div />').css({'position': 'absolute','display':'none','word-wrap':'break-word'}),
 57+ lineHeight = parseInt($textarea.css('line-height'),10) || parseInt($textarea.css('font-size'),'10'),
 58+ minheight = parseInt($textarea.css('height'),10) || lineHeight*3,
 59+ maxheight = parseInt($textarea.css('max-height'),10) || Number.MAX_VALUE,
 60+ goalheight = 0;
 61+
 62+ // Opera returns max-height of -1 if not set
 63+ if (maxheight < 0) { maxheight = Number.MAX_VALUE; }
 64+
 65+ // Append the twin to the DOM
 66+ // We are going to meassure the height of this, not the textarea.
 67+ $twin.appendTo($textarea.parent());
 68+
 69+ // Copy the essential styles (mimics) from the textarea to the twin
 70+ var i = mimics.length;
 71+ while(i--){
 72+ $twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));
 73+ }
 74+
 75+ // Updates the width of the twin. (solution for textareas with widths in percent)
 76+ function setTwinWidth(){
 77+ curatedWidth = Math.floor(parseInt($textarea.width(),10));
 78+ if($twin.width() !== curatedWidth){
 79+ $twin.css({'width': curatedWidth + 'px'});
 80+
 81+ // Update height of textarea
 82+ update(true);
 83+ }
 84+ }
 85+
 86+ // Sets a given height and overflow state on the textarea
 87+ function setHeightAndOverflow(height, overflow){
 88+
 89+ var curratedHeight = Math.floor(parseInt(height,10));
 90+ if($textarea.height() !== curratedHeight){
 91+ $textarea.css({'height': curratedHeight + 'px','overflow':overflow});
 92+
 93+ // Fire the custom event resize
 94+ //$textarea.trigger('resize');
 95+
 96+ }
 97+ }
 98+
 99+ // This function will update the height of the textarea if necessary
 100+ function update(forced) {
 101+
 102+ // Get curated content from the textarea.
 103+ var textareaContent = $textarea.val().replace(/&/g,'&amp;').replace(/ {2}/g, '&nbsp;').replace(/<|>/g, '&gt;').replace(/\n/g, '<br />');
 104+
 105+ // Compare curated content with curated twin.
 106+ var twinContent = $twin.html().replace(/<br>/ig,'<br />');
 107+
 108+ if(forced || textareaContent+'&nbsp;' !== twinContent){
 109+
 110+ // Add an extra white space so new rows are added when you are at the end of a row.
 111+ $twin.html(textareaContent+'&nbsp;');
 112+
 113+ // Change textarea height if twin plus the height of one line differs more than 3 pixel from textarea height
 114+ if(Math.abs($twin.height() + lineHeight - $textarea.height()) > 3){
 115+
 116+ var goalheight = $twin.height()+lineHeight;
 117+ if(goalheight >= maxheight) {
 118+ setHeightAndOverflow(maxheight,'auto');
 119+ } else if(goalheight <= minheight) {
 120+ setHeightAndOverflow(minheight,'hidden');
 121+ } else {
 122+ setHeightAndOverflow(goalheight,'hidden');
 123+ }
 124+
 125+ }
 126+
 127+ }
 128+
 129+ }
 130+
 131+ // Hide scrollbars
 132+ $textarea.css({'overflow':'hidden'});
 133+
 134+ // Update textarea size on keyup, change, cut and paste
 135+ $textarea.bind('keyup change cut paste', function(){
 136+ update();
 137+ });
 138+
 139+ // Update width of twin if browser or textarea is resized (solution for textareas with widths in percent)
 140+ $(window).bind('resize', setTwinWidth);
 141+ $textarea.bind('resize', setTwinWidth);
 142+ $textarea.bind('update', update);
 143+
 144+ // Compact textarea on blur
 145+ $textarea.bind('blur',function(){
 146+ if($twin.height() < maxheight){
 147+ if($twin.height() > minheight) {
 148+ $textarea.height($twin.height());
 149+ } else {
 150+ $textarea.height(minheight);
 151+ }
 152+ }
 153+ });
 154+
 155+ // And this line is to catch the browser paste event
 156+ $textarea.bind('input paste',function(e){ setTimeout( update, 250); });
 157+
 158+ // Run update once when elastic is initialized
 159+ update();
 160+
 161+ });
 162+
 163+ }
 164+ });
 165+})(jQuery);
\ No newline at end of file
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -138,6 +138,11 @@
139139 position: static;
140140 }
141141
 142+.mw-ajax-loader {
 143+ /* Undo padding due to it destroying the layout for inline response */
 144+ padding:8px 16px 0px 16px !important;
 145+}
 146+
142147 /* The images here are named -ltr instead of -left and -rtl instead of -right
143148 * because ResourceLoader flips -ltr and -rtl in URLs, but not -left and -right
144149 */
@@ -179,7 +184,6 @@
180185 position: relative;
181186 margin-top:0.5em;
182187 margin-bottom:0.5em;
183 -
184188 padding:0;
185189 }
186190
@@ -211,6 +215,48 @@
212216 background-image: url(images/emoticon-sad.png);
213217 }
214218
 219+.fbd-ajax-response {
 220+ padding:1.5em 2em;
 221+}
 222+
 223+.fbd-item-response-icon {
 224+ float: left;
 225+ display: block;
 226+ height: 56px;
 227+ width: 56px;
 228+ background-position: center center;
 229+ background-repeat: no-repeat;
 230+ padding: 8px 16px;
 231+ position: relative;
 232+ top: -16px;
 233+}
 234+
 235+.fbd-item-response > p {
 236+ padding:0;
 237+ margin:0;
 238+}
 239+
 240+.fbd-item-response-success {
 241+ /* @embed */
 242+ background-image: url(images/response-success.png);
 243+}
 244+
 245+.fbd-item-response-error {
 246+ /* @embed */
 247+ background-image: url(images/response-error.png);
 248+}
 249+
 250+.fbd-ajax-response > div > .fbd-ajax-heading {
 251+ font-size:1.5em;
 252+ font-weight:bold;
 253+ display:block;
 254+}
 255+
 256+.fbd-ajax-response > div > .fbd-ajax-text {
 257+ color:#262626;
 258+ display:block;
 259+}
 260+
215261 .fbd-item-userName {
216262 font-size: 1.2em;
217263 margin: 0;
@@ -233,6 +279,22 @@
234280 min-height:40px;
235281 }
236282
 283+.fbd-response-text {
 284+ height:5em;
 285+ overflow:hidden;
 286+}
 287+
 288+.fbd-response-preview-spinner {
 289+ height:32px;
 290+ line-height:32px;
 291+}
 292+
 293+.fbd-response-wikitext{
 294+ background-color: #FDFFE7;
 295+ border: 1px solid #FCEB92;
 296+ padding:5px;
 297+}
 298+
237299 .fbd-item-permalink,
238300 .fbd-item-show,
239301 .fbd-item-hide,
@@ -263,14 +325,14 @@
264326 .fbd-response-form b {
265327 font-size:1em;
266328 }
267 -.fbd-response-form small{
 329+.fbd-response-form small, .fbd-response-form .small{
268330 font-size:0.8em;
269331 color:#262626;
270332 }
271333 .fbd-response-formNote {
272334 float:right;
273335 }
274 -.fbd-response-submit {
 336+.fbd-response-submit, .fbd-response-preview {
275337 float:right;
276338 }
277339 .center {
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -256,10 +256,10 @@
257257 function confirmAction(params, $item){
258258
259259 var inlineForm = $('<span>').attr('class', 'fbd-item-reason')
260 - .append( $('<span>').html(mw.msg( 'moodbar-action-reason' )) )
 260+ .append( $('<span>').text(mw.msg( 'moodbar-action-reason' )) )
261261 .append( $('<input />').attr({'class':'fbd-action-reason', 'name':'fbd-action-reason'}) )
262 - .append( $('<button>').attr('class', 'fbd-action-confirm').html( mw.msg('moodbar-feedback-action-confirm')) )
263 - .append( $('<button>').attr('class', 'fbd-action-cancel').html( mw.msg('moodbar-feedback-action-cancel')) )
 262+ .append( $('<button>').attr('class', 'fbd-action-confirm').text( mw.msg('moodbar-feedback-action-confirm')) )
 263+ .append( $('<button>').attr('class', 'fbd-action-cancel').text( mw.msg('moodbar-feedback-action-cancel')) )
264264 .append( $('<span>').attr('class', 'fbd-item-reason-msg') )
265265 .append( $('<div>').attr('class', 'fbd-item-reason-msg') );
266266
@@ -382,56 +382,53 @@
383383 } else {
384384
385385 //init terms of use link
386 - var termsofuse = mw.html.element ('a', {
387 - 'href': mw.msg( 'moodbar-response-terms-of-use-link' ),
388 - 'title': mw.msg( 'moodbar-response-terms-of-use' ),
 386+ var termsLink = mw.html.element ('a', {
 387+ 'href': mw.msg( 'moodbar-response-url' ),
 388+ 'title': mw.msg( 'moodbar-response-link' ),
389389 'target': '_new'
390 - }, mw.msg( 'moodbar-response-terms-of-use' ) );
 390+ }, mw.msg( 'moodbar-response-link' ) );
391391
392 - //creative commons link
393 - var creativecommons = mw.html.element('a', {
394 - 'href': mw.msg ( 'moodbar-response-cc-link' ),
395 - 'title': mw.msg ( 'moodbar-response-cc' ),
396 - 'target': '_new'
397 - }, mw.msg ( 'moodbar-response-cc' ) );
398 -
399 - //gfdl
400 - var gfdl = mw.html.element('a', {
401 - 'href': mw.msg( 'moodbar-response-gfdl-link' ),
402 - 'title': mw.msg( 'moodbar-response-gfdl' ),
403 - 'target': '_new'
404 - }, mw.msg( 'moodbar-response-gfdl' ) );
405 -
406392 //ULA
407 - var ula = mw.msg( 'moodbar-response-ula' )
408 - .replace ( /\$1/, mw.msg( 'moodbar-response-btn') )
409 - .replace ( /\$2/, termsofuse)
410 - .replace ( /\$3/, creativecommons)
411 - .replace ( /\$4/, gfdl);
 393+ var ula = mw.msg( 'moodbar-response-terms' )
 394+ .replace ( /\$1/g, termsLink );
412395
413396 //build form
414397 var inlineForm = $('<div>').attr( 'class', 'fbd-response-form' )
415398 .append(
416 - $('<b>').html( mw.msg( 'moodbar-response-add' ) )
 399+ $('<b>').text( mw.msg( 'moodbar-response-add' ) )
417400 ).append(
418 - $('<small>').attr( 'class', 'fbd-text-gray' ).html( ' (' + mw.msg( 'moodbar-response-nosig' ) + ') ' )
 401+ $('<small>').attr( 'class', 'fbd-text-gray' ).text( ' (' + mw.msg( 'moodbar-response-desc' ) + ') ' )
419402 ).append(
420403 $('<div>').attr( 'class', 'fbd-response-formNote' )
421404 .append($('<small>')
422405 .append(
423406 $('<span>').attr( 'class', 'fbd-response-charCount' )
424407 ).append(
425 - $('<span>').html( mw.msg( 'moodbar-form-note-dynamic' ).replace( /\$1/g, "" ) )
 408+ $('<span>').text( mw.msg( 'moodbar-form-note-dynamic' ).replace( /\$1/g, "" ) )
426409 )
427410 )
428411 ).append(
429412 $('<textarea>').attr( { 'class':'fbd-response-text', 'name':'fbd-response-text' } )
430413 ).append(
431 - $('<div>').attr('class', 'ula').html( ula )
 414+ $('<div />').attr('class', 'fbd-response-preview-spinner')
 415+ .append($('<span />').attr('class', 'mw-ajax-loader')
 416+ //hack the .mw-ajax-loader styles beacuse they are horrible for reuse
 417+ .css({ 'top':'0px','padding':'16px', 'display':'block', 'width':'32px' }).html('&nbsp;')
 418+ ).hide()
432419 ).append(
433 - $('<button>').attr( 'class', 'fbd-response-submit' ).html( mw.msg( 'moodbar-response-btn' ) + ' ' + mw.msg( 'moodbar-respond-collapsed' ) )
434 - .attr({'disabled':'true'})
 420+ $('<div />').attr('class', 'fbd-response-preview-block')
 421+ .append(
 422+ $('<div />').attr('class', 'fbd-response-wikitext').hide())
 423+ .append(
 424+ $('<div>').attr('class', 'ula small').html( ula ).hide())
435425 ).append(
 426+ $('<button>').attr( 'class', 'fbd-response-submit' ).text( mw.msg( 'moodbar-response-btn' ) + ' ' + mw.msg( 'moodbar-respond-collapsed' ) )
 427+ .attr( 'disabled', 'true' ).hide()
 428+ ).append(
 429+ $('<button>').attr('class', 'fbd-response-preview-back').text( mw.msg( 'response-back-text' ) ).hide()
 430+ ).append(
 431+ $('<button>').attr( 'class', 'fbd-response-preview').text ( mw.msg( 'response-preview-text' ) ).attr( 'disabled', 'true' )
 432+ ).append(
436433 $('<div>').attr( 'style', 'clear:both' )
437434 );
438435
@@ -453,83 +450,81 @@
454451 .keyup( function(event) {
455452 validateResponse($item);
456453 })
 454+ .elastic()
457455 .end()
458 - .find('.fbd-response-submit')
 456+ .find('.fbd-response-preview')
459457 .click (function () {
460 - var fbResponse = $item.find('.fbd-response-text').val();
461 - if( fbResponse ){
462 - var clientData = $.client.profile(),
463 - item_id = $item.data('mbccontinue').split('|')[1],
464 - resData = {
465 - 'action':'feedbackdashboardresponse',
466 - 'useragent': clientData.name + '/' + clientData.versionNumber,
467 - 'system': clientData.platform,
468 - 'token': mw.config.get('mbEditToken'),
469 - 'response': fbResponse,
470 - 'feedback': item_id,
471 - 'format':'json'
472 - };
473 - $item.find('.fbd-item-response').remove(); //remove feedback response link for duration of request
474 - var $spinner = $('<span class="mw-ajax-loader">&nbsp;</span>');
475 - $responseForm = $item.find('.fbd-response-form').empty().append( $spinner );
476 -
477 - //send response
478 - $.ajax( {
479 - 'type': 'POST',
480 - 'url': mw.util.wikiScript( 'api' ),
481 - 'data': resData,
482 - 'success': function (data) {
483 - inlineMessage($responseForm, mw.msg( 'feedbackresponse-success' ), function() {
484 - closeAllResponders();
485 - reloadItem( $item, true );
486 - });
487 - },
488 - 'error': function( jqXHR, textStatus, errorThrown ) {
489 - //ajax error
490 - inlineMessage($responseForm, mw.msg( 'moodbar-feedback-ajaxerror' ), function() {
491 - closeAllResponders();
492 - reloadItem( $item, true );
493 - });
494 -
495 - },
496 - 'dataType': 'json'
497 - } );
498 -
499 - }
500 - })
501 - .end();
 458+ //toggle preview
 459+ $item = $(this).parent().parent();
 460+ $item.find('.fbd-response-preview, .fbd-response-text').hide();
 461+ $item.find('.fbd-response-submit, .fbd-response-preview-back, .ula').show();
 462+ var wikitext = $item.find('.fbd-response-text').val();
 463+ wikitext = wikitext.replace(/~{3,5}/g, '') + "\n\n~~~~"; //remove and add signature for
 464+ parseWikiText($item, wikitext);
 465+ });
502466 }
503467 e.preventDefault();
504 -
505468 }
506 -
 469+
 470+ function parseWikiText($item, wikitext) {
 471+ $item.find('.fbd-response-preview-spinner').show();
 472+ $.ajax({
 473+ url: mw.util.wikiScript( 'api' ),
 474+ data: {
 475+ 'action': 'parse',
 476+ 'title': mw.config.get( 'wgPageName' ),
 477+ 'format': 'json',
 478+ 'text': wikitext,
 479+ 'prop': 'text',
 480+ 'pst': true
 481+ },
 482+ dataType: 'json',
 483+ type: 'POST',
 484+ success: function( data ) {
 485+ $item
 486+ .find('.fbd-response-preview-spinner') //fadeout spinner
 487+ .hide()
 488+ .end()
 489+ .find('.fbd-response-wikitext')
 490+ .html( data.parse.text['*'] )
 491+ .fadeIn()
 492+ .end();
 493+ },
 494+ error: function() {
 495+ //handle error
 496+ //fadeout spinner
 497+ }
 498+ });
 499+ }
 500+
507501 /**
508 - * Toggle submit button from enabled to disabled
 502+ * Toggle submit / preview button from enabled to disabled
509503 * Depends on value of .fbd-response-text
510504 * @param $item jQuery item containing the .fbd-item
 505+ * Require at least 1 character and limit to 5000
511506 */
512507 function validateResponse($item) {
513 - if( $item.find('.fbd-response-text').val() !== "" ) {
514 - $item.find( '.fbd-response-submit').removeAttr('disabled');
 508+ var response = $item.find('.fbd-response-text').val();
 509+ if( response.length > 0 && response.length <= 5000 ) {
 510+ $item.find( '.fbd-response-submit, .fbd-response-preview').removeAttr('disabled');
515511 } else {
516 - $item.find( '.fbd-response-submit').attr({'disabled':'true'});
 512+ $item.find( '.fbd-response-submit, .fbd-response-preview').attr({'disabled':'true'});
517513 }
518514 }
519515
520516 /**
521 - * Send Message to item in regards with response
522 - * @param $el Element to display message inside of and fadeout
 517+ * Generic inline message, with fadeout
 518+ * @param $el Element to display message inside
523519 * @param msg text to display
524520 * @callback to execute after fadeOut
525521 */
526522 function inlineMessage( $el, msg, callback) {
527523 $el.empty()
528 - .html( msg )
 524+ .text( msg )
529525 .delay(2000)
530526 .fadeOut('slow', callback);
531527 }
532528
533 -
534529 // On-load stuff
535530
536531 $('.fbd-item-show a').live( 'click', showHiddenItem );
@@ -540,6 +535,80 @@
541536
542537 $('.fbd-respond-link').live ('click', showResponseForm );
543538
 539+ //handle preview back button
 540+ $('.fbd-response-preview-back').live('click', function(){
 541+ $item = $(this).parent().parent();
 542+ $item.find('.fbd-response-submit, .fbd-response-wikitext, .fbd-response-preview-back, .ula').hide();
 543+ $item.find('.fbd-response-preview, .fbd-response-text').show();
 544+ });
 545+
 546+ //handle response submit
 547+ $('.fbd-response-submit').live('click', function () {
 548+ $item = $(this).parent().parent();
 549+ var fbResponse = $item.find('.fbd-response-text').val();
 550+ if( fbResponse ){
 551+ var clientData = $.client.profile(),
 552+ item_id = $item.data('mbccontinue').split('|')[1],
 553+ resData = {
 554+ 'action':'feedbackdashboardresponse',
 555+ 'useragent': clientData.name + '/' + clientData.versionNumber,
 556+ 'system': clientData.platform,
 557+ 'token': mw.config.get('mbEditToken'),
 558+ 'response': fbResponse,
 559+ 'feedback': item_id,
 560+ 'format':'json'
 561+ };
 562+
 563+ var $responseStatus = $('<div />').attr('class', 'fbd-ajax-response')
 564+ .append($('<span />').attr('class','mw-ajax-loader fbd-item-response-icon').html('&nbsp;') )
 565+ .append($('<div />')
 566+ .append($('<span />').attr('class', 'fbd-ajax-heading').text( mw.msg( 'response-ajax-action-head' ) ) )
 567+ .append($('<span />').attr('class', 'fbd-ajax-text').text( mw.msg( 'response-ajax-action-body' ) ) )
 568+ );
 569+
 570+ $responseForm = $item.find('.fbd-response-form');
 571+ $responseForm.empty().append( $responseStatus );
 572+
 573+ //send response
 574+ $.ajax( {
 575+ 'type': 'POST',
 576+ 'url': mw.util.wikiScript( 'api' ),
 577+ 'data': resData,
 578+ 'success': function (data) {
 579+ $responseForm
 580+ .find('.mw-ajax-loader')
 581+ .addClass('fbd-item-response-success')
 582+ .removeClass('mw-ajax-loader')
 583+ .end()
 584+ .find('.fbd-ajax-heading')
 585+ .text( mw.msg( 'response-ajax-success-head' ) )
 586+ .end()
 587+ .find('.fbd-ajax-text')
 588+ .html( mw.msg( 'response-ajax-success-body') )
 589+ .end();
 590+ setTimeout(function(){
 591+ reloadItem($item, true);
 592+ }, 2000);
 593+
 594+ },
 595+ 'error': function( jqXHR, textStatus, errorThrown ) {
 596+ $responseForm
 597+ .find('.mw-ajax-loader')
 598+ .addClass('fbd-item-response-error')
 599+ .removeClass('mw-ajax-loader')
 600+ .end()
 601+ .find('.fbd-ajax-heading')
 602+ .text( mw.msg( 'response-ajax-error-head' ) )
 603+ .end()
 604+ .find('.fbd-ajax-text')
 605+ .html( mw.msg( 'response-ajax-error-body' ) );
 606+ },
 607+ 'dataType': 'json'
 608+ } );
 609+
 610+ }
 611+ });
 612+
544613 $( '#fbd-filters' ).children( 'form' ).submit( function( e ) {
545614 e.preventDefault();
546615 saveFormState();
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-success.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-success.png
___________________________________________________________________
Added: svn:mime-type
547616 + application/octet-stream
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-error.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/images/response-error.png
___________________________________________________________________
Added: svn:mime-type
548617 + application/octet-stream
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php
@@ -148,7 +148,8 @@
149149 'scripts' => 'ext.moodBar.dashboard/ext.moodBar.dashboard.js',
150150 'dependencies' => array(
151151 'mediawiki.util',
152 - 'jquery.NobleCount'
 152+ 'jquery.NobleCount',
 153+ 'jquery.elastic'
153154 ),
154155 'messages' => array(
155156 'moodbar-feedback-nomore',
@@ -163,17 +164,22 @@
164165 'moodbar-respond-collapsed',
165166 'moodbar-respond-expanded',
166167 'moodbar-response-add',
167 - 'moodbar-response-nosig',
 168+ 'moodbar-response-desc',
168169 'moodbar-response-btn',
169170 'moodbar-form-note-dynamic',
170 - 'moodbar-response-ula',
171 - 'moodbar-response-terms-of-use',
172 - 'moodbar-response-terms-of-use-link',
173 - 'moodbar-response-cc',
174 - 'moodbar-response-cc-link',
175 - 'moodbar-response-gfdl',
176 - 'moodbar-response-gfdl-link',
 171+ 'moodbar-response-url',
 172+ 'moodbar-response-link',
 173+ 'moodbar-response-terms',
177174 'feedbackresponse-success',
 175+ 'response-back-text',
 176+ 'response-preview-text',
 177+ 'response-preview-text',
 178+ 'response-ajax-action-head',
 179+ 'response-ajax-action-body',
 180+ 'response-ajax-success-head',
 181+ 'response-ajax-success-body',
 182+ 'response-ajax-error-head',
 183+ 'response-ajax-error-body',
178184 ),
179185 );
180186
@@ -188,6 +194,10 @@
189195 ),
190196 );
191197
 198+$wgResourceModules['jquery.elastic'] = $mbResourceTemplate + array(
 199+ 'scripts' => 'jquery.elastic/jquery.elastic.js'
 200+);
 201+
192202 /** Configuration **/
193203 /** The registration time after which users will be shown the MoodBar **/
194204 $wgMoodBarCutoffTime = null;

Status & tagging log