r100147 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100146‎ | r100147 | r100148 >
Date:19:42, 18 October 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Make contest-mycontests-signup-success include the Contest name in the message
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestPage.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialMyContests.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -73,7 +73,7 @@
7474 'contest-special-newname' => 'Contest name',
7575 'contest-special-add' => 'Add contest',
7676 'contest-special-existing' => 'Existing contests',
77 -
 77+
7878 'contest-special-name' => 'Name',
7979 'contest-special-status' => 'Status',
8080 'contest-special-submissioncount' => 'Submission count',
@@ -138,7 +138,7 @@
139139 'contest-signup-invalid-name' => 'The name you provided is too short.',
140140 'contest-signup-require-challenge' => 'You must select a challenge.',
141141 'contest-signup-invalid-cv' => 'You entered an invalid URL.',
142 -
 142+
143143 // Special:Contest
144144 'contest-contest-title' => 'Contest: $1',
145145 'contest-contest-no-results' => 'There are no contestants to display.',
@@ -158,7 +158,7 @@
159159 'contest-contestant-commentcount' => 'Comments',
160160 'contest-contestant-overallrating' => 'Rating',
161161 'contest-contestant-rating' => '$1 ($2 {{PLURAL:$2|vote|votes}})',
162 -
 162+
163163 // Special:Contestant
164164 'contest-contestant-title' => 'Contestant $1 ($2)',
165165 'contest-contestant-header-id' => 'Contestant ID',
@@ -193,7 +193,7 @@
194194 'contest-mycontests-finished-text' => 'These are the passed contests you have participated in.',
195195 'contest-mycontests-header-contest' => 'Contest',
196196 'contest-mycontests-header-challenge' => 'Challenge',
197 - 'contest-mycontests-signup-success' => 'You have successfully signed up for this contest.',
 197+ 'contest-mycontests-signup-success' => 'You have successfully signed up for the $1 contest.',
198198 'contest-mycontests-addition-success' => 'You have successfully posted your submission! Thanks for participating in this contest.',
199199 'contest-mycontests-updated-success' => 'You have successfully modified your submission.',
200200 'contest-mycontests-sessionfail' => 'Your submission could not be saved due to loss of session data. Please try again.',
@@ -207,7 +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 -
 211+
212212 // TODO: how can this be done properly in JS?
213213 'contest-submission-domains' => 'Submissions are restricted to these sites: $1',
214214 );
Index: trunk/extensions/Contest/specials/SpecialMyContests.php
@@ -276,7 +276,7 @@
277277 */
278278 protected function showSubmissionPage( ContestContestant $contestant ) {
279279 if ( $this->getRequest()->getCheck( 'new' ) ) {
280 - $this->showSuccess( 'contest-mycontests-signup-success' );
 280+ $this->showSuccess( 'contest-mycontests-signup-success', $contestant->getContest()->getField( 'name' ) );
281281 }
282282 else if ( $this->getRequest()->getCheck( 'added' ) ) {
283283 $this->showSuccess( 'contest-mycontests-addition-success' );
Index: trunk/extensions/Contest/specials/SpecialContestPage.php
@@ -93,9 +93,9 @@
9494 *
9595 * @param string $message
9696 */
97 - protected function showSuccess( $message ) {
 97+ protected function showSuccess( $message, $subst = '' ) {
9898 $this->getOutput()->addHTML(
99 - '<div class="successbox"><strong><p>' . wfMsgExt( $message, 'parseinline' ) . '</p></strong></div>'
 99+ '<div class="successbox"><strong><p>' . wfMsgExt( $message, array( 'parseinline' ), $subst ) . '</p></strong></div>'
100100 );
101101 }
102102

Follow-up revisions

RevisionCommit summaryAuthorDate
r100170Tweak/update a few messages...reedy22:01, 18 October 2011

Comments

#Comment by Siebrand (talk | contribs)   21:45, 18 October 2011

Please update message documentation. In this case a variable was added.

#Comment by Reedy (talk | contribs)   21:46, 18 October 2011

It's not really updating when there wasn't any to begin with ;)

#Comment by Siebrand (talk | contribs)   21:50, 18 October 2011

World you rather have me template you? :)

Please add message documentation for the newly added messages. Thanks.

Status & tagging log