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

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


Add apihelp messages to pass unit tests

Bug: T155031
Change-Id: Id905fb03ca0abbf06a635bdf905626fcd374897c
---
M api/ApiAddSurvey.php
M api/ApiDeleteSurvey.php
M api/ApiEditSurvey.php
M api/ApiQuerySurveyAnswers.php
M api/ApiQuerySurveySubmissions.php
M api/ApiQuerySurveys.php
M api/ApiSubmitSurvey.php
M i18n/en.json
M i18n/qqq.json
9 files changed, 122 insertions(+), 129 deletions(-)

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



diff --git a/api/ApiAddSurvey.php b/api/ApiAddSurvey.php
index 530f14a..1751ad6 100644
--- a/api/ApiAddSurvey.php
+++ b/api/ApiAddSurvey.php
@@ -91,22 +91,6 @@
                return array_merge( Survey::getAPIParams(), $params );
        }
        
-       public function getParamDescription() {
-               return array(
-                       'name' => 'The name of the survey',
-                       'enabled' => 'Enable the survey or not',
-                       'questions' => 'The questions that make up the survey',
-                       'token' => 'Edit token. You can get one of these 
through prop=info.',
-               );
-       }
-       
-       public function getDescription() {
-               return array(
-                       'API module for adding surveys.'
-               );
-       }
-
-
        protected function getExamples() {
                return array(
                        'api.php?action=addsurvey&name=My awesome 
survey&enabled=1&questions=',
diff --git a/api/ApiDeleteSurvey.php b/api/ApiDeleteSurvey.php
index 3351c3d..a96f3d4 100644
--- a/api/ApiDeleteSurvey.php
+++ b/api/ApiDeleteSurvey.php
@@ -69,19 +69,6 @@
                );
        }
        
-       public function getParamDescription() {
-               return array(
-                       'ids' => 'The IDs of the surveys to delete',
-                       'token' => 'Edit token. You can get one of these 
through prop=info.',
-               );
-       }
-       
-       public function getDescription() {
-               return array(
-                       'API module for deleting surveys.'
-               );
-       }
-
        protected function getExamples() {
                return array(
                        'api.php?action=deletesurvey&ids=42',
diff --git a/api/ApiEditSurvey.php b/api/ApiEditSurvey.php
index fb41465..eaac613 100644
--- a/api/ApiEditSurvey.php
+++ b/api/ApiEditSurvey.php
@@ -81,22 +81,6 @@
                return array_merge( Survey::getAPIParams(), $params );
        }
        
-       public function getParamDescription() {
-               return array(
-                       'id' => 'The ID of the survey to modify',
-                       'name' => 'The name of the survey',
-                       'enabled' => 'Enable the survey or not',
-                       'questions' => 'The questions that make up the survey',
-                       'token' => 'Edit token. You can get one of these 
through prop=info.',
-               );
-       }
-       
-       public function getDescription() {
-               return array(
-                       'API module for editing a survey.'
-               );
-       }
-
        protected function getExamples() {
                return array(
                        'api.php?action=editsurvey&',
diff --git a/api/ApiQuerySurveyAnswers.php b/api/ApiQuerySurveyAnswers.php
index 9f8d38e..70e2d65 100644
--- a/api/ApiQuerySurveyAnswers.php
+++ b/api/ApiQuerySurveyAnswers.php
@@ -101,28 +101,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getParamDescription()
-        */
-       public function getParamDescription() {
-               $descs = array (
-                       'props' => 'Survey data to query',
-                       'continue' => 'Offset number from where to continue the 
query',
-                       'limit' => 'Max amount of words to return',
-               );
-               
-               return array_merge( SurveyAnswer::getFieldDescriptions(), 
$descs );
-       }
-
-       /**
-        * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for obatining survey answers';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiQuerySurveySubmissions.php 
b/api/ApiQuerySurveySubmissions.php
index 54ac23c..4a7d66e 100644
--- a/api/ApiQuerySurveySubmissions.php
+++ b/api/ApiQuerySurveySubmissions.php
@@ -101,28 +101,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getParamDescription()
-        */
-       public function getParamDescription() {
-               $descs = array (
-                       'props' => 'Survey data to query',
-                       'continue' => 'Offset number from where to continue the 
query',
-                       'limit' => 'Max amount of words to return',
-               );
-               
-               return array_merge( SurveySubmission::getFieldDescriptions(), 
$descs );
-       }
-
-       /**
-        * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for obatining survey submissions';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiQuerySurveys.php b/api/ApiQuerySurveys.php
index b2912cf..336b4b8 100644
--- a/api/ApiQuerySurveys.php
+++ b/api/ApiQuerySurveys.php
@@ -158,30 +158,6 @@
 
        /**
         * (non-PHPdoc)
-        * @see includes/api/ApiBase#getParamDescription()
-        */
-       public function getParamDescription() {
-               return array (
-                       'ids' => 'The IDs of the surveys to return',
-                       'names' => 'The names of the surveys to return',
-                       'incquestions' => 'Include the questions of the surveys 
or not',
-                       'enabled' => 'Enabled state to filter on',
-                       'props' => 'Survey data to query',
-                       'continue' => 'Offset number from where to continue the 
query',
-                       'limit' => 'Max amount of words to return',
-               );
-       }
-
-       /**
-        * (non-PHPdoc)
-        * @see includes/api/ApiBase#getDescription()
-        */
-       public function getDescription() {
-               return 'API module for obatining surveys and optionaly their 
questions';
-       }
-
-       /**
-        * (non-PHPdoc)
         * @see includes/api/ApiBase#getExamples()
         */
        protected function getExamples() {
diff --git a/api/ApiSubmitSurvey.php b/api/ApiSubmitSurvey.php
index 603a55f..84dfc3f 100644
--- a/api/ApiSubmitSurvey.php
+++ b/api/ApiSubmitSurvey.php
@@ -87,20 +87,6 @@
                );
        }
        
-       public function getParamDescription() {
-               return array(
-                       'id' => 'The ID of the survey being submitted.',
-                       'name' => 'The name of the survey being submitted.',
-                       'token' => 'Edit token. You can get one of these 
through prop=info.',
-               );
-       }
-       
-       public function getDescription() {
-               return array(
-                       ''
-               );
-       }
-
        protected function getExamples() {
                return array(
                        'api.php?action=submitsurvey&',
diff --git a/i18n/en.json b/i18n/en.json
index 18028bc..70c18fd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -101,5 +101,65 @@
        "survey-special-label-answers": "Available answers, one per line.",
        "survey-jquery-submit": "Submit",
        "survey-jquery-finish": "Finish",
-       "survey-jquery-load-failed": "Could not load the survey."
+       "survey-jquery-load-failed": "Could not load the survey.",
+       "apihelp-addsurvey-summary": "API module for adding surveys.",
+       "apihelp-addsurvey-param-name": "The name of the survey.",
+       "apihelp-addsurvey-param-enabled": "Enable the survey or not.",
+       "apihelp-addsurvey-param-questions": "The questions that make up the 
survey.",
+       "apihelp-addsurvey-param-token": "Edit token. You can get one of these 
through prop=info.",
+       "apihelp-addsurvey-param-title": "Title of the survey.",
+       "apihelp-addsurvey-param-header": "Text to display above the survey.",
+       "apihelp-addsurvey-param-footer": "Text to display below the survey.",
+       "apihelp-addsurvey-param-thanks": "Text to display after survey 
submission.",
+       "apihelp-addsurvey-param-user_type": "Type of users that can 
participate in the survey.",
+       "apihelp-addsurvey-param-namespaces": "Namespaces on which the survey 
can be displayed.",
+       "apihelp-addsurvey-param-ratio": "Percentage of users to show the 
survey to.",
+       "apihelp-addsurvey-param-expiry": "Coockie expiry time for the survey.",
+       "apihelp-addsurvey-param-min_pages": "Min amount of pages the user 
needs to view before getting the survey.",
+       "apihelp-deletesurvey-summary": "API module for deleting surveys.",
+       "apihelp-deletesurvey-param-ids": "The IDs of the surveys to delete.",
+       "apihelp-deletesurvey-param-token": "Edit token. You can get one of 
these through prop=info.",
+       "apihelp-editsurvey-summary": "API module for editing a survey.",
+       "apihelp-editsurvey-param-id": "The ID of the survey to modify.",
+       "apihelp-editsurvey-param-name": "The name of the survey.",
+       "apihelp-editsurvey-param-enabled": "Enable the survey or not.",
+       "apihelp-editsurvey-param-questions": "The questions that make up the 
survey.",
+       "apihelp-editsurvey-param-token": "Edit token. You can get one of these 
through prop=info.",
+       "apihelp-editsurvey-param-title": "Title of the survey.",
+       "apihelp-editsurvey-param-header": "Text to display above the survey.",
+       "apihelp-editsurvey-param-footer": "Text to display below the survey.",
+       "apihelp-editsurvey-param-thanks": "Text to display after survey 
submission.",
+       "apihelp-editsurvey-param-user_type": "Type of users that can 
participate in the survey.",
+       "apihelp-editsurvey-param-namespaces": "Namespaces on which the survey 
can be displayed.",
+       "apihelp-editsurvey-param-ratio": "Percentage of users to show the 
survey to.",
+       "apihelp-editsurvey-param-expiry": "Coockie expiry time for the 
survey.",
+       "apihelp-editsurvey-param-min_pages": "Min amount of pages the user 
needs to view before getting the survey.",
+       "apihelp-submitsurvey-summary": "API module to submit a survey.",
+       "apihelp-submitsurvey-param-id": "The ID of the survey being 
submitted.",
+       "apihelp-submitsurvey-param-name": "The name of the survey being 
submitted.",
+       "apihelp-submitsurvey-param-token": "Edit token. You can get one of 
these through prop=info.",
+       "apihelp-submitsurvey-param-answers": "Answers to use for this survey.",
+       "apihelp-query+surveys-summary": "API module for obatining surveys and 
optionaly their questions.",
+       "apihelp-query+surveys-param-ids": "The IDs of the surveys to return.",
+       "apihelp-query+surveys-param-names": "The names of the surveys to 
return.",
+       "apihelp-query+surveys-param-incquestions": "Include the questions of 
the surveys or not.",
+       "apihelp-query+surveys-param-enabled": "Enabled state to filter on.",
+       "apihelp-query+surveys-param-props": "Survey data to query.",
+       "apihelp-query+surveys-param-continue": "Offset number from where to 
continue the query.",
+       "apihelp-query+surveys-param-limit": "Max amount of words to return.",
+       "apihelp-query+surveyanswers-summary": "API module for obatining survey 
answers.",
+       "apihelp-query+surveyanswers-param-props": "Survey data to query.",
+       "apihelp-query+surveyanswers-param-continue": "Offset number from where 
to continue the query.",
+       "apihelp-query+surveyanswers-param-limit": "Max amount of words to 
return.",
+       "apihelp-query+surveyanswers-param-text": "The answer text.",
+       "apihelp-query+surveyanswers-param-submission_id": "The ID of the 
submission this answer is part of.",
+       "apihelp-query+surveyanswers-param-question_id": "The ID of the 
question this answer corresponds to.",
+       "apihelp-query+surveysubmissions-summary": "API module for obatining 
survey submissions.",
+       "apihelp-query+surveysubmissions-param-props": "Survey data to query.",
+       "apihelp-query+surveysubmissions-param-continue": "Offset number from 
where to continue the query.",
+       "apihelp-query+surveysubmissions-param-limit": "Max amount of words to 
return.",
+       "apihelp-query+surveysubmissions-param-survey_id": "The ID of the 
survey this submission is for.",
+       "apihelp-query+surveysubmissions-param-page_id": "The ID of the page 
this submission was made on.",
+       "apihelp-query+surveysubmissions-param-user_name": "The name of the 
user that made the submission (username or IP).",
+       "apihelp-query+surveysubmissions-param-time": "Timestamp idnicating 
when the submission was made."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 0ee5bba..92f118a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -111,5 +111,65 @@
        "survey-special-label-answers": "Used as description text",
        "survey-jquery-submit": "{{Identical|Submit}}",
        "survey-jquery-finish": "{{Identical|Finish}}",
-       "survey-jquery-load-failed": "Used as error message"
+       "survey-jquery-load-failed": "Used as error message",
+       "apihelp-addsurvey-summary": "{{doc-apihelp-summary|addsurvey}}",
+       "apihelp-addsurvey-param-name": "{{doc-apihelp-param|addsurvey|name}}",
+       "apihelp-addsurvey-param-enabled": 
"{{doc-apihelp-param|addsurvey|enabled}}",
+       "apihelp-addsurvey-param-questions": 
"{{doc-apihelp-param|addsurvey|questions}}",
+       "apihelp-addsurvey-param-token": 
"{{doc-apihelp-param|addsurvey|token}}",
+       "apihelp-addsurvey-param-title": 
"{{doc-apihelp-param|addsurvey|title}}",
+       "apihelp-addsurvey-param-header": 
"{{doc-apihelp-param|addsurvey|header}}",
+       "apihelp-addsurvey-param-footer": 
"{{doc-apihelp-param|addsurvey|footer}}",
+       "apihelp-addsurvey-param-thanks": 
"{{doc-apihelp-param|addsurvey|thanks}}",
+       "apihelp-addsurvey-param-user_type": 
"{{doc-apihelp-param|addsurvey|user_type}}",
+       "apihelp-addsurvey-param-namespaces": 
"{{doc-apihelp-param|addsurvey|namespaces}}",
+       "apihelp-addsurvey-param-ratio": 
"{{doc-apihelp-param|addsurvey|ratio}}",
+       "apihelp-addsurvey-param-expiry": 
"{{doc-apihelp-param|addsurvey|expiry}}",
+       "apihelp-addsurvey-param-min_pages": 
"{{doc-apihelp-param|addsurvey|min_pages}}",
+       "apihelp-deletesurvey-summary": "{{doc-apihelp-summary|deletesurvey}}",
+       "apihelp-deletesurvey-param-ids": 
"{{doc-apihelp-param|deletesurvey|ids}}",
+       "apihelp-deletesurvey-param-token": 
"{{doc-apihelp-param|deletesurvey|token}}",
+       "apihelp-editsurvey-summary": "{{doc-apihelp-summary|editsurvey}}",
+       "apihelp-editsurvey-param-id": "{{doc-apihelp-param|editsurvey|id}}",
+       "apihelp-editsurvey-param-name": 
"{{doc-apihelp-param|editsurvey|name}}",
+       "apihelp-editsurvey-param-enabled": 
"{{doc-apihelp-param|editsurvey|enabled}}",
+       "apihelp-editsurvey-param-questions": 
"{{doc-apihelp-param|editsurvey|questions}}",
+       "apihelp-editsurvey-param-token": 
"{{doc-apihelp-param|editsurvey|token}}",
+       "apihelp-editsurvey-param-title": 
"{{doc-apihelp-param|editsurvey|title}}",
+       "apihelp-editsurvey-param-header": 
"{{doc-apihelp-param|editsurvey|header}}",
+       "apihelp-editsurvey-param-footer": 
"{{doc-apihelp-param|editsurvey|footer}}",
+       "apihelp-editsurvey-param-thanks": 
"{{doc-apihelp-param|editsurvey|thanks}}",
+       "apihelp-editsurvey-param-user_type": 
"{{doc-apihelp-param|editsurvey|user_type}}",
+       "apihelp-editsurvey-param-namespaces": 
"{{doc-apihelp-param|editsurvey|namespaces}}",
+       "apihelp-editsurvey-param-ratio": 
"{{doc-apihelp-param|editsurvey|ratio}}",
+       "apihelp-editsurvey-param-expiry": 
"{{doc-apihelp-param|editsurvey|expiry}}",
+       "apihelp-editsurvey-param-min_pages": 
"{{doc-apihelp-param|editsurvey|min_pages}}",
+       "apihelp-submitsurvey-summary": "{{doc-apihelp-summary|submitsurvey}}",
+       "apihelp-submitsurvey-param-id": 
"{{doc-apihelp-param|submitsurvey|id}}",
+       "apihelp-submitsurvey-param-name": 
"{{doc-apihelp-param|submitsurvey|name}}",
+       "apihelp-submitsurvey-param-token": 
"{{doc-apihelp-param|submitsurvey|token}}",
+       "apihelp-submitsurvey-param-answers": 
"{{doc-apihelp-param|submitsurvey|answers}}",
+       "apihelp-query+surveys-summary": 
"{{doc-apihelp-summary|query+surveys}}",
+       "apihelp-query+surveys-param-ids": 
"{{doc-apihelp-param|query+surveys|ids}}",
+       "apihelp-query+surveys-param-names": 
"{{doc-apihelp-param|query+surveys|names}}",
+       "apihelp-query+surveys-param-incquestions": 
"{{doc-apihelp-param|query+surveys|incquestions}}",
+       "apihelp-query+surveys-param-enabled": 
"{{doc-apihelp-param|query+surveys|enabled}}",
+       "apihelp-query+surveys-param-props": 
"{{doc-apihelp-param|query+surveys|props}}",
+       "apihelp-query+surveys-param-continue": 
"{{doc-apihelp-param|query+surveys|continue}}",
+       "apihelp-query+surveys-param-limit": 
"{{doc-apihelp-param|query+surveys|limit}}",
+       "apihelp-query+surveyanswers-summary": 
"{{doc-apihelp-summary|query+surveyanswers}}",
+       "apihelp-query+surveyanswers-param-props": 
"{{doc-apihelp-param|query+surveyanswers|props}}",
+       "apihelp-query+surveyanswers-param-continue": 
"{{doc-apihelp-param|query+surveyanswers|continue}}",
+       "apihelp-query+surveyanswers-param-limit": 
"{{doc-apihelp-param|query+surveyanswers|limit}}",
+       "apihelp-query+surveyanswers-param-text": 
"{{doc-apihelp-param|query+surveyanswers|text}}",
+       "apihelp-query+surveyanswers-param-submission_id": 
"{{doc-apihelp-param|query+surveyanswers|submission_id}}",
+       "apihelp-query+surveyanswers-param-question_id": 
"{{doc-apihelp-param|query+surveyanswers|question_id}}",
+       "apihelp-query+surveysubmissions-summary": 
"{{doc-apihelp-summary|query+surveysubmissions}}",
+       "apihelp-query+surveysubmissions-param-props": 
"{{doc-apihelp-param|query+surveysubmissions|props}}",
+       "apihelp-query+surveysubmissions-param-continue": 
"{{doc-apihelp-param|query+surveysubmissions|continue}}",
+       "apihelp-query+surveysubmissions-param-limit": 
"{{doc-apihelp-param|query+surveysubmissions|limit}}",
+       "apihelp-query+surveysubmissions-param-survey_id": 
"{{doc-apihelp-param|query+surveysubmissions|survey_id}}",
+       "apihelp-query+surveysubmissions-param-page_id": 
"{{doc-apihelp-param|query+surveysubmissions|page_id}}",
+       "apihelp-query+surveysubmissions-param-user_name": 
"{{doc-apihelp-param|query+surveysubmissions|user_name}}",
+       "apihelp-query+surveysubmissions-param-time": 
"{{doc-apihelp-param|query+surveysubmissions|time}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id905fb03ca0abbf06a635bdf905626fcd374897c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Survey
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
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