http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100147

Revision: 100147
Author:   reedy
Date:     2011-10-18 19:42:52 +0000 (Tue, 18 Oct 2011)
Log Message:
-----------
Make contest-mycontests-signup-success include the Contest name in the message

Modified Paths:
--------------
    trunk/extensions/Contest/Contest.i18n.php
    trunk/extensions/Contest/specials/SpecialContestPage.php
    trunk/extensions/Contest/specials/SpecialMyContests.php

Modified: trunk/extensions/Contest/Contest.i18n.php
===================================================================
--- trunk/extensions/Contest/Contest.i18n.php   2011-10-18 19:33:56 UTC (rev 
100146)
+++ trunk/extensions/Contest/Contest.i18n.php   2011-10-18 19:42:52 UTC (rev 
100147)
@@ -73,7 +73,7 @@
        'contest-special-newname' => 'Contest name',
        'contest-special-add' => 'Add contest',
        'contest-special-existing' => 'Existing contests',
-       
+
        'contest-special-name' => 'Name',
        'contest-special-status' => 'Status',
        'contest-special-submissioncount' => 'Submission count',
@@ -138,7 +138,7 @@
        'contest-signup-invalid-name' => 'The name you provided is too short.',
        'contest-signup-require-challenge' => 'You must select a challenge.',
        'contest-signup-invalid-cv' => 'You entered an invalid URL.',
-       
+
        // Special:Contest
        'contest-contest-title' => 'Contest: $1',
        'contest-contest-no-results' => 'There are no contestants to display.',
@@ -158,7 +158,7 @@
        'contest-contestant-commentcount' => 'Comments',
        'contest-contestant-overallrating' => 'Rating',
        'contest-contestant-rating' => '$1 ($2 {{PLURAL:$2|vote|votes}})',
-       
+
        // Special:Contestant
        'contest-contestant-title' => 'Contestant $1 ($2)',
        'contest-contestant-header-id' => 'Contestant ID',
@@ -193,7 +193,7 @@
        'contest-mycontests-finished-text' => 'These are the passed contests 
you have participated in.',
        'contest-mycontests-header-contest' => 'Contest',
        'contest-mycontests-header-challenge' => 'Challenge',
-       'contest-mycontests-signup-success' => 'You have successfully signed up 
for this contest.',
+       'contest-mycontests-signup-success' => 'You have successfully signed up 
for the $1 contest.',
        'contest-mycontests-addition-success' => 'You have successfully posted 
your submission! Thanks for participating in this contest.',
        'contest-mycontests-updated-success' => 'You have successfully modified 
your submission.',
        'contest-mycontests-sessionfail' => 'Your submission could not be saved 
due to loss of session data. Please try again.',
@@ -207,7 +207,7 @@
        'contest-submission-invalid-url' => 'This URL does not match one of the 
allowed formats.',
        'contest-submission-new-submission' => 'You still need to enter the URL 
to your submission. This needs to be done before the deadline.',
        'contest-submission-current-submission' => 'This is the URL to your 
submission, which you can modify untill the deadline.',
-       
+
        // TODO: how can this be done properly in JS?
        'contest-submission-domains' => 'Submissions are restricted to these 
sites: $1',
 );

Modified: trunk/extensions/Contest/specials/SpecialContestPage.php
===================================================================
--- trunk/extensions/Contest/specials/SpecialContestPage.php    2011-10-18 
19:33:56 UTC (rev 100146)
+++ trunk/extensions/Contest/specials/SpecialContestPage.php    2011-10-18 
19:42:52 UTC (rev 100147)
@@ -93,9 +93,9 @@
         *
         * @param string $message
         */
-       protected function showSuccess( $message ) {
+       protected function showSuccess( $message, $subst = '' ) {
                $this->getOutput()->addHTML(
-                       '<div class="successbox"><strong><p>' . wfMsgExt( 
$message, 'parseinline' ) . '</p></strong></div>'
+                       '<div class="successbox"><strong><p>' . wfMsgExt( 
$message, array( 'parseinline' ), $subst ) . '</p></strong></div>'
                );
        }
 

Modified: trunk/extensions/Contest/specials/SpecialMyContests.php
===================================================================
--- trunk/extensions/Contest/specials/SpecialMyContests.php     2011-10-18 
19:33:56 UTC (rev 100146)
+++ trunk/extensions/Contest/specials/SpecialMyContests.php     2011-10-18 
19:42:52 UTC (rev 100147)
@@ -276,7 +276,7 @@
         */
        protected function showSubmissionPage( ContestContestant $contestant ) {
                if ( $this->getRequest()->getCheck( 'new' ) ) {
-                       $this->showSuccess( 'contest-mycontests-signup-success' 
);
+                       $this->showSuccess( 
'contest-mycontests-signup-success', $contestant->getContest()->getField( 
'name' ) );
                }
                else if ( $this->getRequest()->getCheck( 'added' ) ) {
                        $this->showSuccess( 
'contest-mycontests-addition-success' );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to