r100198 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100197‎ | r100198 | r100199 >
Date:01:10, 19 October 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Tell the user which challenge they are currently enrolled on
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialMyContests.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -207,6 +207,7 @@
208208 'contest-submission-invalid-url' => 'This URL does not match one of the allowed formats.',
209209 'contest-submission-new-submission' => 'You still need to enter the URL to your submission. This needs to be done before the deadline.',
210210 'contest-submission-current-submission' => 'This is the URL to your submission, which you can modify untill the deadline.',
 211+ 'contest-submission-challenge' => 'You are currently on the $1 challenge',
211212
212213 // TODO: how can this be done properly in JS?
213214 'contest-submission-domains' => 'Submissions are restricted to these sites: $1',
Index: trunk/extensions/Contest/specials/SpecialMyContests.php
@@ -302,6 +302,10 @@
303303 $form->setSubmitCallback( array( $this, 'handleSubmission' ) );
304304 $form->setSubmitText( wfMsg( 'contest-submission-submit' ) );
305305
 306+ $challengeId = $contestant->getField( 'challenge_id' );
 307+ $challenge = ContestChallenge::getTitlesForIds( $challengeId );
 308+ $output->addWikiMsg( 'contest-submission-challenge', $challenge[$challengeId] );
 309+
306310 if( $form->show() ) {
307311 $query = is_null( $this->submissionState ) ? '' : $this->submissionState;
308312 $output->redirect( $this->getTitle( $contest->getField( 'name' ) )->getLocalURL( $query ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r1001991.18wmf1 r100198reedy01:11, 19 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:26, 19 October 2011

Docs? This is especially hard to translate message in some languages.

#Comment by Reedy (talk | contribs)   17:11, 19 October 2011

Mmm.

I'll add some in a bit. I think I've got another message to add, so will add/fix it there too

Status & tagging log