r102894 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102893‎ | r102894 | r102895 >
Date:13:19, 13 November 2011
Author:robin
Status:ok
Tags:
Comment:
(part of bug 30071) Pass username as parameter for use with GENDER
Modified paths:
  • /trunk/extensions/MoodBar/Formatter.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -104,9 +104,9 @@
105105 'moodbar-invalid-item' => 'The system was unable to find the correct feedback item.',
106106 'moodbar-feedback-action-error' => 'An error occurred when trying to perform this action.',
107107 // Mood types
108 - 'moodbar-type-happy' => 'Happy',
109 - 'moodbar-type-sad' => 'Sad',
110 - 'moodbar-type-confused' => 'Confused',
 108+ 'moodbar-type-happy' => '{{GENDER:$1|Happy}}',
 109+ 'moodbar-type-sad' => '{{GENDER:$1|Sad}}',
 110+ 'moodbar-type-confused' => '{{GENDER:$1|Confused}}',
111111 // User types
112112 'moodbar-user-anonymized' => 'Anonymized',
113113 'moodbar-user-ip' => 'IP address',
@@ -196,9 +196,9 @@
197197 'moodbar-header-user' => '{{Identical|User}}',
198198 'moodbar-header-comment' => '{{Identical|Comment}}',
199199 'moodbar-header-namespace' => '{{Identical|Namespace}}',
200 - 'moodbar-type-happy' => 'No gender support ([[bugzilla:30071|bug 30071]])',
201 - 'moodbar-type-sad' => 'No gender support ([[bugzilla:30071|bug 30071]])',
202 - 'moodbar-type-confused' => 'No gender support ([[bugzilla:30071|bug 30071]])',
 200+ 'moodbar-type-happy' => '$1 is the username that can be used for GENDER',
 201+ 'moodbar-type-sad' => '$1 is the username that can be used for GENDER',
 202+ 'moodbar-type-confused' => '$1 is the username that can be used for GENDER',
203203 'moodbar-user-ip' => '{{Identical|IP Address}}',
204204 );
205205
Index: trunk/extensions/MoodBar/Formatter.php
@@ -27,7 +27,7 @@
2828 break;
2929 case 'type':
3030 $internal = self::getInternalRepresentation( $data, $field );
31 - $outData = wfMessage("moodbar-type-$internal")->parse();
 31+ $outData = wfMessage("moodbar-type-$internal")->params( $data->getProperty('user') )->parse();
3232 break;
3333 case 'usertype':
3434 $internal = self::getInternalRepresentation( $data, $field );

Follow-up revisions

RevisionCommit summaryAuthorDate
r102895Same as r102894, but for Special:FeedbackDashboardrobin13:31, 13 November 2011

Status & tagging log