r106743 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106742‎ | r106743 | r106744 >
Date:00:55, 20 December 2011
Author:rmoen
Status:resolved (Comments)
Tags:
Comment:
adding some initial language support and documentation
Modified paths:
  • /trunk/extensions/MarkAsHelpful/MarkAsHelpful.i18n.php (modified) (history)
  • /trunk/extensions/MarkAsHelpful/modules/ext.markAsHelpful/ext.markAsHelpful.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MarkAsHelpful/MarkAsHelpful.i18n.php
@@ -13,4 +13,20 @@
1414 */
1515 $messages['en'] = array(
1616 'mark-as-helpful-desc' => 'Hooks in to specified objects and provides a user interface to mark them as helpful',
 17+ 'mah-mark-text' => 'Mark this as helpful',
 18+ 'mah-you-marked-text' => 'You think this is helpful',
 19+ 'mah-someone-marked-text' => '$1 thinks this is helpful',
 20+ 'mah-undo-mark-text' => 'undo',
 21+
 22+);
 23+
 24+/** Message documentation (Message documentation)
 25+ * @author Rob Moen
 26+ */
 27+$messages['qqq'] = array(
 28+ 'mark-as-helpful-desc' => 'This is a feature in development. See [[mw:MarkAsHelpful]] for background information.',
 29+ 'mah-mark-text' => 'Text to prompt the user to mark this item as helpful',
 30+ 'mah-you-marked-text' => 'Text displayed to the logged in user if they mark an item helpful',
 31+ 'mah-someone-marked-text' => 'Text displayed as to who marked this is helpful, shown if not the user who marked {$1 is the username}',
 32+ 'mah-undo-mark-text' => 'Text for the the undo mark link',
1733 );
\ No newline at end of file
Index: trunk/extensions/MarkAsHelpful/modules/ext.markAsHelpful/ext.markAsHelpful.js
@@ -8,7 +8,7 @@
99
1010 var mah = mw.mah = {
1111
12 - selector: '[class^=markashelpful-]',
 12+ selector: '[class^=markashelpful-]', //only selector for now
1313
1414 init: function() {
1515 var $mahWrap = $( '<div />' ).attr( 'class', 'mw-mah-wrapper' );
@@ -26,7 +26,7 @@
2727 var tag = $item.attr( 'class' ),
2828 properties = {
2929 'item': tag.split('-')[2], // item id
30 - 'type': tag.split('-')[1] // item type (eg, moodbarfeedbackresponse)
 30+ 'type': tag.split('-')[1] // item type (eg, mbresponse)
3131 };
3232 return properties;
3333 },

Follow-up revisions

RevisionCommit summaryAuthorDate
r107081added gender support for x thinks this helpful. follow up r106743rmoen18:10, 22 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   10:38, 20 December 2011
+       'mah-someone-marked-text' => '$1 thinks this is helpful',

That's going to be pain for translators. It's going to need at least gender support.

#Comment by Platonides (talk | contribs)   23:27, 28 December 2011

If this extension deals just with comments, why not say "this comment is helpful"?

(it would also clarify context for translations, although that could be done at qqq, too)

Status & tagging log