Index: branches/wmf/1.18wmf1/extensions/MoodBar/SpecialFeedbackDashboard.php |
— | — | @@ -128,9 +128,10 @@ |
129 | 129 | * @param $params An array of flags. Valid flags: |
130 | 130 | * * admin (user can show/hide feedback items) |
131 | 131 | * * show-anyway (user has asked to see this hidden item) |
| 132 | + * @param $response An array of response for feedback |
132 | 133 | * @return string HTML |
133 | 134 | */ |
134 | | - public static function formatListItem( $row, $params = array() ) { |
| 135 | + public static function formatListItem( $row, $params = array(), $response = array() ) { |
135 | 136 | global $wgLang, $wgUser; |
136 | 137 | |
137 | 138 | $classes = array('fbd-item'); |
— | — | @@ -142,6 +143,7 @@ |
143 | 144 | $feedbackItem = MBFeedbackItem::load( $row ); |
144 | 145 | } |
145 | 146 | catch (Exception $e) { |
| 147 | + $classes = Sanitizer::encodeAttribute( implode(' ', $classes) ); |
146 | 148 | $error_message = wfMessage('moodbar-feedback-load-record-error')->escaped(); |
147 | 149 | return <<<HTML |
148 | 150 | <li class="$classes"> |
— | — | @@ -200,22 +202,10 @@ |
201 | 203 | |
202 | 204 | } |
203 | 205 | |
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 ); |
214 | 207 | |
215 | 208 | $classes = Sanitizer::encodeAttribute( implode(' ', $classes) ); |
216 | 209 | $toolLinks = implode("\n", $toolLinks ); |
217 | | - if (!isset($responseElements)) { |
218 | | - $responseElements = ""; |
219 | | - } |
220 | 210 | |
221 | 211 | return <<<HTML |
222 | 212 | <li class="$classes" data-mbccontinue="$continueData"> |
— | — | @@ -232,6 +222,66 @@ |
233 | 223 | HTML; |
234 | 224 | } |
235 | 225 | |
| 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 | + |
236 | 286 | /** |
237 | 287 | * Build the "user information" part of an item on the feedback dashboard. |
238 | 288 | * @param $feedbackItem MBFeedbackItem representing the feedback to show |
— | — | @@ -350,8 +400,10 @@ |
351 | 401 | } |
352 | 402 | } |
353 | 403 | |
| 404 | + $response = self::getResponseSummary( $res['rows'] ); |
| 405 | + |
354 | 406 | foreach ( $res['rows'] as $row ) { |
355 | | - $list .= self::formatListItem( $row, $params ); |
| 407 | + $list .= self::formatListItem( $row, $params, $response ); |
356 | 408 | } |
357 | 409 | |
358 | 410 | if ( $list === '' ) { |
— | — | @@ -555,4 +607,37 @@ |
556 | 608 | ); |
557 | 609 | } |
558 | 610 | |
| 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 | + |
559 | 644 | } |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | 'moodbar-respond-expanded' => '▼', // Ignore, do not translate. ▼ |
39 | 39 | 'moodbar-respond-text' => 'Respond to this', |
40 | 40 | '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.', |
42 | 42 | 'moodbar-response-btn' => 'Send response', |
43 | 43 | 'moodbar-what-content' => 'This feature is designed to help the community understand the experience of people editing the site. |
44 | 44 | For more information, please visit the $1.', |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | 'moodbar-header-own-talk' => 'Own talk page', |
82 | 82 | // Special:MoodBarFeedback |
83 | 83 | 'moodbar-feedback-title' => 'Feedback dashboard', |
84 | | - 'moodbar-feedback-response-title' => 'Feedback dashboard response', |
| 84 | + 'moodbar-feedback-response-title' => '==In response to your [[$1|feedback]]==', |
85 | 85 | 'moodbar-feedback-view-link' => '(View the feedback)', |
86 | 86 | 'moodbar-feedback-filters' => 'Filters', |
87 | 87 | 'moodbar-feedback-filters-type' => 'Mood:', |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | 'moodbar-restore-intro' => '', |
118 | 118 | 'moodbar-invalid-item' => 'The system was unable to find the correct feedback item.', |
119 | 119 | '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', |
120 | 121 | // Mood types |
121 | 122 | 'moodbar-type-happy' => '{{GENDER:$1|Happy}}', |
122 | 123 | 'moodbar-type-sad' => '{{GENDER:$1|Sad}}', |
— | — | @@ -130,15 +131,19 @@ |
131 | 132 | 'moodbar-log-hide' => 'hid [[$1]]', |
132 | 133 | 'moodbar-log-restore' => 'restored the visibility for [[$1]]', |
133 | 134 | //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 | + |
143 | 148 | ); |
144 | 149 | |
145 | 150 | /** Message documentation (Message documentation) |
— | — | @@ -180,7 +185,7 @@ |
181 | 186 | 'moodbar-respond-expanded' => 'Special character for response form expanded', |
182 | 187 | 'moodbar-respond-text' => 'Text for Response toggle', |
183 | 188 | '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', |
185 | 190 | 'moodbar-response-btn' => 'Text for Response button', |
186 | 191 | 'moodbar-what-content' => '$1 is the message {{msg-mw|moodbar-what-link}} which links to the page [[mw:MoodBar|MoodBar]] on MediaWiki.org.', |
187 | 192 | 'moodbar-what-link' => 'This is the link embedded as parameter $1 in {{msg-mw|moodbar-what-content}}.', |
— | — | @@ -213,7 +218,7 @@ |
214 | 219 | 'moodbar-header-user' => '{{Identical|User}}', |
215 | 220 | 'moodbar-header-comment' => '{{Identical|Comment}}', |
216 | 221 | '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', |
218 | 223 | 'moodbar-feedback-view-link' => 'link to an individual feedback', |
219 | 224 | 'moodbar-feedback-filters' => '{{Identical|Filter}}', |
220 | 225 | 'moodbar-feedback-filters-type' => '{{Identical|Mood}}', |
— | — | @@ -236,19 +241,23 @@ |
237 | 242 | 'moodbar-hidden-footer-without-log' => '* $1 is a link to restore the item displaying {{msg-mw|moodbar-feedback-restore}}', |
238 | 243 | 'moodbar-action-reason' => 'Text for Admin action reason', |
239 | 244 | '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', |
240 | 246 | 'moodbar-type-happy' => '$1 is the username that can be used for GENDER', |
241 | 247 | 'moodbar-type-sad' => '$1 is the username that can be used for GENDER', |
242 | 248 | 'moodbar-type-confused' => '$1 is the username that can be used for GENDER', |
243 | 249 | '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)', |
253 | 262 | ); |
254 | 263 | |
255 | 264 | /** Afrikaans (Afrikaans) |
— | — | @@ -303,7 +312,7 @@ |
304 | 313 | 'moodbar-trigger-feedback' => 'تعليق على التحرير', |
305 | 314 | 'moodbar-trigger-share' => 'تبادل الخبرات', |
306 | 315 | 'moodbar-trigger-editing' => 'تعديل $1...', |
307 | | - 'moodbar-close' => '(إغلاق)', |
| 316 | + 'moodbar-close' => '(أغلق)', |
308 | 317 | 'moodbar-intro-feedback' => 'تعديل $1 جعلني...', |
309 | 318 | 'moodbar-intro-share' => 'تجربتي في $1 جعلتني...', |
310 | 319 | 'moodbar-intro-editing' => 'تعديل $1 جعلني...', |
— | — | @@ -353,11 +362,11 @@ |
354 | 363 | 'moodbar-feedback-title' => 'لوحة الملاحظات', |
355 | 364 | 'moodbar-feedback-filters' => 'مرشحات', |
356 | 365 | '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' => 'حزين', |
360 | 369 | 'moodbar-feedback-filters-username' => 'اسم المستخدم', |
361 | | - 'moodbar-feedback-filters-button' => 'إضبط المرشحات', |
| 370 | + 'moodbar-feedback-filters-button' => 'اضبط المُرشِّحات', |
362 | 371 | 'moodbar-feedback-whatis' => 'ماهذه الميزة؟', |
363 | 372 | 'moodbar-feedback-permalink' => 'وصلة تصل الى هنا', |
364 | 373 | 'moodbar-feedback-noresults' => 'لا يوجد تعليقات مطابقة للمرشحات الخاصة بك.', |
— | — | @@ -370,9 +379,12 @@ |
371 | 380 | 'moodbar-comment-hidden' => '(الملاحظات مخفية بواسطة إجراءات إدارية)', |
372 | 381 | 'moodbar-feedback-show' => 'أظهر الملاحظات المخفية', |
373 | 382 | 'moodbar-feedback-hide' => 'إخف الملاحظات', |
| 383 | + 'moodbar-feedback-action-confirm' => 'أكّد', |
| 384 | + 'moodbar-feedback-action-cancel' => 'ألغِ', |
374 | 385 | 'moodbar-hidden-footer' => 'الملاحظات المخفية$1', |
375 | 386 | 'moodbar-feedback-restore' => 'إستعد الملاحظات المخفية', |
376 | 387 | 'moodbar-action-item' => 'بند الملاحظات:', |
| 388 | + 'moodbar-action-reason' => 'السبب:', |
377 | 389 | 'moodbar-hide-header' => 'إخف هذا العنصر من الظهور', |
378 | 390 | 'moodbar-restore-header' => 'إستعد ظهور هذا العنصر', |
379 | 391 | 'moodbar-invalid-item' => 'لم يتمكن النظام من العثور على عنصر الملاحظات الصحيح.', |
— | — | @@ -661,7 +673,7 @@ |
662 | 674 | 'moodbar-respond-expanded' => '▼', |
663 | 675 | 'moodbar-respond-text' => 'Hierauf antworten', |
664 | 676 | '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.', |
666 | 678 | 'moodbar-response-btn' => 'Antwort senden', |
667 | 679 | '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. |
668 | 680 | Weitere Informationen hierzu sind an der folgenden Stelle zu finden: $1.', |
— | — | @@ -701,7 +713,7 @@ |
702 | 714 | 'moodbar-header-namespace' => 'Namensraum', |
703 | 715 | 'moodbar-header-own-talk' => 'Eigene Diskussionsseite', |
704 | 716 | '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]] ==', |
706 | 718 | 'moodbar-feedback-view-link' => '(Rückmeldungen ansehen)', |
707 | 719 | 'moodbar-feedback-filters' => 'Filter', |
708 | 720 | 'moodbar-feedback-filters-type' => 'Stimmung:', |
— | — | @@ -735,6 +747,7 @@ |
736 | 748 | 'moodbar-restore-header' => 'versteckten Teil der Rückmeldung wiederherstellen', |
737 | 749 | 'moodbar-invalid-item' => 'Das System konnte den richtigen Teil der Rückmeldung nicht finden.', |
738 | 750 | '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]]', |
739 | 752 | 'moodbar-type-happy' => 'glücklich', |
740 | 753 | 'moodbar-type-sad' => 'traurig', |
741 | 754 | 'moodbar-type-confused' => 'verwirrt', |
— | — | @@ -745,12 +758,14 @@ |
746 | 759 | '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.', |
747 | 760 | 'moodbar-log-hide' => 'blendete [[$1]] aus', |
748 | 761 | '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.', |
755 | 770 | ); |
756 | 771 | |
757 | 772 | /** German (formal address) (Deutsch (Sie-Form)) |
— | — | @@ -761,9 +776,8 @@ |
762 | 777 | 'moodbar-privacy' => 'Mit dem Speichern erklären Sie sich mit diesen $1 einverstanden.', |
763 | 778 | 'moodbar-success-subtitle' => 'Uns Ihre Stimmung mitzuteilen hilft uns dabei $1 weiter zu verbessern.', |
764 | 779 | '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.', |
768 | 782 | ); |
769 | 783 | |
770 | 784 | /** Greek (Ελληνικά) |
— | — | @@ -929,6 +943,7 @@ |
930 | 944 | |
931 | 945 | /** Persian (فارسی) |
932 | 946 | * @author Mjbmr |
| 947 | + * @author ZxxZxxZ |
933 | 948 | */ |
934 | 949 | $messages['fa'] = array( |
935 | 950 | 'moodbar-desc' => 'به کاربران مشخص این اجازه را میدهد که بازخوردی از تجربهٔ ویرایشهایشان، ارائه دهند', |
— | — | @@ -945,6 +960,8 @@ |
946 | 961 | 'tooltip-moodbar-what' => 'دربارهٔ این ویژگی بیشتر مطالعه کنید', |
947 | 962 | 'moodbar-what-label' => 'این چیست؟', |
948 | 963 | 'moodbar-what-collapsed' => '◄', |
| 964 | + 'moodbar-respond-text' => 'پاسخ به این', |
| 965 | + 'moodbar-response-add' => 'افزودن پاسخ', |
949 | 966 | 'moodbar-what-content' => 'این ویژگی طوری طراحی شده است که به جامعه برای فهم تجربهٔ مردم از ویرایش در این تارنما کمک میکند. |
950 | 967 | برای اطلاعات بیشتر، به $1 مراجعه کنید.', |
951 | 968 | 'moodbar-what-link' => 'صفحهٔ ویژگی', |
— | — | @@ -981,12 +998,31 @@ |
982 | 999 | 'moodbar-header-user-editcount' => 'شمار ویرایشهای کاربر', |
983 | 1000 | 'moodbar-header-namespace' => 'فضای نام', |
984 | 1001 | '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' => 'دلیل:', |
985 | 1013 | 'moodbar-type-happy' => 'شاد', |
986 | 1014 | 'moodbar-type-sad' => 'غمگین', |
987 | 1015 | 'moodbar-type-confused' => 'گیج', |
988 | 1016 | 'moodbar-user-anonymized' => 'گمنام', |
989 | 1017 | 'moodbar-user-ip' => 'نشانی آیپی', |
990 | 1018 | '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' => 'اوه!', |
991 | 1027 | ); |
992 | 1028 | |
993 | 1029 | /** Finnish (Suomi) |
— | — | @@ -1056,6 +1092,7 @@ |
1057 | 1093 | * @author Gomoko |
1058 | 1094 | * @author Hashar |
1059 | 1095 | * @author IAlex |
| 1096 | + * @author McDutchie |
1060 | 1097 | * @author Tpt |
1061 | 1098 | */ |
1062 | 1099 | $messages['fr'] = array( |
— | — | @@ -1072,6 +1109,9 @@ |
1073 | 1110 | 'moodbar-type-confused-title' => 'Confus', |
1074 | 1111 | 'tooltip-moodbar-what' => 'En savoir plus sur cette fonctionnalité', |
1075 | 1112 | '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', |
1076 | 1116 | 'moodbar-what-content' => "Cette fonctionnalité est conçue pour aider la communauté à comprendre le ressenti des personnes éditant le site. |
1077 | 1117 | Pour plus d'information, consultez la $1.", |
1078 | 1118 | 'moodbar-what-link' => 'page décrivant la fonction', |
— | — | @@ -1110,6 +1150,7 @@ |
1111 | 1151 | 'moodbar-header-namespace' => 'Espace de noms', |
1112 | 1152 | 'moodbar-header-own-talk' => 'Page de discussion personnelle', |
1113 | 1153 | 'moodbar-feedback-title' => 'Tableau de bord des ressentis', |
| 1154 | + 'moodbar-feedback-response-title' => "Réponse d'avis du tableau de bord", |
1114 | 1155 | 'moodbar-feedback-view-link' => '(Voir les commentaires)', |
1115 | 1156 | 'moodbar-feedback-filters' => 'Filtres', |
1116 | 1157 | 'moodbar-feedback-filters-type' => 'Humeur:', |
— | — | @@ -1131,6 +1172,8 @@ |
1132 | 1173 | 'moodbar-comment-hidden' => '(Commentaire caché par mesure administrative)', |
1133 | 1174 | 'moodbar-feedback-show' => 'afficher les commentaires cachés', |
1134 | 1175 | 'moodbar-feedback-hide' => 'masquer les commentaires', |
| 1176 | + 'moodbar-feedback-action-confirm' => 'Confirmer', |
| 1177 | + 'moodbar-feedback-action-cancel' => 'Annuler', |
1135 | 1178 | 'moodbar-hidden-footer' => 'Avis caché de $1 sur $2, motif: $3 $4', |
1136 | 1179 | 'moodbar-hidden-footer-without-log' => 'Commentaire caché $1', |
1137 | 1180 | 'moodbar-feedback-restore' => 'restaurer les commentaires cachés', |
— | — | @@ -1239,6 +1282,7 @@ |
1240 | 1283 | ); |
1241 | 1284 | |
1242 | 1285 | /** Galician (Galego) |
| 1286 | + * @author McDutchie |
1243 | 1287 | * @author Toliño |
1244 | 1288 | */ |
1245 | 1289 | $messages['gl'] = array( |
— | — | @@ -1255,6 +1299,10 @@ |
1256 | 1300 | 'moodbar-type-confused-title' => 'Confuso', |
1257 | 1301 | 'tooltip-moodbar-what' => 'Máis información sobre esta característica', |
1258 | 1302 | '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', |
1259 | 1307 | 'moodbar-what-content' => 'Esta característica está deseñada para axudar á comunidade a entender a experiencia da xente á hora de editar o sitio. |
1260 | 1308 | Para obter máis información, bótelle unha ollada á $1 .', |
1261 | 1309 | 'moodbar-what-link' => 'páxina da característica', |
— | — | @@ -1292,7 +1340,8 @@ |
1293 | 1341 | 'moodbar-header-user-editcount' => 'Número de edición do usuario', |
1294 | 1342 | 'moodbar-header-namespace' => 'Espazo de nomes', |
1295 | 1343 | '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]]==', |
1297 | 1346 | 'moodbar-feedback-view-link' => '(Ollar os comentarios)', |
1298 | 1347 | 'moodbar-feedback-filters' => 'Filtros', |
1299 | 1348 | 'moodbar-feedback-filters-type' => 'Humor:', |
— | — | @@ -1314,6 +1363,8 @@ |
1315 | 1364 | 'moodbar-comment-hidden' => '(Comentario agochado por un administrador)', |
1316 | 1365 | 'moodbar-feedback-show' => 'mostrar o comentario agochado', |
1317 | 1366 | 'moodbar-feedback-hide' => 'agochar o comentario', |
| 1367 | + 'moodbar-feedback-action-confirm' => 'Confirmar', |
| 1368 | + 'moodbar-feedback-action-cancel' => 'Cancelar', |
1318 | 1369 | 'moodbar-hidden-footer' => 'Comentario agochado por $1 o $2 ás $3; motivo: $4 $5', |
1319 | 1370 | 'moodbar-hidden-footer-without-log' => 'Comentario agochado $1', |
1320 | 1371 | 'moodbar-feedback-restore' => 'restaurar o comentario agochado', |
— | — | @@ -1324,6 +1375,7 @@ |
1325 | 1376 | 'moodbar-restore-header' => 'Restaurar a visibilidade deste elemento', |
1326 | 1377 | 'moodbar-invalid-item' => 'O sistema non puido atopar o elemento de valoración correcto.', |
1327 | 1378 | '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', |
1328 | 1380 | 'moodbar-type-happy' => 'Contento', |
1329 | 1381 | 'moodbar-type-sad' => 'Triste', |
1330 | 1382 | 'moodbar-type-confused' => 'Confuso', |
— | — | @@ -1334,6 +1386,14 @@ |
1335 | 1387 | 'moodbar-log-header' => 'Este é o rexistro das accións levadas a cabo nos elementos de valoración listados no [[Special:FeedbackDashboard|taboleiro de comentarios]].', |
1336 | 1388 | 'moodbar-log-hide' => 'agochou "[[$1]]"', |
1337 | 1389 | '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.', |
1338 | 1398 | ); |
1339 | 1399 | |
1340 | 1400 | /** Swiss German (Alemannisch) |
— | — | @@ -1397,6 +1457,9 @@ |
1398 | 1458 | 'tooltip-moodbar-what' => 'מידע נוסף על התכונה הזאת', |
1399 | 1459 | 'moodbar-what-label' => 'מה זה?', |
1400 | 1460 | 'moodbar-what-collapsed' => '◄', |
| 1461 | + 'moodbar-respond-text' => 'להשיב לזה', |
| 1462 | + 'moodbar-response-add' => 'להוסיף תשובה', |
| 1463 | + 'moodbar-response-btn' => 'שליחת תגובה', |
1401 | 1464 | 'moodbar-what-content' => 'התכונה הזאת נועדה לעזור לקהילה להבין את החוויה של האנשים שעורכים את האתר. |
1402 | 1465 | למידע נוסף, בקרו בדף $1.', |
1403 | 1466 | 'moodbar-what-link' => 'דף תכונה', |
— | — | @@ -1435,6 +1498,8 @@ |
1436 | 1499 | 'moodbar-header-namespace' => 'מרחב שם', |
1437 | 1500 | 'moodbar-header-own-talk' => 'דף שיחה של עצמי', |
1438 | 1501 | 'moodbar-feedback-title' => 'לוח בקרה של משובים', |
| 1502 | + 'moodbar-feedback-response-title' => '==בתגובה ל[[$1|משוב שלך]]==', |
| 1503 | + 'moodbar-feedback-view-link' => '(הצגת המשוב)', |
1439 | 1504 | 'moodbar-feedback-filters' => 'מסננים', |
1440 | 1505 | 'moodbar-feedback-filters-type' => 'מצב רוח:', |
1441 | 1506 | 'moodbar-feedback-filters-type-happy' => 'שמחה', |
— | — | @@ -1451,13 +1516,19 @@ |
1452 | 1517 | 'moodbar-feedback-newer' => 'חדשות יותר', |
1453 | 1518 | 'moodbar-feedback-older' => 'ישנות יותר', |
1454 | 1519 | 'moodbar-feedback-ajaxerror' => 'אירעה שגיאה בעת אחזור תוצאות נוספות.', |
| 1520 | + 'moodbar-feedback-load-record-error' => 'אירעה שגיאה בעת טעינת רשומה.', |
1455 | 1521 | 'moodbar-user-hidden' => '(חשבון מוסתר)', |
1456 | 1522 | 'moodbar-comment-hidden' => '(המשוב הוסתר על־ידי פעולת מנהל)', |
1457 | 1523 | 'moodbar-feedback-show' => 'הצגת משוב מוסתר', |
1458 | 1524 | 'moodbar-feedback-hide' => 'הסתרת משוב', |
| 1525 | + 'moodbar-feedback-action-confirm' => 'אישור', |
| 1526 | + 'moodbar-feedback-action-cancel' => 'ביטול', |
1459 | 1527 | 'moodbar-hidden-footer' => 'משוב מוסתר $1 מ־$2 $3, סיבה: $4‏ $5', |
| 1528 | + 'moodbar-hidden-footer-without-log' => 'משוב מוסתר $1', |
1460 | 1529 | 'moodbar-feedback-restore' => 'שחזור משוב מוסתר', |
1461 | 1530 | 'moodbar-action-item' => 'פריט משוב:', |
| 1531 | + 'moodbar-action-reason' => 'סיבה:', |
| 1532 | + 'moodbar-action-reason-required' => 'נא להזין סיבה.', |
1462 | 1533 | 'moodbar-hide-header' => 'הסתרת הפריט הזה מהתצוגה', |
1463 | 1534 | 'moodbar-restore-header' => 'שחזור הנראוּת של הפריט הזה', |
1464 | 1535 | 'moodbar-invalid-item' => 'המערכת לא הצליחה למצא את פריט המשוב הנכון.', |
— | — | @@ -1528,6 +1599,9 @@ |
1529 | 1600 | 'moodbar-type-confused-title' => 'Confuse', |
1530 | 1601 | 'tooltip-moodbar-what' => 'Lege plus a proposito de iste function', |
1531 | 1602 | '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', |
1532 | 1606 | 'moodbar-what-content' => 'Iste function es concipite pro adjutar le communitate a comprender le experientia del personas qui modifica le sito. |
1533 | 1607 | Pro ulterior information, per favor visita le $1.', |
1534 | 1608 | 'moodbar-what-link' => 'pagina de function', |
— | — | @@ -1566,6 +1640,8 @@ |
1567 | 1641 | 'moodbar-header-namespace' => 'Spatio de nomines', |
1568 | 1642 | 'moodbar-header-own-talk' => 'Pagina de discussion proprie', |
1569 | 1643 | 'moodbar-feedback-title' => 'Pannello de retroaction', |
| 1644 | + 'moodbar-feedback-response-title' => 'Responsa de pannello de retroaction', |
| 1645 | + 'moodbar-feedback-view-link' => '(Vider le commentario)', |
1570 | 1646 | 'moodbar-feedback-filters' => 'Filtros', |
1571 | 1647 | 'moodbar-feedback-filters-type' => 'Humor:', |
1572 | 1648 | 'moodbar-feedback-filters-type-happy' => 'Felice', |
— | — | @@ -1586,6 +1662,8 @@ |
1587 | 1663 | 'moodbar-comment-hidden' => '(Commentario celate per action administrative)', |
1588 | 1664 | 'moodbar-feedback-show' => 'monstrar commentario celate', |
1589 | 1665 | 'moodbar-feedback-hide' => 'celar commentario', |
| 1666 | + 'moodbar-feedback-action-confirm' => 'Confirmar', |
| 1667 | + 'moodbar-feedback-action-cancel' => 'Cancellar', |
1590 | 1668 | 'moodbar-hidden-footer' => 'Commentario celate scribite per $1 le $2 a $3, motivo: $4 $5', |
1591 | 1669 | 'moodbar-hidden-footer-without-log' => 'Commentario celate $1', |
1592 | 1670 | 'moodbar-feedback-restore' => 'restaurar commentario celate', |
— | — | @@ -1685,8 +1763,11 @@ |
1686 | 1764 | 'moodbar-user-hidden' => '(Benotzer verstoppt)', |
1687 | 1765 | 'moodbar-feedback-show' => 'verstoppte Feedback weisen', |
1688 | 1766 | 'moodbar-feedback-hide' => 'Feedback verstoppen', |
| 1767 | + 'moodbar-feedback-action-confirm' => 'Confirméieren', |
| 1768 | + 'moodbar-feedback-action-cancel' => 'Ofbriechen', |
1689 | 1769 | 'moodbar-hidden-footer' => 'Vum $1 den $2 ëm $3 verstoppte Feedback, Grond: $4 $5', |
1690 | 1770 | 'moodbar-action-reason' => 'Grond:', |
| 1771 | + 'moodbar-action-reason-required' => 'Gitt w.e.g. e Grond un.', |
1691 | 1772 | 'moodbar-type-happy' => 'Glécklech', |
1692 | 1773 | 'moodbar-type-sad' => 'Traureg', |
1693 | 1774 | 'moodbar-type-confused' => 'Duercherneen', |
— | — | @@ -1733,6 +1814,7 @@ |
1734 | 1815 | |
1735 | 1816 | /** Macedonian (Македонски) |
1736 | 1817 | * @author Bjankuloski06 |
| 1818 | + * @author McDutchie |
1737 | 1819 | */ |
1738 | 1820 | $messages['mk'] = array( |
1739 | 1821 | 'moodbar-desc' => 'Им овозможува на одредени корисници да даваат мислење за уредувањето', |
— | — | @@ -1750,7 +1832,7 @@ |
1751 | 1833 | 'moodbar-what-label' => 'Што е ова?', |
1752 | 1834 | 'moodbar-respond-text' => 'Одговори на ова', |
1753 | 1835 | 'moodbar-response-add' => 'Додајте ваш одѕив', |
1754 | | - 'moodbar-response-nosig' => 'потписот не е задолжителен', |
| 1836 | + 'moodbar-response-desc' => 'Во одговорот ќе биде наведен изворниот коментар (мислење). Потписот не е задолжителен.', |
1755 | 1837 | 'moodbar-response-btn' => 'Испрати одѕив', |
1756 | 1838 | 'moodbar-what-content' => 'Оваа функција е предвидена да ѝ овозможува на заедницата да го осознае искуството на луѓето што го уредуваат мрежното место. |
1757 | 1839 | Повеќе информации ќе добиете на $1.', |
— | — | @@ -1790,7 +1872,7 @@ |
1791 | 1873 | 'moodbar-header-namespace' => 'Именски простор', |
1792 | 1874 | 'moodbar-header-own-talk' => 'Сопствена страница за разговор', |
1793 | 1875 | 'moodbar-feedback-title' => 'Табла за мислења', |
1794 | | - 'moodbar-feedback-response-title' => 'Одѕив на таблата за мислења', |
| 1876 | + 'moodbar-feedback-response-title' => '==Одговор на Вашето [[$1|искажано мислење]]==', |
1795 | 1877 | 'moodbar-feedback-view-link' => '(Погл. мислењето)', |
1796 | 1878 | 'moodbar-feedback-filters' => 'Филтри', |
1797 | 1879 | 'moodbar-feedback-filters-type' => 'Расположение:', |
— | — | @@ -1824,6 +1906,7 @@ |
1825 | 1907 | 'moodbar-restore-header' => 'Врати ја видливоста на мислењето', |
1826 | 1908 | 'moodbar-invalid-item' => 'Системот не можеше да го најде бараното мислење', |
1827 | 1909 | 'moodbar-feedback-action-error' => 'Настана грешка при обидот да се изврши дејството.', |
| 1910 | + 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|одговори]] на овој коментар пред $4', |
1828 | 1911 | 'moodbar-type-happy' => 'Среќен', |
1829 | 1912 | 'moodbar-type-sad' => 'Тажен', |
1830 | 1913 | 'moodbar-type-confused' => 'Збунет', |
— | — | @@ -1834,12 +1917,14 @@ |
1835 | 1918 | 'moodbar-log-header' => 'Ова е дневник на дејства што се однесуваат на мислењата искажани на [[Special:FeedbackDashboard|таблата за мислења и коментари]].', |
1836 | 1919 | 'moodbar-log-hide' => 'скриено [[$1]]', |
1837 | 1920 | '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 />Обидете се подоцна.', |
1844 | 1929 | ); |
1845 | 1930 | |
1846 | 1931 | /** Malayalam (മലയാളം) |
— | — | @@ -1857,10 +1942,13 @@ |
1858 | 1943 | 'moodbar-type-confused-title' => 'ആശയക്കുഴപ്പമായി', |
1859 | 1944 | 'tooltip-moodbar-what' => 'ഈ വിശേഷഗുണത്തെക്കുറിച്ച് കൂടുതൽ അറിയുക', |
1860 | 1945 | 'moodbar-what-label' => 'എന്താണിത്?', |
| 1946 | + 'moodbar-respond-text' => 'ഇതിനോട് പ്രതികരിക്കുക', |
| 1947 | + 'moodbar-response-add' => 'പ്രതികരണം ചേർക്കുക', |
| 1948 | + 'moodbar-response-btn' => 'പ്രതികരണം അയയ്ക്കുക', |
1861 | 1949 | 'moodbar-what-content' => 'വിജ്ഞാനകോശം തിരുത്തുന്നവരുടെ അനുഭവങ്ങൾ വിക്കിപീഡിയ സമൂഹത്തിനു മനസ്സിലാക്കാനായാണ് ഈ സൗകര്യം രൂപകല്പന ചെയ്തിരിക്കുന്നത്. |
1862 | 1950 | കൂടുതൽ വിവരങ്ങൾക്ക് ദയവായി $1 സന്ദർശിക്കുക.', |
1863 | 1951 | 'moodbar-what-link' => 'സവിശേഷതാ താൾ', |
1864 | | - 'moodbar-privacy' => 'സമർപ്പിക്കുമ്പോൾ, $1 പ്രകാരമുള്ള സുതാര്യത താങ്കൾ അംഗീകരിക്കുന്നതായി കരുതപ്പെടുന്നതാണ്.', |
| 1952 | + 'moodbar-privacy' => 'സമർപ്പിക്കുമ്പോൾ, $1 പ്രകാരമുള്ള സുതാര്യത താങ്കൾ അംഗീകരിക്കുന്നതാണ്.', |
1865 | 1953 | 'moodbar-privacy-link' => 'നിബന്ധനകൾ', |
1866 | 1954 | 'moodbar-disable-link' => 'എനിക്കു താത്പര്യമില്ല. ദയവായി ഈ സൗകര്യം വേണ്ട.', |
1867 | 1955 | 'moodbar-form-title' => 'കാരണം...', |
— | — | @@ -1891,6 +1979,7 @@ |
1892 | 1980 | 'moodbar-feedback-filters-type' => 'തരം:', |
1893 | 1981 | 'moodbar-feedback-filters-username' => 'ഉപയോക്തൃനാമം', |
1894 | 1982 | 'moodbar-feedback-filters-button' => 'അരിപ്പകൾ സജ്ജീകരിക്കുക', |
| 1983 | + 'moodbar-feedback-whatis' => 'ഈ സവിശേഷത എന്താണ്?', |
1895 | 1984 | 'moodbar-feedback-permalink' => 'ഇങ്ങോട്ടുള്ള കണ്ണികൾ', |
1896 | 1985 | 'moodbar-feedback-more' => 'കൂടുതൽ', |
1897 | 1986 | 'moodbar-feedback-nomore' => 'പ്രദർശിപ്പിക്കാൻ കൂടുതൽ ഫലങ്ങളിലില്ല.', |
— | — | @@ -1898,6 +1987,8 @@ |
1899 | 1988 | 'moodbar-feedback-older' => 'പഴയവ', |
1900 | 1989 | 'moodbar-feedback-ajaxerror' => 'കൂടുതൽ ഫലങ്ങൾ ശേഖരിക്കുന്നതിനിടെ പിഴവുണ്ടയി.', |
1901 | 1990 | 'moodbar-user-hidden' => '(ഉപയോക്താവ് മറയ്ക്കപ്പെട്ടിരിക്കുന്നു)', |
| 1991 | + 'moodbar-feedback-action-confirm' => 'സ്ഥിരീകരിക്കുക', |
| 1992 | + 'moodbar-feedback-action-cancel' => 'റദ്ദാക്കുക', |
1902 | 1993 | 'moodbar-action-reason' => 'കാരണം:', |
1903 | 1994 | 'moodbar-action-reason-required' => 'ദയവായി ഒരു കാരണം നൽകുക.', |
1904 | 1995 | 'moodbar-type-happy' => 'സന്തോഷം', |
— | — | @@ -1910,6 +2001,7 @@ |
1911 | 2002 | |
1912 | 2003 | /** Malay (Bahasa Melayu) |
1913 | 2004 | * @author Anakmalaysia |
| 2005 | + * @author McDutchie |
1914 | 2006 | */ |
1915 | 2007 | $messages['ms'] = array( |
1916 | 2008 | 'moodbar-desc' => 'Membolehkan pengguna tertentu menghantar maklum balas mereka kepada pengendali tapak', |
— | — | @@ -1927,7 +2019,7 @@ |
1928 | 2020 | 'moodbar-what-label' => 'Apakah ini?', |
1929 | 2021 | 'moodbar-respond-text' => 'Balas', |
1930 | 2022 | 'moodbar-response-add' => 'Tulis balasan', |
1931 | | - 'moodbar-response-nosig' => 'tandatangan tidak diperlukan', |
| 2023 | + 'moodbar-response-desc' => 'Balasan akan merujuk komen asal. Tandatangan tidak diperlukan.', |
1932 | 2024 | 'moodbar-response-btn' => 'Hantar balasan', |
1933 | 2025 | 'moodbar-what-content' => 'Ciri ini direka untuk membantu komuniti memahami pengalaman sesiapa yang menyunting ensiklopedia ini. |
1934 | 2026 | Untuk maklumat lanjut, sila layari $1.', |
— | — | @@ -1967,7 +2059,7 @@ |
1968 | 2060 | 'moodbar-header-namespace' => 'Ruang nama', |
1969 | 2061 | 'moodbar-header-own-talk' => 'Laman perbincangan sendiri', |
1970 | 2062 | '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==', |
1972 | 2064 | 'moodbar-feedback-view-link' => '(Baca maklum balas)', |
1973 | 2065 | 'moodbar-feedback-filters' => 'Penapis', |
1974 | 2066 | 'moodbar-feedback-filters-type' => 'Angin:', |
— | — | @@ -2001,6 +2093,7 @@ |
2002 | 2094 | 'moodbar-restore-header' => 'Perlihatkan semula butiran ini', |
2003 | 2095 | 'moodbar-invalid-item' => 'Sistem tidak dapat mencari butiran maklum balas yang betul.', |
2004 | 2096 | 'moodbar-feedback-action-error' => 'Ralat berlaku ketika cuba melakukan tindakan ini.', |
| 2097 | + 'moodbar-feedback-response-summary' => '[[$1|$2]] [[$3|membalas]] komen ini $4 lalu', |
2005 | 2098 | 'moodbar-type-happy' => 'Gembira', |
2006 | 2099 | 'moodbar-type-sad' => 'Sedih', |
2007 | 2100 | 'moodbar-type-confused' => 'Keliru', |
— | — | @@ -2011,15 +2104,18 @@ |
2012 | 2105 | 'moodbar-log-header' => 'Inilah log tindakan kepada butiran maklum balas yang tersenarai dalam [[Special:FeedbackDashboard|papan pemuka maklum balas]].', |
2013 | 2106 | 'moodbar-log-hide' => 'menyorokkan [[$1]]', |
2014 | 2107 | '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.', |
2021 | 2116 | ); |
2022 | 2117 | |
2023 | 2118 | /** Dutch (Nederlands) |
| 2119 | + * @author McDutchie |
2024 | 2120 | * @author SPQRobin |
2025 | 2121 | * @author Saruman |
2026 | 2122 | * @author Siebrand |
— | — | @@ -2042,7 +2138,7 @@ |
2043 | 2139 | 'moodbar-respond-expanded' => '▼', |
2044 | 2140 | 'moodbar-respond-text' => 'Hierop reageren', |
2045 | 2141 | '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.', |
2047 | 2143 | 'moodbar-response-btn' => 'Antwoord verzenden', |
2048 | 2144 | 'moodbar-what-content' => 'Deze functie is ontworpen om de ervaring van mensen die de site bewerken te helpen begrijpen. |
2049 | 2145 | Ga naar de $1 voor mee informatie.', |
— | — | @@ -2082,7 +2178,7 @@ |
2083 | 2179 | 'moodbar-header-namespace' => 'Naamruimte', |
2084 | 2180 | 'moodbar-header-own-talk' => 'Eigen overlegpagina', |
2085 | 2181 | 'moodbar-feedback-title' => 'Dashboard voor terugkoppeling', |
2086 | | - 'moodbar-feedback-response-title' => 'Dashboardreactie', |
| 2182 | + 'moodbar-feedback-response-title' => '== Antwoord op uw [[$1|terugkoppeling]] ==', |
2087 | 2183 | 'moodbar-feedback-view-link' => '(terugkoppeling bekijken)', |
2088 | 2184 | 'moodbar-feedback-filters' => 'Filters', |
2089 | 2185 | 'moodbar-feedback-filters-type' => 'Stemming:', |
— | — | @@ -2116,6 +2212,7 @@ |
2117 | 2213 | 'moodbar-restore-header' => 'De zichtbaarheid van dit item herstellen', |
2118 | 2214 | 'moodbar-invalid-item' => 'Het systeem kon het juiste terugkoppelingsitem niet vinden.', |
2119 | 2215 | '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', |
2120 | 2217 | 'moodbar-type-happy' => '{{GENDER:$1|Blij}}', |
2121 | 2218 | 'moodbar-type-sad' => '{{GENDER:$1|Somber}}', |
2122 | 2219 | 'moodbar-type-confused' => '{{GENDER:$1|Verward}}', |
— | — | @@ -2126,8 +2223,14 @@ |
2127 | 2224 | 'moodbar-log-header' => 'Dit is een logboek met uitgevoerde handelingen op items uit het [[Special:FeedbackDashboard|terugkoppelingsdashboard]].', |
2128 | 2225 | 'moodbar-log-hide' => 'heeft [[$1]] verborgen', |
2129 | 2226 | '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.', |
2132 | 2235 | ); |
2133 | 2236 | |
2134 | 2237 | /** Norwegian (bokmål) (Norsk (bokmål)) |
— | — | @@ -2774,6 +2877,7 @@ |
2775 | 2878 | |
2776 | 2879 | /** Slovenian (Slovenščina) |
2777 | 2880 | * @author Dbc334 |
| 2881 | + * @author McDutchie |
2778 | 2882 | */ |
2779 | 2883 | $messages['sl'] = array( |
2780 | 2884 | 'moodbar-desc' => 'Omogoča določenim uporabnikom pošiljanje povratne informacije o svoji urejevalski izkušnji', |
— | — | @@ -2789,6 +2893,10 @@ |
2790 | 2894 | 'moodbar-type-confused-title' => 'Zmeden', |
2791 | 2895 | 'tooltip-moodbar-what' => 'Več informacij o tej funkciji', |
2792 | 2896 | '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', |
2793 | 2901 | 'moodbar-what-content' => 'Funkcija je oblikovana kot pomoč skupnosti pri razumevanju izkušnje ljudi, ki urejajo stran. |
2794 | 2902 | Za več informacij obiščite $1.', |
2795 | 2903 | 'moodbar-what-link' => 'stran z opisom', |
— | — | @@ -2827,7 +2935,7 @@ |
2828 | 2936 | 'moodbar-header-namespace' => 'Imenski prostor', |
2829 | 2937 | 'moodbar-header-own-talk' => 'Lastna pogovorna stran', |
2830 | 2938 | '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]] ==', |
2832 | 2940 | 'moodbar-feedback-view-link' => '(Ogled povratne informacije)', |
2833 | 2941 | 'moodbar-feedback-filters' => 'Filtri', |
2834 | 2942 | 'moodbar-feedback-filters-type' => 'Razpoloženje:', |
— | — | @@ -2849,6 +2957,8 @@ |
2850 | 2958 | 'moodbar-comment-hidden' => '(Povratno informacijo je skril ukrep administratorja)', |
2851 | 2959 | 'moodbar-feedback-show' => 'prikaži skrito povratno informacijo', |
2852 | 2960 | 'moodbar-feedback-hide' => 'skrij povratno informacijo', |
| 2961 | + 'moodbar-feedback-action-confirm' => 'Potrdi', |
| 2962 | + 'moodbar-feedback-action-cancel' => 'Prekliči', |
2853 | 2963 | 'moodbar-hidden-footer' => 'Skrita povratna informacija $1 dne $2 $3, razlog: $4 $5', |
2854 | 2964 | 'moodbar-hidden-footer-without-log' => 'Skrita povratna informacija $1', |
2855 | 2965 | 'moodbar-feedback-restore' => 'obnovi skrito povratno informacijo', |
— | — | @@ -2859,6 +2969,7 @@ |
2860 | 2970 | 'moodbar-restore-header' => 'Obnovi vidljivost tega predmeta', |
2861 | 2971 | 'moodbar-invalid-item' => 'Sistem ni mogel najti ustreznega predmeta povratne informacije.', |
2862 | 2972 | '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', |
2863 | 2974 | 'moodbar-type-happy' => 'Veselega', |
2864 | 2975 | 'moodbar-type-sad' => 'Žalostnega', |
2865 | 2976 | 'moodbar-type-confused' => 'Zmedenega', |
— | — | @@ -2869,6 +2980,14 @@ |
2870 | 2981 | 'moodbar-log-header' => 'To je dnevnik dejanj, izvedenih na predmetih povratnih informacij, navedenih na [[Special:FeedbackDashboard|pregledni plošči povratnih informacij]].', |
2871 | 2982 | 'moodbar-log-hide' => 'je skril(-a) [[$1]]', |
2872 | 2983 | '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.', |
2873 | 2992 | ); |
2874 | 2993 | |
2875 | 2994 | /** Serbian (Cyrillic script) (Српски (ћирилица)) |
— | — | @@ -3064,6 +3183,9 @@ |
3065 | 3184 | 'moodbar-type-confused-title' => 'Bối rối', |
3066 | 3185 | 'tooltip-moodbar-what' => 'Tìm hiểu thêm về tính năng này', |
3067 | 3186 | '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', |
3068 | 3190 | '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. |
3069 | 3191 | Để biết thêm chi tiết, xin ghé vào $1.', |
3070 | 3192 | 'moodbar-what-link' => 'trang tính năng', |
— | — | @@ -3102,6 +3224,8 @@ |
3103 | 3225 | 'moodbar-header-namespace' => 'Không gian tên', |
3104 | 3226 | 'moodbar-header-own-talk' => 'Trang thảo luận của chính mình', |
3105 | 3227 | '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)', |
3106 | 3230 | 'moodbar-feedback-filters' => 'Bộ lọc', |
3107 | 3231 | 'moodbar-feedback-filters-type' => 'Tâm trạng:', |
3108 | 3232 | 'moodbar-feedback-filters-type-happy' => 'Hài lòng', |
— | — | @@ -3117,10 +3241,13 @@ |
3118 | 3242 | 'moodbar-feedback-newer' => 'Mới hơn', |
3119 | 3243 | 'moodbar-feedback-older' => 'Cũ hơn', |
3120 | 3244 | '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ơ.', |
3121 | 3246 | 'moodbar-user-hidden' => '(Người dùng được ẩn)', |
3122 | 3247 | 'moodbar-comment-hidden' => '(Phản hồi được bảo quản viên ẩn)', |
3123 | 3248 | 'moodbar-feedback-show' => 'hiện phản hồi đã ẩn', |
3124 | 3249 | '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ỏ', |
3125 | 3252 | 'moodbar-hidden-footer' => 'Phản hồi ẩn của $1 vào $2 lúc $3 với lý do: $4 $5', |
3126 | 3253 | 'moodbar-hidden-footer-without-log' => 'Phản hồi ẩn $1', |
3127 | 3254 | '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 @@ |
67 | 67 | $user = $data->getProperty('user'); |
68 | 68 | if ( $data->getProperty('anonymize') ) { |
69 | 69 | $outData = 'anonymized'; |
70 | | - } else if ( $user->isAnon() ) { |
| 70 | + } elseif ( $user->isAnon() ) { |
71 | 71 | $outData = 'ip'; |
72 | 72 | } else { |
73 | 73 | $outData = 'user'; |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/ApiFeedbackDashboardResponse.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | class ApiFeedbackDashboardResponse extends ApiBase { |
5 | 5 | |
6 | 6 | public function execute() { |
7 | | - global $wgRequest, $wgUser, $wgContLang; |
| 7 | + global $wgRequest, $wgUser, $wgContLang, $wgParser; |
8 | 8 | |
9 | 9 | if ( $wgUser->isAnon() ) { |
10 | 10 | $this->dieUsage( "You don't have permission to do that", 'permission-denied' ); |
— | — | @@ -28,16 +28,17 @@ |
29 | 29 | |
30 | 30 | if ( $commenter !== null && $commenter->isAnon() == false ) { |
31 | 31 | $talkPage = $commenter->getTalkPage(); |
| 32 | + |
| 33 | + $feedback_link = wfMessage('moodbar-feedback-response-title')->params($wgContLang->getNsText( NS_SPECIAL ) . |
| 34 | + ':FeedbackDashboard/' . $item->getProperty('feedback'))->escaped(); |
32 | 35 | |
33 | 36 | $api = new ApiMain( new FauxRequest( array( |
34 | 37 | 'action' => 'edit', |
35 | 38 | 'title' => $talkPage->getFullText(), |
36 | 39 | '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~~~~", |
42 | 43 | 'token' => $params['token'], |
43 | 44 | 'summary' => '', |
44 | 45 | 'notminor' => true, |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.hooks.php |
— | — | @@ -105,6 +105,10 @@ |
106 | 106 | $updater->addExtensionUpdate( array( 'addTable', 'moodbar_feedback_response', |
107 | 107 | dirname(__FILE__).'/sql/moodbar_feedback_response.sql', true ) ); |
108 | 108 | |
| 109 | + $updater->addExtensionUpdate( array( 'addIndex', 'moodbar_feedback_response', |
| 110 | + 'mbfr_timestamp_id', dirname( __FILE__ ) . '/sql/mbfr_timestamp_id_index.sql', true ) |
| 111 | + ); |
| 112 | + |
109 | 113 | return true; |
110 | 114 | } |
111 | 115 | |
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 @@ |
46 | 46 | $res = $this->select( __METHOD__ ); |
47 | 47 | $result = $this->getResult(); |
48 | 48 | $count = 0; |
| 49 | + |
| 50 | + $response = SpecialFeedbackDashboard::getResponseSummary( $res ); |
| 51 | + |
49 | 52 | foreach ( $res as $row ) { |
50 | 53 | if ( ++$count > $params['limit'] ) { |
51 | 54 | // We've reached the one extra which shows that there are additional rows. Stop here |
— | — | @@ -52,7 +55,7 @@ |
53 | 56 | break; |
54 | 57 | } |
55 | 58 | |
56 | | - $vals = $this->extractRowInfo( $row, $prop ); |
| 59 | + $vals = $this->extractRowInfo( $row, $prop, $response ); |
57 | 60 | $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $vals ); |
58 | 61 | if ( !$fit ) { |
59 | 62 | $this->setContinueEnumParameter( 'continue', $this->getContinue( $row ) ); |
— | — | @@ -85,7 +88,7 @@ |
86 | 89 | ); |
87 | 90 | } |
88 | 91 | |
89 | | - protected function extractRowInfo( $row, $prop ) { |
| 92 | + protected function extractRowInfo( $row, $prop, $response = array() ) { |
90 | 93 | global $wgUser; |
91 | 94 | |
92 | 95 | $r = array(); |
— | — | @@ -114,7 +117,7 @@ |
115 | 118 | $params[] = 'show-anyway'; |
116 | 119 | } |
117 | 120 | |
118 | | - $r['formatted'] = SpecialFeedbackDashboard::formatListItem( $row, $params ); |
| 121 | + $r['formatted'] = SpecialFeedbackDashboard::formatListItem( $row, $params, $response ); |
119 | 122 | } |
120 | 123 | |
121 | 124 | if ( $isHidden && !$showHidden ) { |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js |
— | — | @@ -19,25 +19,25 @@ |
20 | 20 | */ |
21 | 21 | 'submit': function( fbProps ) { |
22 | 22 | var clientData = $.client.profile(), |
23 | | - fbProps = $.extend( { |
| 23 | + fb = $.extend( { |
24 | 24 | 'page': mw.config.get( 'wgPageName' ), |
25 | 25 | 'editmode': mw.config.get( 'wgAction' ) == 'edit' ? 1 : 0 |
26 | 26 | }, fbProps ), |
27 | 27 | apiRequest = { |
28 | 28 | '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, |
32 | 32 | 'useragent': clientData.name + '/' + clientData.versionNumber, |
33 | 33 | 'system': clientData.platform, |
34 | | - 'bucket': fbProps.bucket, |
35 | | - 'type': fbProps.type, |
| 34 | + 'bucket': fb.bucket, |
| 35 | + 'type': fb.type, |
36 | 36 | 'token': mw.config.get('mbEditToken'), |
37 | 37 | 'format': 'json' |
38 | 38 | }; |
39 | 39 | |
40 | 40 | // API treats any value as true. |
41 | | - if ( fbProps.editmode ) { |
| 41 | + if ( fb.editmode ) { |
42 | 42 | apiRequest.editmode = true; |
43 | 43 | } |
44 | 44 | |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | type: 'post', |
47 | 47 | url: mw.util.wikiScript( 'api' ), |
48 | 48 | data: apiRequest, |
49 | | - success: fbProps.callback, |
| 49 | + success: fb.callback, |
50 | 50 | dataType: 'json' |
51 | 51 | } ); |
52 | 52 | } |
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,'&').replace(/ {2}/g, ' ').replace(/<|>/g, '>').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+' ' !== 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+' '); |
| 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 @@ |
139 | 139 | position: static; |
140 | 140 | } |
141 | 141 | |
| 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 | + |
142 | 147 | /* The images here are named -ltr instead of -left and -rtl instead of -right |
143 | 148 | * because ResourceLoader flips -ltr and -rtl in URLs, but not -left and -right |
144 | 149 | */ |
— | — | @@ -179,7 +184,6 @@ |
180 | 185 | position: relative; |
181 | 186 | margin-top:0.5em; |
182 | 187 | margin-bottom:0.5em; |
183 | | - |
184 | 188 | padding:0; |
185 | 189 | } |
186 | 190 | |
— | — | @@ -211,6 +215,48 @@ |
212 | 216 | background-image: url(images/emoticon-sad.png); |
213 | 217 | } |
214 | 218 | |
| 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 | + |
215 | 261 | .fbd-item-userName { |
216 | 262 | font-size: 1.2em; |
217 | 263 | margin: 0; |
— | — | @@ -233,6 +279,22 @@ |
234 | 280 | min-height:40px; |
235 | 281 | } |
236 | 282 | |
| 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 | + |
237 | 299 | .fbd-item-permalink, |
238 | 300 | .fbd-item-show, |
239 | 301 | .fbd-item-hide, |
— | — | @@ -263,14 +325,14 @@ |
264 | 326 | .fbd-response-form b { |
265 | 327 | font-size:1em; |
266 | 328 | } |
267 | | -.fbd-response-form small{ |
| 329 | +.fbd-response-form small, .fbd-response-form .small{ |
268 | 330 | font-size:0.8em; |
269 | 331 | color:#262626; |
270 | 332 | } |
271 | 333 | .fbd-response-formNote { |
272 | 334 | float:right; |
273 | 335 | } |
274 | | -.fbd-response-submit { |
| 336 | +.fbd-response-submit, .fbd-response-preview { |
275 | 337 | float:right; |
276 | 338 | } |
277 | 339 | .center { |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js |
— | — | @@ -256,10 +256,10 @@ |
257 | 257 | function confirmAction(params, $item){ |
258 | 258 | |
259 | 259 | 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' )) ) |
261 | 261 | .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')) ) |
264 | 264 | .append( $('<span>').attr('class', 'fbd-item-reason-msg') ) |
265 | 265 | .append( $('<div>').attr('class', 'fbd-item-reason-msg') ); |
266 | 266 | |
— | — | @@ -382,56 +382,53 @@ |
383 | 383 | } else { |
384 | 384 | |
385 | 385 | //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' ), |
389 | 389 | 'target': '_new' |
390 | | - }, mw.msg( 'moodbar-response-terms-of-use' ) ); |
| 390 | + }, mw.msg( 'moodbar-response-link' ) ); |
391 | 391 | |
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 | | - |
406 | 392 | //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 ); |
412 | 395 | |
413 | 396 | //build form |
414 | 397 | var inlineForm = $('<div>').attr( 'class', 'fbd-response-form' ) |
415 | 398 | .append( |
416 | | - $('<b>').html( mw.msg( 'moodbar-response-add' ) ) |
| 399 | + $('<b>').text( mw.msg( 'moodbar-response-add' ) ) |
417 | 400 | ).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' ) + ') ' ) |
419 | 402 | ).append( |
420 | 403 | $('<div>').attr( 'class', 'fbd-response-formNote' ) |
421 | 404 | .append($('<small>') |
422 | 405 | .append( |
423 | 406 | $('<span>').attr( 'class', 'fbd-response-charCount' ) |
424 | 407 | ).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, "" ) ) |
426 | 409 | ) |
427 | 410 | ) |
428 | 411 | ).append( |
429 | 412 | $('<textarea>').attr( { 'class':'fbd-response-text', 'name':'fbd-response-text' } ) |
430 | 413 | ).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(' ') |
| 418 | + ).hide() |
432 | 419 | ).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()) |
435 | 425 | ).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( |
436 | 433 | $('<div>').attr( 'style', 'clear:both' ) |
437 | 434 | ); |
438 | 435 | |
— | — | @@ -453,83 +450,81 @@ |
454 | 451 | .keyup( function(event) { |
455 | 452 | validateResponse($item); |
456 | 453 | }) |
| 454 | + .elastic() |
457 | 455 | .end() |
458 | | - .find('.fbd-response-submit') |
| 456 | + .find('.fbd-response-preview') |
459 | 457 | .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"> </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 | + }); |
502 | 466 | } |
503 | 467 | e.preventDefault(); |
504 | | - |
505 | 468 | } |
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 | + |
507 | 501 | /** |
508 | | - * Toggle submit button from enabled to disabled |
| 502 | + * Toggle submit / preview button from enabled to disabled |
509 | 503 | * Depends on value of .fbd-response-text |
510 | 504 | * @param $item jQuery item containing the .fbd-item |
| 505 | + * Require at least 1 character and limit to 5000 |
511 | 506 | */ |
512 | 507 | 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'); |
515 | 511 | } else { |
516 | | - $item.find( '.fbd-response-submit').attr({'disabled':'true'}); |
| 512 | + $item.find( '.fbd-response-submit, .fbd-response-preview').attr({'disabled':'true'}); |
517 | 513 | } |
518 | 514 | } |
519 | 515 | |
520 | 516 | /** |
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 |
523 | 519 | * @param msg text to display |
524 | 520 | * @callback to execute after fadeOut |
525 | 521 | */ |
526 | 522 | function inlineMessage( $el, msg, callback) { |
527 | 523 | $el.empty() |
528 | | - .html( msg ) |
| 524 | + .text( msg ) |
529 | 525 | .delay(2000) |
530 | 526 | .fadeOut('slow', callback); |
531 | 527 | } |
532 | 528 | |
533 | | - |
534 | 529 | // On-load stuff |
535 | 530 | |
536 | 531 | $('.fbd-item-show a').live( 'click', showHiddenItem ); |
— | — | @@ -540,6 +535,80 @@ |
541 | 536 | |
542 | 537 | $('.fbd-respond-link').live ('click', showResponseForm ); |
543 | 538 | |
| 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(' ') ) |
| 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 | + |
544 | 613 | $( '#fbd-filters' ).children( 'form' ).submit( function( e ) { |
545 | 614 | e.preventDefault(); |
546 | 615 | 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 |
547 | 616 | + 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 |
548 | 617 | + application/octet-stream |
Index: branches/wmf/1.18wmf1/extensions/MoodBar/MoodBar.php |
— | — | @@ -148,7 +148,8 @@ |
149 | 149 | 'scripts' => 'ext.moodBar.dashboard/ext.moodBar.dashboard.js', |
150 | 150 | 'dependencies' => array( |
151 | 151 | 'mediawiki.util', |
152 | | - 'jquery.NobleCount' |
| 152 | + 'jquery.NobleCount', |
| 153 | + 'jquery.elastic' |
153 | 154 | ), |
154 | 155 | 'messages' => array( |
155 | 156 | 'moodbar-feedback-nomore', |
— | — | @@ -163,17 +164,22 @@ |
164 | 165 | 'moodbar-respond-collapsed', |
165 | 166 | 'moodbar-respond-expanded', |
166 | 167 | 'moodbar-response-add', |
167 | | - 'moodbar-response-nosig', |
| 168 | + 'moodbar-response-desc', |
168 | 169 | 'moodbar-response-btn', |
169 | 170 | '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', |
177 | 174 | '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', |
178 | 184 | ), |
179 | 185 | ); |
180 | 186 | |
— | — | @@ -188,6 +194,10 @@ |
189 | 195 | ), |
190 | 196 | ); |
191 | 197 | |
| 198 | +$wgResourceModules['jquery.elastic'] = $mbResourceTemplate + array( |
| 199 | + 'scripts' => 'jquery.elastic/jquery.elastic.js' |
| 200 | +); |
| 201 | + |
192 | 202 | /** Configuration **/ |
193 | 203 | /** The registration time after which users will be shown the MoodBar **/ |
194 | 204 | $wgMoodBarCutoffTime = null; |