[MediaWiki-commits] [Gerrit] mediawiki...UIFeedback[master]: Fix extension UIFeedback failing tests

2017-01-15 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/332036 )

Change subject: Fix extension UIFeedback failing tests
..


Fix extension UIFeedback failing tests

Extension UIFeedback failing tests due to missing apihelp messages

Bug: T155048
Change-Id: I075200d35e5c2eb9eae85636a70d30b3818fcfd9
---
M ApiUiFeedback.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 150 insertions(+), 137 deletions(-)

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



diff --git a/ApiUiFeedback.php b/ApiUiFeedback.php
index 2c9b06d..3a99620 100644
--- a/ApiUiFeedback.php
+++ b/ApiUiFeedback.php
@@ -151,11 +151,7 @@
 
}
 
-   // Description
-   public function getDescription() {
-   return 'This Api handles requests from the UIFeedback 
Extension';
-   }
-
+   // apihelp-related stuff
// parameter.
public function getAllowedParams() {
return array(
@@ -206,38 +202,11 @@
);
}
 
-   // Describe the parameter
-   public function getParamDescription() {
-   return array_merge( parent::getParamDescription(), array(
-   'mode'   => 'method to use in the api 
(feedback, review, count)',
-   'ui-feedback-anonymous'  => 'true, if the user want to 
post the feedback privately',
-   'ui-feedback-username'   => 'the username of the user ',
-   'ui-feedback-notify' => '1, if the user wants be be 
notified about updated on this issue',
-   'ui-feedback-task'   => 'the task (position in the 
list of tasks)',
-   'ui-feedback-task-other' => 'free text, if other is 
selected in task',
-   'ui-feedback-done'   => '0: no, 1: yes, undefined',
-   'ui-feedback-type'   => '0: Screenshot, 1: 
Questionnaire',
-   'ui-feedback-url'=> 'the url from where the 
feedback came',
-   'ui-feedback-importance' => 'an integer for the 
importance, 0-5',
-   'ui-feedback-happened'   => '0 unknown, 1 not expected, 
2 confused, 3 missing feature, 4 other',
-   'ui-feedback-text1'  => 'the comment (free text)',
-   'ui-feedback-useragent'  => 'the useragent',
-   'file'   => 'binary data (the rendered 
png)',
-   'id' => 'for review-mode: 
feedback-id',
-   'status' => 'for review-mode: 
review-status',
-   'comment'=> 'for review-mode: 
review-comment',
-   'type'   => 'type of stat-request',
-   'click'  => '',
-   'show'   => '',
-   'sent'   => '',
-   ) );
-   }
-
-   // Get examples
-   // TODO
-   public function getExamples() {
-   return array(
-   'api.php?action=apisampleoutput=O_o=xml' => 
'Get a sideways look (and the usual predictions)'
-   );
+   // TODO: Add example
+   /**
+   * @see ApiBase::getExamplesMessages()
+   */
+   protected function getExamplesMessages() {
+   return array();
}
 }
diff --git a/i18n/en.json b/i18n/en.json
index fc8de1a..4126f49 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -104,5 +104,27 @@
"ui-feedback-special-screenshot-error": "something went wrong finding 
the screenshot",
"ui-feedback-special-review": "Review",
"ui-feedback-special-previous-notes": "Previous Notes",
-   "ui-feedback-special-info": "Info"
+   "ui-feedback-special-info": "Info",
+   "apihelp-uifeedback-description": "This Api handles requests from the 
UIFeedback Extension",
+   "apihelp-uifeedback-param-mode": "method to use in the api (feedback, 
review, count)",
+   "apihelp-uifeedback-param-ui-feedback-anonymous": "true, if the user 
want to post the feedback privately",
+   "apihelp-uifeedback-param-ui-feedback-username": "the username of the 
user ",
+   "apihelp-uifeedback-param-ui-feedback-notify": "1, if the user wants be 
be notified about updated on this issue",
+   "apihelp-uifeedback-param-ui-feedback-task": "the task (position in the 
list of tasks)",
+   "apihelp-uifeedback-param-ui-feedback-task-other": "free text, if other 
is selected in task",
+   "apihelp-uifeedback-param-ui-feedback-done": "0: no, 1: yes, undefined",
+   "apihelp-uifeedback-param-ui-feedback-type": "0: Screenshot, 1: 
Questionnaire",
+   "apihelp-uifeedback-param-ui-feedback-url": "the url from where the 
feedback came",
+   

[MediaWiki-commits] [Gerrit] mediawiki...UIFeedback[master]: Fix extension UIFeedback failing tests

2017-01-14 Thread DatGuy (Code Review)
DatGuy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332036 )

Change subject: Fix extension UIFeedback failing tests
..

Fix extension UIFeedback failing tests

Extension UIFeedback failing tests due to missing apihelp messages

Bug: T155048
Change-Id: I075200d35e5c2eb9eae85636a70d30b3818fcfd9
---
M ApiUiFeedback.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 54 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UIFeedback 
refs/changes/36/332036/1

diff --git a/ApiUiFeedback.php b/ApiUiFeedback.php
index 2c9b06d..078 100644
--- a/ApiUiFeedback.php
+++ b/ApiUiFeedback.php
@@ -151,11 +151,7 @@
 
}
 
-   // Description
-   public function getDescription() {
-   return 'This Api handles requests from the UIFeedback 
Extension';
-   }
-
+   // apihelp-related stuff
// parameter.
public function getAllowedParams() {
return array(
@@ -206,38 +202,14 @@
);
}
 
-   // Describe the parameter
-   public function getParamDescription() {
-   return array_merge( parent::getParamDescription(), array(
-   'mode'   => 'method to use in the api 
(feedback, review, count)',
-   'ui-feedback-anonymous'  => 'true, if the user want to 
post the feedback privately',
-   'ui-feedback-username'   => 'the username of the user ',
-   'ui-feedback-notify' => '1, if the user wants be be 
notified about updated on this issue',
-   'ui-feedback-task'   => 'the task (position in the 
list of tasks)',
-   'ui-feedback-task-other' => 'free text, if other is 
selected in task',
-   'ui-feedback-done'   => '0: no, 1: yes, undefined',
-   'ui-feedback-type'   => '0: Screenshot, 1: 
Questionnaire',
-   'ui-feedback-url'=> 'the url from where the 
feedback came',
-   'ui-feedback-importance' => 'an integer for the 
importance, 0-5',
-   'ui-feedback-happened'   => '0 unknown, 1 not expected, 
2 confused, 3 missing feature, 4 other',
-   'ui-feedback-text1'  => 'the comment (free text)',
-   'ui-feedback-useragent'  => 'the useragent',
-   'file'   => 'binary data (the rendered 
png)',
-   'id' => 'for review-mode: 
feedback-id',
-   'status' => 'for review-mode: 
review-status',
-   'comment'=> 'for review-mode: 
review-comment',
-   'type'   => 'type of stat-request',
-   'click'  => '',
-   'show'   => '',
-   'sent'   => '',
-   ) );
-   }
-
-   // Get examples
// TODO
-   public function getExamples() {
+   /**
+   * @see ApiBase::getExamplesMessages()
+   */
+   protected function getExamplesMessages() {
return array(
-   'api.php?action=apisampleoutput=O_o=xml' => 
'Get a sideways look (and the usual predictions)'
+   'api.php?action=apisampleoutput=O_o=xml' 
+   => 'apihelp-uifeedback-example'
);
}
 }
diff --git a/i18n/en.json b/i18n/en.json
index fc8de1a..0cd700f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -104,5 +104,28 @@
"ui-feedback-special-screenshot-error": "something went wrong finding 
the screenshot",
"ui-feedback-special-review": "Review",
"ui-feedback-special-previous-notes": "Previous Notes",
-   "ui-feedback-special-info": "Info"
+   "ui-feedback-special-info": "Info",
+   "apihelp-uifeedback-description": "This Api handles requests from the 
UIFeedback Extension",
+   "apihelp-uifeedback-example": "Get a sideways look (and the usual 
predictions)",
+   "apihelp-uifeedback-param-mode": "method to use in the api (feedback, 
review, count)",
+   "apihelp-uifeedback-param-ui-feedback-anonymous": "true, if the user 
want to post the feedback privately",
+   "apihelp-uifeedback-param-ui-feedback-username": "the username of the 
user ",
+   "apihelp-uifeedback-param-ui-feedback-notify": "1, if the user wants be 
be notified about updated on this issue",
+   "apihelp-uifeedback-param-ui-feedback-task": "the task (position in the 
list of tasks)",
+   "apihelp-uifeedback-param-ui-feedback-task-other": "free text, if other 
is selected in task",
+   "apihelp-uifeedback-param-ui-feedback-done": "0: no, 1: yes, undefined",
+