r108809 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108808‎ | r108809 | r108810 >
Date:13:55, 13 January 2012
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
follow up to r100274 - plural use in js messages
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/resources/contest.special.contest.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -179,11 +179,10 @@
180180 'contest-contest-reminder-send' => 'Send reminder',
181181 'contest-contest-reminder-cancel' => 'Cancel',
182182 'contest-contest-reminder-sending' => 'Sending...',
183 - // We really want // {{PLURAL:$1|contestant|contestants}} here, but the JS i18n shizzle does not support it yet :/
184 - 'contest-contest-reminder-success' => 'Successfully sent the reminder e-mail to $1 contestants',
 183+ 'contest-contest-reminder-success' => 'Successfully sent the reminder e-mail to $1 {{PLURAL:$1|contestant|contestants}}',
185184 'contest-contest-reminder-close' => 'Close',
186185 'contest-contest-reminder-retry' => 'Retry sending',
187 - 'contest-contest-reminder-failed' => 'Could not send the reminder e-mails.',
 186+ 'contest-contest-reminder-failed' => 'Could not send the reminder {{PLURAL:$1|e-mail|e-mails}}.',
188187 'contest-contest-reminder-subject' => 'Subject:',
189188
190189 // Contestant pager
Index: trunk/extensions/Contest/Contest.php
@@ -175,7 +175,7 @@
176176 'contest-contest-reminder-subject',
177177 ),
178178 'dependencies' => array(
179 - 'jquery.ui.button', 'jquery.ui.dialog',
 179+ 'jquery.ui.button', 'jquery.ui.dialog', 'mediawiki.jqueryMsg',
180180 )
181181 );
182182
Index: trunk/extensions/Contest/resources/contest.special.contest.js
@@ -46,7 +46,7 @@
4747
4848 _this.sendReminder( function( data ) {
4949 if ( data.success ) {
50 - $dialog.text( mw.msg( 'contest-contest-reminder-success', data.contestantcount ) );
 50+ $dialog.msg( 'contest-contest-reminder-success', data.contestantcount );
5151 $send.remove();
5252 $cancel.button( 'option', 'label', mw.msg( 'contest-contest-reminder-close' ) );
5353 }
@@ -54,7 +54,7 @@
5555 $send.button( 'option', 'label', mw.msg( 'contest-contest-reminder-retry' ) );
5656 $send.button( 'option', 'disabled', false );
5757
58 - alert( mw.msg( 'contest-contest-reminder-failed' ) );
 58+ alert( window.gM( 'contest-contest-reminder-failed', data.contestantcount ) );
5959 }
6060 } );
6161 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100274created basic reminder email functionalityjeroendedauw20:46, 19 October 2011

Comments

#Comment by Siebrand (talk | contribs)   17:40, 13 January 2012

Yay!

Status & tagging log