jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/369916 )

Change subject: Add apihelp messages to pass unit tests
......................................................................


Add apihelp messages to pass unit tests

Bug: T155020
Change-Id: I75e4624f151d3435484ad6e36edeb41ea0b83668
---
M api/ApiContestQuery.php
M api/ApiDeleteContest.php
M api/ApiMailContestants.php
M api/ApiQueryChallenges.php
M api/ApiQueryContestComments.php
M api/ApiQueryContestants.php
M api/ApiQueryContests.php
M i18n/en.json
M i18n/qqq.json
9 files changed, 113 insertions(+), 85 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/ApiContestQuery.php b/api/ApiContestQuery.php
index 9889d02..a3af486 100644
--- a/api/ApiContestQuery.php
+++ b/api/ApiContestQuery.php
@@ -194,32 +194,22 @@
                        'props' => array(
                                ApiBase::PARAM_TYPE => array_merge( 
$this->getClass()->getFieldNames(), array( '*' ) ),
                                ApiBase::PARAM_ISMULTI => true,
-                               ApiBase::PARAM_DFLT => '*'
+                               ApiBase::PARAM_DFLT => '*',
+                               ApiBase::PARAM_HELP_MSG => 
'apihelp-query+contestbase-param-props',
                        ),
                        'limit' => array(
                                ApiBase::PARAM_DFLT => 20,
                                ApiBase::PARAM_TYPE => 'limit',
                                ApiBase::PARAM_MIN => 1,
                                ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
-                               ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
+                               ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2,
+                               ApiBase::PARAM_HELP_MSG => 
'apihelp-query+contestbase-param-limit',
                        ),
-                       'continue' => null,
+                       'continue' => array(
+                               ApiBase::PARAM_HELP_MSG => 
'apihelp-query+contestbase-param-continue',
+                       ),
                );
 
                return array_merge( $this->getClass()->getAPIParams(), $params 
);
-       }
-
-       /**
-        * (non-PHPdoc)
-        * @see includes/api/ApiBase#getParamDescription()
-        */
-       public function getParamDescription() {
-               $descs = array (
-                       'props' => 'Fields to query',
-                       'continue' => 'Offset number from where to continue the 
query',
-                       'limit' => 'Max amount of rows to return',
-               );
-
-               return array_merge( $this->getClass()->getFieldDescriptions(), 
$descs );
        }
 }
diff --git a/api/ApiDeleteContest.php b/api/ApiDeleteContest.php
index 95f8ef8..092ee79 100644
--- a/api/ApiDeleteContest.php
+++ b/api/ApiDeleteContest.php
@@ -72,19 +72,6 @@
                );
        }
 
-       public function getParamDescription() {
-               return array(
-                       'ids' => 'The IDs of the contests to delete',
-                       'token' => 'Edit token, salted with the contest id',
-               );
-       }
-
-       public function getDescription() {
-               return array(
-                       'API module for deleting contests.'
-               );
-       }
-
        protected function getExamples() {
                return array(
                        'api.php?action=deletecontest&ids=42',
diff --git a/api/ApiMailContestants.php b/api/ApiMailContestants.php
index 93a9a4e..d9d4a40 100644
--- a/api/ApiMailContestants.php
+++ b/api/ApiMailContestants.php
@@ -154,25 +154,6 @@
                );
        }
 
-       public function getParamDescription() {
-               return array(
-//                     'page' => 'Name of the page from which to pull content 
for the email body',
-                       'ids' => 'The IDs of the contestants to mail',
-                       'contestids' => 'The IDs of the contests where of the 
contestants should be mailed',
-                       'contestnames' => 'The names of the contests where of 
the contestants should be mailed',
-                       'challengeids' => 'The IDs of the challenges where of 
the contestants should be mailed',
-                       'challengetitles' => 'The titles of the challenges 
where of the contestants should be mailed',
-                       'token' => 'Edit token',
-               );
-       }
-
-       public function getDescription() {
-               return array(
-                       'API module for mailing contestants. Selection criteria 
will be joined with AND,
-                       except for the challange ids/titles and contest 
ids/names pairs, which will be joined with OR.'
-               );
-       }
-
        protected function getExamples() {
                return array(
                        'api.php?action=mailcontestants&ids=42',
diff --git a/api/ApiQueryChallenges.php b/api/ApiQueryChallenges.php
index d016a65..525160b 100644
--- a/api/ApiQueryChallenges.php
+++ b/api/ApiQueryChallenges.php
@@ -47,14 +47,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for querying contest challenges';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiQueryContestComments.php b/api/ApiQueryContestComments.php
index 52f6760..4a95859 100644
--- a/api/ApiQueryContestComments.php
+++ b/api/ApiQueryContestComments.php
@@ -47,14 +47,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for querying contest comments';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiQueryContestants.php b/api/ApiQueryContestants.php
index d632faa..5a607e3 100644
--- a/api/ApiQueryContestants.php
+++ b/api/ApiQueryContestants.php
@@ -47,14 +47,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for querying contestants';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiQueryContests.php b/api/ApiQueryContests.php
index 10136b4..eb5e35d 100644
--- a/api/ApiQueryContests.php
+++ b/api/ApiQueryContests.php
@@ -47,14 +47,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for querying contests';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/i18n/en.json b/i18n/en.json
index 52458d6..22caffd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -195,5 +195,56 @@
        "contest-submission-current-submission": "This is the URL to your 
submission, which you can modify until the deadline.",
        "contest-submission-challenge": "You are currently participating in the 
$1 challenge.",
        "contest-submission-challenge-description": "'''Current challenge: 
$1''' -- $2",
-       "contest-submission-domains": "Submissions are restricted to 
{{PLURAL:$2|this site|these sites}}: $1"
-}
\ No newline at end of file
+       "contest-submission-domains": "Submissions are restricted to 
{{PLURAL:$2|this site|these sites}}: $1",
+       "apihelp-deletecontest-summary": "API module for deleting contests.",
+       "apihelp-deletecontest-param-ids": "The IDs of the contests to delete.",
+       "apihelp-deletecontest-param-token": "Edit token, salted with the 
contest id.",
+       "apihelp-mailcontestants-summary": "API module for mailing 
contestants.",
+       "apihelp-mailcontestants-extended-description": "Selection criteria 
will be joined with AND, except for the challange ids/titles and contest 
ids/names pairs, which will be joined with OR.",
+       "apihelp-mailcontestants-param-page": "Name of the page from which to 
pull content for the email body.",
+       "apihelp-mailcontestants-param-ids": "The IDs of the contestants to 
mail.",
+       "apihelp-mailcontestants-param-contestids": "The IDs of the contests 
where of the contestants should be mailed.",
+       "apihelp-mailcontestants-param-contestnames": "The names of the 
contests where of the contestants should be mailed.",
+       "apihelp-mailcontestants-param-challengeids": "The IDs of the 
challenges where of the contestants should be mailed.",
+       "apihelp-mailcontestants-param-challengetitles": "The titles of the 
challenges where of the contestants should be mailed.",
+       "apihelp-mailcontestants-param-token": "Edit token.",
+       "apihelp-query+challenges-summary": "API module for querying contest 
challenges.",
+       "apihelp-query+challenges-param-contest_id": "The contest id.",
+       "apihelp-query+challenges-param-text": "Full challenge description.",
+       "apihelp-query+challenges-param-title": "Title of the challenge.",
+       "apihelp-query+challenges-param-oneline": "One line description of the 
challenge.",
+       "apihelp-query+contestants-summary": "API module for querying 
contestants.",
+       "apihelp-query+contestants-param-contest_id": "The contest id.",
+       "apihelp-query+contestants-param-challenge_id": "The challenge id.",
+       "apihelp-query+contestants-param-user_id": "User id of the contestant.",
+       "apihelp-query+contestants-param-full_name": "Full name of the 
contestant.",
+       "apihelp-query+contestants-param-user_name": "User name of the 
contestant.",
+       "apihelp-query+contestants-param-email": "Email of the contestant.",
+       "apihelp-query+contestants-param-country": "Country code of the 
contestant.",
+       "apihelp-query+contestants-param-volunteer": "If the user is interested 
in volunteer opportunities.",
+       "apihelp-query+contestants-param-wmf": "If the user is interested in a 
WMF job.",
+       "apihelp-query+contestants-param-cv": "URL to the users CV.",
+       "apihelp-query+contestants-param-submission": "URL to the users 
submission.",
+       "apihelp-query+contestants-param-rating": "The average rating of the 
contestant, multiplied by 100 for precision.",
+       "apihelp-query+contestants-param-rating_count": "The number of 
ratings.",
+       "apihelp-query+contestants-param-comments": "The number of comments.",
+       "apihelp-query+contestcomments-summary": "API module for querying 
contest comments.",
+       "apihelp-query+contestcomments-param-contestant_id": "The contestant 
id.",
+       "apihelp-query+contestcomments-param-user_id": "Judge user id.",
+       "apihelp-query+contestcomments-param-text": "The comment text.",
+       "apihelp-query+contestcomments-param-time": "The time at which the 
comment was made.",
+       "apihelp-query+contests-summary": "API module for querying contests.",
+       "apihelp-query+contests-param-name": "String indentifier for the 
contest.",
+       "apihelp-query+contests-param-status": "Status of the contest.",
+       "apihelp-query+contests-param-end": "End time of the contest.",
+       "apihelp-query+contests-param-rules_page": "Name of the page with 
rules.",
+       "apihelp-query+contests-param-opportunities": "Name of the page with 
opportunities.",
+       "apihelp-query+contests-param-intro": "Name of the page with the intro 
text.",
+       "apihelp-query+contests-param-help": "Name of the page with contest 
help.",
+       "apihelp-query+contests-param-signup_email": "Name of the page with the 
signup email text.",
+       "apihelp-query+contests-param-reminder_email": "Name of the page with 
the reminder email text.",
+       "apihelp-query+contests-param-submission_count": "Number of submissions 
made to the contest.",
+       "apihelp-query+contestbase-param-props": "Fields to query.",
+       "apihelp-query+contestbase-param-continue": "Offset number from where 
to continue the query.",
+       "apihelp-query+contestbase-param-limit": "Max amount of rows to return."
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b0e0d2d..7bf36e2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -154,5 +154,56 @@
        "contest-submission-submit": "{{Identical|Submit}}",
        "contest-submission-challenge": "Tells the user which challenge they 
are part of. $1 is the challenge name",
        "contest-submission-challenge-description": "Output of challenge name 
and description. $1 is the challenge name, $2 is the challenge description",
-       "contest-submission-domains": "Shown above the form on the page that 
appears after the user submits initial details. $1 is a list of domains 
(defined in $egContestSettings['submissionDomains']) and $2 is the number of 
domains."
-}
\ No newline at end of file
+       "contest-submission-domains": "Shown above the form on the page that 
appears after the user submits initial details. $1 is a list of domains 
(defined in $egContestSettings['submissionDomains']) and $2 is the number of 
domains.",
+       "apihelp-deletecontest-summary": 
"{{doc-apihelp-summary|deletecontest}}",
+       "apihelp-deletecontest-param-ids": 
"{{doc-apihelp-param|deletecontest|ids}}",
+       "apihelp-deletecontest-param-token": 
"{{doc-apihelp-param|deletecontest|token}}",
+       "apihelp-mailcontestants-summary": 
"{{doc-apihelp-summary|mailcontestants}}",
+       "apihelp-mailcontestants-extended-description": 
"{{doc-apihelp-extended-description|mailcontestants}}",
+       "apihelp-mailcontestants-param-page": 
"{{doc-apihelp-param|mailcontestants|page}}",
+       "apihelp-mailcontestants-param-ids": 
"{{doc-apihelp-param|mailcontestants|ids}}",
+       "apihelp-mailcontestants-param-contestids": 
"{{doc-apihelp-param|mailcontestants|contestids}}",
+       "apihelp-mailcontestants-param-contestnames": 
"{{doc-apihelp-param|mailcontestants|contestnames}}",
+       "apihelp-mailcontestants-param-challengeids": 
"{{doc-apihelp-param|mailcontestants|challengeids}}",
+       "apihelp-mailcontestants-param-challengetitles": 
"{{doc-apihelp-param|mailcontestants|challengetitles}}",
+       "apihelp-mailcontestants-param-token": 
"{{doc-apihelp-param|mailcontestants|token}}",
+       "apihelp-query+challenges-summary": 
"{{doc-apihelp-summary|challenges}}",
+       "apihelp-query+challenges-param-contest_id": 
"{{doc-apihelp-param|query+challenges|contest_id}}",
+       "apihelp-query+challenges-param-text": 
"{{doc-apihelp-param|query+challenges|text}}",
+       "apihelp-query+challenges-param-title": 
"{{doc-apihelp-param|query+challenges|title}}",
+       "apihelp-query+challenges-param-oneline": 
"{{doc-apihelp-param|query+challenges|oneline}}",
+       "apihelp-query+contestants-summary": 
"{{doc-apihelp-summary|contestants}}",
+       "apihelp-query+contestants-param-contest_id": 
"{{doc-apihelp-param|query+contestants|contest_id}}",
+       "apihelp-query+contestants-param-challenge_id": 
"{{doc-apihelp-param|query+contestants|challenge_id}}",
+       "apihelp-query+contestants-param-user_id": 
"{{doc-apihelp-param|query+contestants|user_id}}",
+       "apihelp-query+contestants-param-full_name": 
"{{doc-apihelp-param|query+contestants|full_name}}",
+       "apihelp-query+contestants-param-user_name": 
"{{doc-apihelp-param|query+contestants|user_name}}",
+       "apihelp-query+contestants-param-email": 
"{{doc-apihelp-param|query+contestants|email}}",
+       "apihelp-query+contestants-param-country": 
"{{doc-apihelp-param|query+contestants|country}}",
+       "apihelp-query+contestants-param-volunteer": 
"{{doc-apihelp-param|query+contestants|volunteer}}",
+       "apihelp-query+contestants-param-wmf": 
"{{doc-apihelp-param|query+contestants|wmf}}",
+       "apihelp-query+contestants-param-cv": 
"{{doc-apihelp-param|query+contestants|cv}}",
+       "apihelp-query+contestants-param-submission": 
"{{doc-apihelp-param|query+contestants|submission}}",
+       "apihelp-query+contestants-param-rating": 
"{{doc-apihelp-param|query+contestants|rating}}",
+       "apihelp-query+contestants-param-rating_count": 
"{{doc-apihelp-param|query+contestants|rating_count}}",
+       "apihelp-query+contestants-param-comments": 
"{{doc-apihelp-param|query+contestants|comments}}",
+       "apihelp-query+contestcomments-summary": 
"{{doc-apihelp-summary|contestcomments}}",
+       "apihelp-query+contestcomments-param-contestant_id": 
"{{doc-apihelp-param|query+contestcomments|contestant_id}}",
+       "apihelp-query+contestcomments-param-user_id": 
"{{doc-apihelp-param|query+contestcomments|user_id}}",
+       "apihelp-query+contestcomments-param-text": 
"{{doc-apihelp-param|query+contestcomments|text}}",
+       "apihelp-query+contestcomments-param-time": 
"{{doc-apihelp-param|query+contestcomments|time}}",
+       "apihelp-query+contests-summary": "{{doc-apihelp-summary|contests}}",
+       "apihelp-query+contests-param-name": 
"{{doc-apihelp-param|query+contests|name}}",
+       "apihelp-query+contests-param-status": 
"{{doc-apihelp-param|query+contests|status}}",
+       "apihelp-query+contests-param-end": 
"{{doc-apihelp-param|query+contests|end}}",
+       "apihelp-query+contests-param-rules_page": 
"{{doc-apihelp-param|query+contests|rules_page}}",
+       "apihelp-query+contests-param-opportunities": 
"{{doc-apihelp-param|query+contests|opportunities}}",
+       "apihelp-query+contests-param-intro": 
"{{doc-apihelp-param|query+contests|intro}}",
+       "apihelp-query+contests-param-help": 
"{{doc-apihelp-param|query+contests|help}}",
+       "apihelp-query+contests-param-signup_email": 
"{{doc-apihelp-param|query+contests|signup_email}}",
+       "apihelp-query+contests-param-reminder_email": 
"{{doc-apihelp-param|query+contests|reminder_email}}",
+       "apihelp-query+contests-param-submission_count": 
"{{doc-apihelp-param|query+contests|submission_count}}",
+       "apihelp-query+contestbase-param-props": 
"{{doc-apihelp-param|contestbase|props}}",
+       "apihelp-query+contestbase-param-continue": 
"{{doc-apihelp-param|contestbase|continue}}",
+       "apihelp-query+contestbase-param-limit": 
"{{doc-apihelp-param|contestbase|limit}}"
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/369916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I75e4624f151d3435484ad6e36edeb41ea0b83668
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Contest
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to