r100297 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100296‎ | r100297 | r100298 >
Date:23:52, 19 October 2011
Author:reedy
Status:old
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/Contest (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/Contest.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/Contest.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/INSTALL (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/README (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/RELEASE-NOTES (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/api/ApiMailContestants.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/includes/Contest.class.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/resources/contest.special.contest.js (added) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContest.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialEditContest.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.i18n.php
@@ -30,16 +30,16 @@
3131
3232 // Groups
3333 'group-contestadmin' => 'Contest admins',
34 - 'group-contestadmin-member' => '{{GENDER:$1|contest admin}}',
35 - 'grouppage-contestadmin' => 'Project:Contest_admins',
 34+ 'group-contestadmin-member' => '{{GENDER:$1|contest administrator}}',
 35+ 'grouppage-contestadmin' => '{{ns:project}}:Contest_administrators',
3636
3737 'group-contestant' => 'Contestant',
3838 'group-contestant-member' => '{{GENDER:$1|Contestant}}',
39 - 'grouppage-contestant' => 'Project:Contestant',
 39+ 'grouppage-contestant' => '{{ns:project}}:Contestants',
4040
4141 'group-contestjudge' => 'Contest judges',
4242 'group-contestjudge-member' => '{{GENDER:$1|contest judge}}',
43 - 'grouppage-contestjudge' => 'Project:Contest_judges',
 43+ 'grouppage-contestjudge' => '{{ns:project}}:Contest_judges',
4444
4545 // Preferences
4646 'prefs-contest' => 'Contests',
@@ -69,7 +69,7 @@
7070
7171 // Special:Contests
7272 'contest-special-addnew' => 'Add a new contest',
73 - 'contest-special-namedoc' => 'The name of the contest is the identifier used in URLs. ie "name" in Special:Contest/name',
 73+ 'contest-special-namedoc' => 'The name of the contest is the identifier used in URLs (i.e. "name" in {{#Special:Contest}}/name).',
7474 'contest-special-newname' => 'Contest name',
7575 'contest-special-add' => 'Add contest',
7676 'contest-special-existing' => 'Existing contests',
@@ -81,7 +81,7 @@
8282 'contest-special-delete' => 'Delete',
8383
8484 'contest-special-confirm-delete' => 'Are you sure you want to delete this contest?',
85 - 'contest-special-delete-failed' => 'Failed to delete the contest.',
 85+ 'contest-special-delete-failed' => 'It was not possible to delete the contest.',
8686
8787 // Special:EditContest
8888 'editcontest-text' => 'You are editing a contest.',
@@ -95,7 +95,7 @@
9696 'contest-edit-signup' => 'Signup e-mail page',
9797 'contest-edit-reminder' => 'Reminder e-mail page',
9898 'contest-edit-end' => 'Contest end',
99 - 'contest-edit-exists-already' => 'Note: you are editing an already existing contest, not creating a new one.',
 99+ 'contest-edit-exists-already' => 'You are editing an existing contest.',
100100 'contest-edit-submit' => 'Submit',
101101
102102 'contest-edit-challenges' => 'Contest challenges',
@@ -112,7 +112,7 @@
113113 'contest-welcome-rules' => 'In order to participate, you are required to agree to', // js i18n
114114 'contest-welcome-rules-link' => 'the contest rules', // js i18n
115115 'contest-welcome-signup' => 'Signup now',
116 - 'contest-welcome-js-off' => 'The contest user interface uses JavaScript for an improved interface. Your browser either does not support JavaScript or has JavaScript turned off.',
 116+ 'contest-welcome-js-off' => 'The contest user interface uses JavaScript. Your browser does not support JavaScript or JavaScript is disabled.',
117117 'contest-welcome-accept-challenge' => 'Challenge accepted',
118118
119119 'contest-welcome-select-header' => 'Select your challenge:',
@@ -123,31 +123,49 @@
124124 'contest-signup-header' => 'Please fill out the form to complete your registration for $1.',
125125 'contest-signup-email' => 'Your e-mail address',
126126 'contest-signup-realname' => 'Your real name',
127 - 'contest-signup-volunteer' => 'I am interested in volunteer opportunities',
128 - 'contest-signup-wmf' => 'I am interested in working for the Wikimedia Foundation',
 127+ 'contest-signup-volunteer' => 'I am interested in receiving email about volunteer opportunities',
 128+ 'contest-signup-wmf' => 'I am interested in being contacted about working for the Wikimedia Foundation',
129129 'contest-signup-cv' => 'Link to your CV',
130 - 'contest-signup-readrules' => 'I confirm that I have read, and agree to, [[$1|the contest rules]]',
 130+ 'contest-signup-readrules' => 'I confirm that I have read [[$1|the contest rules]] and agree to them',
131131 'contest-signup-challenge' => 'What challenge do you want to take on?',
132 - 'contest-signup-finished' => 'This contest has ended. Thanks for your participation!',
133 - 'contest-signup-draft' => 'This contest has not started yet. Please be patient.',
 132+ 'contest-signup-finished' => 'This contest has ended. Thank you for your participation!',
 133+ 'contest-signup-draft' => 'This contest has not yet started. Please be patient.',
134134 'contest-signup-country' => 'Your country',
135135
136 - 'contest-signup-require-rules' => 'You need to agree to the contest rules.',
137 - 'contest-signup-require-country' => 'You need to provide your country of residence.',
 136+ 'contest-signup-require-rules' => 'You must agree to the contest rules.',
 137+ 'contest-signup-require-country' => 'You must provide your country of residence.',
138138 'contest-signup-invalid-email' => 'The e-mail address you provided is not valid.',
139139 'contest-signup-invalid-name' => 'The name you provided is too short.',
140140 'contest-signup-require-challenge' => 'You must select a challenge.',
141 - 'contest-signup-invalid-cv' => 'You entered an invalid URL.',
 141+ 'contest-signup-invalid-cv' => 'You have entered an invalid URL.',
142142
143143 // Special:Contest
144144 'contest-contest-title' => 'Contest: $1',
145145 'contest-contest-no-results' => 'There are no contestants to display.',
146146 'contest-contest-name' => 'Name',
147147 'contest-contest-status' => 'Status',
148 - 'contest-contest-submissioncount' => 'Amount of participants',
149 - 'contest-contest-contestants' => 'Contest contestants',
150 - 'contest-contest-contestants-text' => 'To judge an individual entry, click on the entry ID in the left column.',
 148+ 'contest-contest-submissioncount' => 'Number of participants',
 149+ 'contest-contest-end' => 'Contest end',
 150+ 'contest-contest-days-ago' => '$1, $2 {{PLURAL:$2|day|days}} ago',
 151+ 'contest-contest-days-left' => '$1, in $2 {{PLURAL:$2|day|days}}',
 152+ 'contest-contest-contestants' => 'Contestants',
 153+ 'contest-contest-contestants-text' => 'Click on the entry ID in the left column to judge an individual entry.',
 154+ 'contest-contest-reminder-mail' => 'Reminder e-mail',
 155+ 'contest-contest-reminder-page' => 'The content for the reminder e-mail comes from [[$1|this page]].',
 156+ 'contest-contest-send-reminder' => 'Send reminder',
151157
 158+ // Special:Contest, reminder email JS
 159+ 'contest-contest-reminder-preview' => 'Preview of the reminder e-mail:',
 160+ 'contest-contest-reminder-title' => 'Reminder e-mail',
 161+ 'contest-contest-reminder-send' => 'Send reminder',
 162+ 'contest-contest-reminder-cancel' => 'Cancel',
 163+ 'contest-contest-reminder-sending' => 'Sending...',
 164+ // We really want // {{PLURAL:$1|contestant|contestants}} here, but the JS i18n shizzle does not support it yet :/
 165+ 'contest-contest-reminder-success' => 'Successfully send the reminder email to $1 contestants',
 166+ 'contest-contest-reminder-close' => 'Close',
 167+ 'contest-contest-reminder-retry' => 'Retry sending',
 168+ 'contest-contest-reminder-failed' => 'Could not send the reminder emails.',
 169+
152170 // Contestant pager
153171 'contest-contestant-id' => 'ID',
154172 'contest-contestant-challenge-name' => 'Challenge name',
@@ -169,7 +187,7 @@
170188 'contest-contestant-header-wmf' => 'Interested in WMF job',
171189 'contest-contestant-header-volunteer' => 'Interested in volunteer opportunities',
172190 'contest-contestant-header-rating' => 'Rating',
173 - 'contest-contestant-header-comments' => 'Amount of comments',
 191+ 'contest-contestant-header-comments' => 'Number of comments',
174192 'contest-contestant-submission-url' => 'Submission',
175193 'contest-contestant-notsubmitted' => 'Not submitted yet',
176194 'contest-contestant-comments' => 'Comments',
@@ -177,11 +195,11 @@
178196 'contest-contestant-comment-by' => 'Comment by $1',
179197 'contest-contestant-rate' => 'Rate this contestant',
180198 'contest-contestant-not-voted' => 'You have not voted on this participant yet.',
181 - 'contest-contestant-voted' => 'Your current vote is $1.',
 199+ 'contest-contestant-voted' => 'Your current vote is "$1".',
182200 'contest-contestant-permalink' => 'Permalink',
183201
184202 // Emails
185 - 'contest-email-signup-title' => 'Thanks for joining the challenge!',
 203+ 'contest-email-signup-title' => 'Thank you for joining the challenge!',
186204 'contest-email-reminder-title' => 'Only $1 {{PLURAL:$1|day|days}} until the end of the challenge!',
187205
188206 // Special:MyContests
@@ -189,19 +207,19 @@
190208 'contest-mycontests-no-contests' => 'You are not participating in any contest.',
191209 'contest-mycontests-active-header' => 'Running contests',
192210 'contest-mycontests-finished-header' => 'Passed contests',
193 - 'contest-mycontests-active-text' => 'These are the contests you are currently participating in:',
194 - 'contest-mycontests-finished-text' => 'These are the past contests you have participated in:',
 211+ 'contest-mycontests-active-text' => 'You are currently participating in these contests:',
 212+ 'contest-mycontests-finished-text' => 'You have have participated in these contests:',
195213 'contest-mycontests-header-contest' => 'Contest',
196214 'contest-mycontests-header-challenge' => 'Challenge',
197 - 'contest-mycontests-signup-success' => 'You have successfully signed up for the $1 contest.',
198 - 'contest-mycontests-addition-success' => 'You have successfully posted your submission! Thanks for participating in this contest.',
199 - 'contest-mycontests-updated-success' => 'You have successfully modified your submission.',
 215+ 'contest-mycontests-signup-success' => 'You have successfully signed up for the "$1" contest.',
 216+ 'contest-mycontests-addition-success' => 'You have successfully posted your submission! Thank you for participating in this contest.',
 217+ 'contest-mycontests-updated-success' => 'You have modified your submission.',
200218 'contest-mycontests-sessionfail' => 'Your submission could not be saved due to loss of session data. Please try again.',
201219
202220 'contest-submission-submit' => 'Submit',
203221 'contest-submission-unknown' => 'There is no contest with the provided name.',
204 - 'contest-submission-header' => 'Thanks for participating in this contest! Once you have completed the challenge, you can add a link to your submission below.',
205 - 'contest-submission-finished' => 'This contest has ended. Thanks for your participation!',
 222+ 'contest-submission-header' => 'Thank you for participating in this contest! Once you have completed the challenge, you can add a link to your submission below.',
 223+ 'contest-submission-finished' => 'This contest has ended. Thank you for your participation!',
206224
207225 'contest-submission-submission' => 'Link to your submission',
208226 'contest-submission-invalid-url' => 'This URL does not match one of the allowed formats.',
@@ -247,7 +265,10 @@
248266 'contest-contest-name' => 'Table row header',
249267 'contest-contest-status' => 'Table row header',
250268 'contest-contest-submissioncount' => 'Table row header',
 269+ 'contest-contest-end' => 'Table row header',
251270 'contest-contest-contestants' => 'Page section header',
 271+ 'contest-contest-days-ago' => '$1 is a date, $2 is an integer, the amount of days',
 272+ 'contest-contest-days-left' => '$1 is a date, $2 is an integer, the amount of days',
252273 'contest-contestant-id' => 'Table column header',
253274 'contest-contestant-volunteer' => 'Table column header',
254275 'contest-contestant-wmf' => 'Table column header',
@@ -276,6 +297,20 @@
277298 'contest-email-signup-title' => 'Title for signup e-mails',
278299 'contest-email-reminder-title' => 'Title for reminder e-mails',
279300
 301+ // Special:Contest, reminder email
 302+ 'contest-contest-reminder-mail' => 'Reminder email',
 303+ 'contest-contest-reminder-page' => 'Text explaining the email content is pulled from a page, $1 is the page name.',
 304+ 'contest-contest-send-reminder' => 'Send reminder button text',
 305+ 'contest-contest-reminder-preview' => 'Text indicating that the following content is the preview for the reminder email.',
 306+ 'contest-contest-reminder-title' => 'Dialog title',
 307+ 'contest-contest-reminder-send' => 'Send button text',
 308+ 'contest-contest-reminder-cancel' => 'Cancel button text',
 309+ 'contest-contest-reminder-sending' => 'Send button text after clicking it',
 310+ 'contest-contest-reminder-success' => 'Success message, $1 is the amount of contesnats. No PLURAL for now, just assume there are multiple untill MWs JS supports plural.',
 311+ 'contest-contest-reminder-close' => 'Close button text',
 312+ 'contest-contest-reminder-retry' => 'Retry button text',
 313+ 'contest-contest-reminder-failed' => 'Failiure message, displayed in an alert box',
 314+
280315 // Special:MyContests
281316 'contest-mycontests-toplink' => 'Text for link in the user menu (i.e. where watchlist and preferences are linked)',
282317 'contest-mycontests-no-contests' => 'Message indicating there are no contests for the user, displayed instead of a list.',
@@ -289,13 +324,13 @@
290325 'contest-mycontests-addition-success' => 'Message shown when a user has added a submission',
291326 'contest-mycontests-updated-success' => 'Message shown when a user has editied a submission',
292327 'contest-mycontests-sessionfail' => 'Session failure',
293 -
294328 'contest-submission-challenge' => 'Tells the user which challenge they are part of. $1 is the challenge name',
295329 'contest-submission-challenge-description' => 'Output of challenge name and description. $1 is the challenge name, $2 is the challenge description',
296330 );
297331
298332 /** German (Deutsch)
299333 * @author Kghbln
 334+ * @author Reedy
300335 */
301336 $messages['de'] = array(
302337 'contest-desc' => 'Ermöglicht Wettbewerbe sowie die anschließende Ermittlung der Gewinner durch Juroren',
@@ -394,8 +429,18 @@
395430 'contest-contest-name' => 'Name',
396431 'contest-contest-status' => 'Status',
397432 'contest-contest-submissioncount' => 'Anzahl der Teilnehmer',
 433+ 'contest-contest-end' => 'Wettbewerbsende',
 434+ 'contest-contest-days-ago' => '$1, vor $2 {{PLURAL:$2|Tag|Tagen}}',
 435+ 'contest-contest-days-left' => '$1, in $2 {{PLURAL:$2|Tag|Tagen}}',
398436 'contest-contest-contestants' => 'Wettbewerbsteilnehmer',
399437 'contest-contest-contestants-text' => 'Um einen bestimmten Wettbewerbsbeitrag zu beurteilen, bitte auf die entsprechende Beitragskennung in der linken Spalte klicken.',
 438+ 'contest-contest-reminder-mail' => 'Erinnerungs-E-Mail',
 439+ 'contest-contest-reminder-page' => 'Der Inhalt der Erinnerungs-E-Mail wird [[$1|dieser Seite]] entnommen.',
 440+ 'contest-contest-send-reminder' => 'Erinnerung senden',
 441+ 'contest-contest-reminder-preview' => 'Vorschau der Erinnerungs-E-Mail:',
 442+ 'contest-contest-reminder-title' => 'Erinnerungs-E-Mail',
 443+ 'contest-contest-reminder-send' => 'Erinnerung senden',
 444+ 'contest-contest-reminder-cancel' => 'Abbrechen',
400445 'contest-contestant-id' => 'Kennung',
401446 'contest-contestant-challenge-name' => 'Name der Herausforderung',
402447 'contest-contestant-volunteer' => 'Freiwilliger',
@@ -430,11 +475,11 @@
431476 'contest-mycontests-no-contests' => 'Du nimmst an keinem Wettbewerb teil.',
432477 'contest-mycontests-active-header' => 'Laufende Wettbewerbe',
433478 'contest-mycontests-finished-header' => 'Beendete Wettbewerbe',
434 - 'contest-mycontests-active-text' => 'Dies sind die Wettbewerbe, an denen du derzeit teilnimmst.',
435 - 'contest-mycontests-finished-text' => 'Dies sind die beendeten Wettbewerbe an denen du teilgenommen hast.',
 479+ 'contest-mycontests-active-text' => 'Dies sind die Wettbewerbe, an denen du derzeit teilnimmst:',
 480+ 'contest-mycontests-finished-text' => 'Dies sind die beendeten Wettbewerbe an denen du teilgenommen hast:',
436481 'contest-mycontests-header-contest' => 'Wettbewerb',
437482 'contest-mycontests-header-challenge' => 'Herausforderung',
438 - 'contest-mycontests-signup-success' => 'Du hast dich erfolgreich für diesen Wettbewerb angemeldet.',
 483+ 'contest-mycontests-signup-success' => 'Du hast dich erfolgreich für den Wettbewerb $1 angemeldet.',
439484 'contest-mycontests-addition-success' => 'Du hast deinen Beitrag erfolgreich eingereicht. Vielen Dank für die Teilnehme an diesem Wettbewerb.',
440485 'contest-mycontests-updated-success' => 'Du hast deinen Beitrag erfolgreich geändert.',
441486 'contest-mycontests-sessionfail' => 'Dein Beitrag konnte aufgrund verlorengegangener Sitzungsdaten nicht gespeichert werden. Bitte versuche es erneut.',
@@ -446,6 +491,8 @@
447492 'contest-submission-invalid-url' => 'Diese URL entspricht nicht einem der zulässigen Formate.',
448493 'contest-submission-new-submission' => 'Du musst noch den Link zu deinem Beitrag hinzufügen. Dies muss noch vor Ablauf der Wettbewerbsfrist erfolgen.',
449494 'contest-submission-current-submission' => 'Dies ist die URL zu deinem Beitrag. Du kannst ihn noch bis zum Ende der Wettbewerbsfrist ändern.',
 495+ 'contest-submission-challenge' => 'Du stellst dich gerade der Herausforderung $1',
 496+ 'contest-submission-challenge-description' => "'''Aktuelle Herausforderung: $1''' -- $2",
450497 'contest-submission-domains' => 'Beiträge sind auf diese Websites beschränkt: $1',
451498 );
452499
@@ -466,9 +513,9 @@
467514 'contest-contestant-not-voted' => 'Sie haben noch nicht bezüglich dieses Teilnehmers abgestimmt.',
468515 'contest-contestant-voted' => 'Ihre aktuelle Stimmenanzahl beträgt $1.',
469516 'contest-mycontests-no-contests' => 'Sie nehmen an keinem Wettbewerb teil.',
470 - 'contest-mycontests-active-text' => 'Dies sind die Wettbewerbe, an denen Sie derzeit teilnehmen.',
471 - 'contest-mycontests-finished-text' => 'Dies sind die beendeten Wettbewerbe an denen Sie teilgenommen haben.',
472 - 'contest-mycontests-signup-success' => 'Sie haben sich erfolgreich für diesen Wettbewerb angemeldet.',
 517+ 'contest-mycontests-active-text' => 'Dies sind die Wettbewerbe, an denen Sie derzeit teilnehmen:',
 518+ 'contest-mycontests-finished-text' => 'Dies sind die beendeten Wettbewerbe an denen Sie teilgenommen haben:',
 519+ 'contest-mycontests-signup-success' => 'Sie haben sich erfolgreich für den Wettbewerb $1 angemeldet.',
473520 'contest-mycontests-addition-success' => 'Sie haben Ihren Beitrag erfolgreich eingereicht. Vielen Dank für die Teilnehme an diesem Wettbewerb.',
474521 'contest-mycontests-updated-success' => 'Sie haben Ihren Beitrag erfolgreich geändert.',
475522 'contest-mycontests-sessionfail' => 'Ihr Beitrag konnte aufgrund verlorengegangener Sitzungsdaten nicht gespeichert werden. Bitte versuchen Sie es erneut.',
@@ -476,10 +523,12 @@
477524 'contest-submission-submission' => 'Link zu Ihrem Beitrag',
478525 'contest-submission-new-submission' => 'Sie müssen noch den Link zu Ihrem Beitrag hinzufügen. Dies muss noch vor Ablauf der Wettbewerbsfrist erfolgen.',
479526 'contest-submission-current-submission' => 'Dies ist die URL zu Ihrem Beitrag. Sie können ihn noch bis zum Ende der Wettbewerbsfrist ändern.',
 527+ 'contest-submission-challenge' => 'Sie stellen sich gerade der Herausforderung $1',
480528 );
481529
482530 /** French (Français)
483531 * @author Gomoko
 532+ * @author Reedy
484533 */
485534 $messages['fr'] = array(
486535 'contest-desc' => 'Extension de concours qui permet aux utilisateurs de participer à des défis de concours organisés par un administrateur. Via une interface de jugement, les juges peuvent discuter et voter sur les propositions.',
@@ -614,11 +663,11 @@
615664 'contest-mycontests-no-contests' => 'Vous ne participez à aucun concours.',
616665 'contest-mycontests-active-header' => 'Concours en cours',
617666 'contest-mycontests-finished-header' => 'Concours terminés',
618 - 'contest-mycontests-active-text' => 'Voici les concours auxquels vous participez actuellement.',
619 - 'contest-mycontests-finished-text' => 'Voici les concours terminés auxquels vous avez participé.',
 667+ 'contest-mycontests-active-text' => 'Voici les concours auxquels vous participez actuellement:',
 668+ 'contest-mycontests-finished-text' => 'Voici les concours terminés auxquels vous avez participé:',
620669 'contest-mycontests-header-contest' => 'Concours',
621670 'contest-mycontests-header-challenge' => 'Défi',
622 - 'contest-mycontests-signup-success' => 'Vous avez réussi à vous inscrire à ce concours.',
 671+ 'contest-mycontests-signup-success' => 'Vous avez réussi à vous inscrire au concours $1.',
623672 'contest-mycontests-addition-success' => 'Vous avez réussi à envoyer votre réponse! Merci de votre participation à ce concours.',
624673 'contest-mycontests-updated-success' => 'Vous avez réussi à modifier votre réponse.',
625674 'contest-mycontests-sessionfail' => "Votre réponse n'a pas pu être enregistrée à cause d'une perte des données de session. Merci d'essayer de nouveau.",
@@ -630,11 +679,13 @@
631680 'contest-submission-invalid-url' => 'Cette URL ne correspond pas à un des formats autorisés.',
632681 'contest-submission-new-submission' => "Vous devez encore entrer l'URL de votre réponse. Cela doit être fait avant la date limite.",
633682 'contest-submission-current-submission' => "Voici l'URL de votre réponse, que vous pouvez modifier jusqu'à la date limite.",
 683+ 'contest-submission-challenge' => 'Vous êtes actuellement sur le défi $1',
634684 'contest-submission-domains' => 'Les réponses sont limitées à ces sites: $1',
635685 );
636686
637687 /** Interlingua (Interlingua)
638688 * @author McDutchie
 689+ * @author Reedy
639690 */
640691 $messages['ia'] = array(
641692 'contest-desc' => 'Permitte al usatores de participar in concursos definite per administratores. Via un interfacie de judicamento, le judices pote discuter e votar sur submissiones.',
@@ -790,6 +841,7 @@
791842
792843 /** Macedonian (Македонски)
793844 * @author Bjankuloski06
 845+ * @author Reedy
794846 */
795847 $messages['mk'] = array(
796848 'contest-desc' => 'Додаток што им овозможува на корисниците да учествуваат во конкурси (задачи) приредени од администраторите. Жири комисијата има свој посредник за дискутирање и гласање за поднесеното.',
@@ -844,7 +896,7 @@
845897 'contest-edit-opportunities' => 'Страница за можности',
846898 'contest-edit-rulespage' => 'Страница со правила',
847899 'contest-edit-help' => 'Страница за помош',
848 - 'contest-edit-signup' => 'Страниз на е-пошта за пријава',
 900+ 'contest-edit-signup' => 'Страница на е-пошта за пријава',
849901 'contest-edit-reminder' => 'Страница за потсетник на е-пошта',
850902 'contest-edit-end' => 'Крај на конкурсот',
851903 'contest-edit-exists-already' => 'Напомена: уредувате веќе постоечки конкурс - не создавате нов.',
@@ -852,7 +904,7 @@
853905 'contest-edit-challenges' => 'Задачи на конкурсот',
854906 'contest-edit-delete' => 'Избриши задача',
855907 'contest-edit-add-first' => 'Додај задача',
856 - 'contest-edit-add-another' => 'одај друга задача',
 908+ 'contest-edit-add-another' => 'Додај друга задача',
857909 'contest-edit-confirm-delete' => 'Дали сте сигурни дека сакате да го избришете конкурсов?',
858910 'contest-edit-challenge-title' => 'Наслов на задачата',
859911 'contest-edit-challenge-text' => 'Текст на задачата',
@@ -924,11 +976,11 @@
925977 'contest-mycontests-no-contests' => 'Не учествувате во ниеден конкурс.',
926978 'contest-mycontests-active-header' => 'Тековни конкурси',
927979 'contest-mycontests-finished-header' => 'Минати конкурси',
928 - 'contest-mycontests-active-text' => 'Моментално учествувате во наведениве конкурси.',
929 - 'contest-mycontests-finished-text' => 'Ова се конкурсите во кои имате учествувано.',
 980+ 'contest-mycontests-active-text' => 'Моментално учествувате во следниве конкурси:',
 981+ 'contest-mycontests-finished-text' => 'Ова се конкурсите во кои имате учествувано:',
930982 'contest-mycontests-header-contest' => 'Конкурс',
931983 'contest-mycontests-header-challenge' => 'Задача',
932 - 'contest-mycontests-signup-success' => 'Успешно се пријавивте за овој конкурс.',
 984+ 'contest-mycontests-signup-success' => 'Успешно се пријавивте за овој конкурсот $1.',
933985 'contest-mycontests-addition-success' => 'Успешно поднесено! Ви благодариме за учеството.',
934986 'contest-mycontests-updated-success' => 'Поднесеното е успешно изменето.',
935987 'contest-mycontests-sessionfail' => 'Поднесеното не е зачувано поради загуба на сесиски податоци. Обидете се повторно.',
@@ -940,10 +992,12 @@
941993 'contest-submission-invalid-url' => 'Оваа URL-адреса не одговара на допуштените формати.',
942994 'contest-submission-new-submission' => 'Преостанува да наведете URL-адреса во поднесеното. Ова мора да го сторите пред истекот на рокот.',
943995 'contest-submission-current-submission' => 'Ова е URL-адресата на поднесеното, кое можете да го менувате додека не истече рокот.',
 996+ 'contest-submission-challenge' => 'Моментално сте на задачата $1',
944997 'contest-submission-domains' => 'Поднесувањето е ограничено на следниве мрежни места: $1',
945998 );
946999
9471000 /** Dutch (Nederlands)
 1001+ * @author Reedy
9481002 * @author SPQRobin
9491003 */
9501004 $messages['nl'] = array(
@@ -1062,3 +1116,19 @@
10631117 'contest-submission-submission' => 'Verwijzing naar uw inzending',
10641118 );
10651119
 1120+/** Telugu (తెలుగు)
 1121+ * @author Veeven
 1122+ */
 1123+$messages['te'] = array(
 1124+ 'contest-special-name' => 'పేరు',
 1125+ 'contest-special-status' => 'స్థితి',
 1126+ 'contest-edit-rulespage' => 'నియమాల పుట',
 1127+ 'contest-edit-help' => 'సహాయపు పుట',
 1128+ 'contest-signup-country' => 'మీ దేశం',
 1129+ 'contest-contest-name' => 'పేరు',
 1130+ 'contest-contest-status' => 'స్థితి',
 1131+ 'contest-contestant-comments' => 'వ్యాఖ్యలు',
 1132+ 'contest-contestant-permalink' => 'స్థిరలంకె',
 1133+ 'contest-submission-submit' => 'దాఖలుచెయ్యి',
 1134+);
 1135+
Index: branches/wmf/1.18wmf1/extensions/Contest/README
@@ -15,6 +15,7 @@
1616 * Summary pages per contest listing contestants, which can be filtered and sorted.
1717 * Judging interface that allows for rating and commenting on each participant.
1818 * All contests, challenges, contestants, comments and votes can be queried and exported via the API.
 19+* Signup and reminder emails.
1920
2021 == Credits to other projects ==
2122
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialContest.php
@@ -53,9 +53,13 @@
5454 }
5555 else {
5656 $out->setPageTitle( wfMsgExt( 'contest-contest-title', 'parseinline', $contest->getField( 'name' ) ) );
 57+
5758 $this->displayNavigation();
5859 $this->showGeneralInfo( $contest );
 60+ $this->showMailFunctionality( $contest );
5961 $this->showContestants( $contest, $challengeTitle );
 62+
 63+ $out->addModules( 'contest.special.contest' );
6064 }
6165 }
6266
@@ -107,11 +111,52 @@
108112 $stats['name'] = $contest->getField( 'name' );
109113 $stats['status'] = Contest::getStatusMessage( $contest->getStatus() );
110114 $stats['submissioncount'] = $this->getLang()->formatNum( $contest->getField( 'submission_count' ) );
111 -
 115+
 116+ $stats['end'] = wfMsgExt(
 117+ $contest->getDaysLeft() < 0 ? 'contest-contest-days-ago' : 'contest-contest-days-left',
 118+ 'parsemag',
 119+ $this->getLang()->timeanddate( $contest->getField( 'end' ), true ),
 120+ $this->getLang()->formatNum( abs( $contest->getDaysLeft() ) )
 121+ );
 122+
112123 return $stats;
113124 }
114125
115126 /**
 127+ *
 128+ *
 129+ * @since 0.1
 130+ *
 131+ * @param Contest $contest
 132+ */
 133+ protected function showMailFunctionality( Contest $contest ) {
 134+ $out = $this->getOutput();
 135+
 136+ $out->addHTML( Html::element( 'h3', array(), wfMsg( 'contest-contest-reminder-mail' ) ) );
 137+
 138+ $out->addWikiMsg( 'contest-contest-reminder-page', $contest->getField( 'reminder_email' ) );
 139+
 140+ $out->addHTML( Html::element(
 141+ 'button',
 142+ array(
 143+ 'id' => 'send-reminder',
 144+ 'data-token' => $this->getUser()->editToken(),
 145+ 'data-contest-id' => $contest->getId()
 146+ ),
 147+ wfMsg( 'contest-contest-send-reminder' )
 148+ ) );
 149+
 150+ $out->addHTML( Html::rawElement(
 151+ 'div',
 152+ array(
 153+ 'id' => 'reminder-content',
 154+ 'style' => 'display:none'
 155+ ),
 156+ ContestUtils::getParsedArticleContent( $contest->getField( 'reminder_email' ) )
 157+ ) );
 158+ }
 159+
 160+ /**
116161 * Show a paged list of the contestants foe this contest.
117162 *
118163 * @since 0.1
Index: branches/wmf/1.18wmf1/extensions/Contest/specials/SpecialEditContest.php
@@ -278,7 +278,7 @@
279279 $fields['id'] = $contest === false ? null : $contest->getField( 'id' );
280280 }
281281
282 - $contest = new Contest( $fields, true );
 282+ $contest = new Contest( $fields, is_null( $fields['id'] ) );
283283
284284 $contest->setChallenges( $this->getSubmittedChallenges() );
285285 $success = $contest->writeAllToDB();
Index: branches/wmf/1.18wmf1/extensions/Contest/Contest.php
@@ -28,7 +28,7 @@
2929 die( '<b>Error:</b> Contest requires MediaWiki 1.18 or above.' );
3030 }
3131
32 -define( 'CONTEST_VERSION', '0.1alpha' );
 32+define( 'CONTEST_VERSION', '0.1' );
3333
3434 $wgExtensionCredits['other'][] = array(
3535 'path' => __FILE__,
@@ -156,6 +156,26 @@
157157 )
158158 );
159159
 160+$wgResourceModules['contest.special.contest'] = $moduleTemplate + array(
 161+ 'scripts' => array(
 162+ 'contest.special.contest.js'
 163+ ),
 164+ 'messages' => array(
 165+ 'contest-contest-reminder-title',
 166+ 'contest-contest-reminder-cancel',
 167+ 'contest-contest-reminder-send',
 168+ 'contest-contest-reminder-preview',
 169+ 'contest-contest-reminder-sending',
 170+ 'contest-contest-reminder-success',
 171+ 'contest-contest-reminder-close',
 172+ 'contest-contest-reminder-retry',
 173+ 'contest-contest-reminder-failed',
 174+ ),
 175+ 'dependencies' => array(
 176+ 'jquery.ui.button', 'jquery.ui.dialog',
 177+ )
 178+);
 179+
160180 $wgResourceModules['jquery.ui.timepicker'] = $moduleTemplate + array(
161181 'scripts' => array(
162182 'jquery.ui.timepicker.js',
Index: branches/wmf/1.18wmf1/extensions/Contest/INSTALL
@@ -58,7 +58,12 @@
5959 |-
6060 | submissionDomains
6161 | array of string
62 -| array( 'github.com', 'gitorious.org' )
 62+| array( 'mediawiki.org', 'github.com', 'gitorious.org' )
6363 | Domains on which submissions can be placed
 64+|-
 65+| reminderJobSize
 66+| integer
 67+| 50
 68+| Max size of the reminder email jobs (in emails to send)
6469 |}
6570
Index: branches/wmf/1.18wmf1/extensions/Contest/RELEASE-NOTES
@@ -14,4 +14,5 @@
1515 * Personal contest list and submission interface for each user.
1616 * Summary pages per contest listing contestants, which can be filtered and sorted.
1717 * Judging interface that allows for rating and commenting on each participant.
18 -* All contests, challenges, contestants, comments and votes can be queried and exported via the API.
\ No newline at end of file
 18+* All contests, challenges, contestants, comments and votes can be queried and exported via the API.
 19+* Signup and reminder emails.
\ No newline at end of file
Index: branches/wmf/1.18wmf1/extensions/Contest/includes/Contest.class.php
@@ -16,8 +16,8 @@
1717 // Constants representing the states a contest can have.
1818 const STATUS_DRAFT = 0;
1919 const STATUS_ACTIVE = 1;
20 - const STATUS_FINISHED = 2; // manually stopped by contest manager
21 - const STATUS_EXPIRED = 3; // past configured contest end date
 20+ const STATUS_FINISHED = 2; // Manually stopped by contest manager.
 21+ const STATUS_EXPIRED = 3; // Past configured contest end date.
2222
2323 /**
2424 * List of challenges for this contest.
@@ -138,6 +138,7 @@
139139 */
140140 public function getDefaults() {
141141 $defaultPage = 'MediaWiki:Contests/';
 142+
142143 return array(
143144 'name' => '',
144145 'status' => self::STATUS_DRAFT,
@@ -188,14 +189,18 @@
189190 wfMsg( 'contest-status-draft' ) => self::STATUS_DRAFT,
190191 wfMsg( 'contest-status-active' ) => self::STATUS_ACTIVE,
191192 wfMsg( 'contest-status-finished' ) => self::STATUS_FINISHED,
 193+ wfMsg( 'contest-status-expired' ) => self::STATUS_EXPIRED,
192194 );
193195 }
194196
195 - if ( !$onlySettable ) {
196 - $map[wfMsg( 'contest-status-expired')] = self::STATUS_EXPIRED;
 197+ if ( $onlySettable ) {
 198+ $messages = $map;
 199+ unset( $messages[wfMsg( 'contest-status-expired' )] );
 200+ return $messages;
197201 }
198 -
199 - return $map;
 202+ else {
 203+ return $map;
 204+ }
200205 }
201206
202207 /**
Index: branches/wmf/1.18wmf1/extensions/Contest/api/ApiMailContestants.php
@@ -18,7 +18,6 @@
1919 parent::__construct( $main, $action );
2020 }
2121
22 - // TODO
2322 public function execute() {
2423 global $wgUser;
2524
@@ -71,11 +70,11 @@
7271 $conditions['id'] = $params['ids'];
7372 }
7473
75 - $contestants = ContestContestant::s()->select( 'email', $conditions );
 74+ $contestants = ContestContestant::s()->select( array( 'contest_id', 'email' ), $conditions );
7675
7776 if ( $contestants !== false && count( $contestants ) > 0 ) {
7877 $setSize = ContestSettings::get( 'reminderJobSize' );
79 - $limit = count( $contestants ) - $setSize;
 78+ $limit = count( $contestants );
8079
8180 for ( $i = 0; $i <= $limit; $i += $setSize ) {
8281 $this->createReminderJob( array_splice( $contestants, $i, $setSize ) );
Index: branches/wmf/1.18wmf1/extensions/Contest/resources/contest.special.contest.js
@@ -0,0 +1,78 @@
 2+/**
 3+ * JavasSript for the Contest MediaWiki extension.
 4+ * @see https://www.mediawiki.org/wiki/Extension:Contest
 5+ *
 6+ * @licence GNU GPL v3 or later
 7+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
 8+ */
 9+
 10+(function( $, mw ) { $( document ).ready( function() {
 11+
 12+ var _this = this;
 13+
 14+ this.sendReminder = function( callback ) {
 15+ var requestArgs = {
 16+ 'action': 'mailcontestants',
 17+ 'format': 'json',
 18+ 'token': $( '#send-reminder' ).attr( 'data-token' ),
 19+ 'contestids': $( '#send-reminder' ).attr( 'data-contest-id' )
 20+ };
 21+
 22+ $.post(
 23+ wgScriptPath + '/api.php',
 24+ requestArgs,
 25+ function( data ) {
 26+ callback( data );
 27+ }
 28+ );
 29+ };
 30+
 31+ this.showReminderDialog = function() {
 32+ var $dialog = null;
 33+
 34+ $dialog = $( '<div />' ).html( '' ).dialog( {
 35+ 'title': mw.msg( 'contest-contest-reminder-title' ),
 36+ 'buttons': [
 37+ {
 38+ 'text': mw.msg( 'contest-contest-reminder-send' ),
 39+ 'id': 'reminder-send-button',
 40+ 'click': function() {
 41+ var $send = $( '#reminder-send-button' );
 42+ var $cancel = $( '#reminder-cancel-button' );
 43+
 44+ $send.button( 'option', 'disabled', true );
 45+ $send.button( 'option', 'label', mw.msg( 'contest-contest-reminder-sending' ) );
 46+
 47+ _this.sendReminder( function( data ) {
 48+ if ( data.success ) {
 49+ $dialog.text( mw.msg( 'contest-contest-reminder-success', data.contestantcount ) );
 50+ $send.remove();
 51+ $cancel.button( 'option', 'label', mw.msg( 'contest-contest-reminder-close' ) );
 52+ }
 53+ else {
 54+ $send.button( 'option', 'label', mw.msg( 'contest-contest-reminder-retry' ) );
 55+ $send.button( 'option', 'disabled', false );
 56+
 57+ alert( mw.msg( 'contest-contest-reminder-failed' ) );
 58+ }
 59+ } );
 60+ }
 61+ },
 62+ {
 63+ 'text': mw.msg( 'contest-contest-reminder-cancel' ),
 64+ 'id': 'reminder-cancel-button',
 65+ 'click': function() {
 66+ $dialog.dialog( 'close' );
 67+ }
 68+ }
 69+ ]
 70+ } );
 71+
 72+ $dialog.append( $( '<p />' ).text( mw.msg( 'contest-contest-reminder-preview' ) ) ).append( '<hr />' );
 73+
 74+ $dialog.append( $( '#reminder-content' ).html() );
 75+ };
 76+
 77+ $( '#send-reminder' ).button().click( this.showReminderDialog );
 78+
 79+} ); })( window.jQuery, window.mediaWiki );
\ No newline at end of file
Property changes on: branches/wmf/1.18wmf1/extensions/Contest
___________________________________________________________________
Modified: svn:mergeinfo
180 Merged /trunk/extensions/Contest:r100251,100258-100259,100274,100276,100278,100295

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100251added days left field and initial work on reminder email UIjeroendedauw18:38, 19 October 2011
r100255Tweak messages.siebrand18:52, 19 October 2011
r100258follow up to r100251jeroendedauw19:07, 19 October 2011
r100259follow up to r100251; added missing filejeroendedauw19:09, 19 October 2011
r100274created basic reminder email functionalityjeroendedauw20:46, 19 October 2011
r100276up readme and installjeroendedauw20:56, 19 October 2011
r100278Follow up to r100245;jeroendedauw21:09, 19 October 2011

Status & tagging log