[MediaWiki-commits] [Gerrit] Add i18n for API module help - change (mediawiki...PollNY)

2015-01-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add i18n for API module help
..


Add i18n for API module help

Bug: T76888
Change-Id: I1c7bf76a9c1808273c45bcc3f95847f36199
---
M ApiPollNY.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 56 insertions(+), 6 deletions(-)

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



diff --git a/ApiPollNY.php b/ApiPollNY.php
index 1cc38f5..f61cbc6 100644
--- a/ApiPollNY.php
+++ b/ApiPollNY.php
@@ -211,7 +211,7 @@
}
 
/**
-* @return String: human-readable module description
+* @deprecated since MediaWiki core 1.25
 */
public function getDescription() {
return 'PollNY API - includes both user and admin functions';
@@ -244,7 +244,9 @@
);
}
 
-   // Describe the parameter
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getParamDescription() {
return array_merge( parent::getParamDescription(), array(
'what' = 'What to do?',
@@ -256,7 +258,9 @@
) );
}
 
-   // Get examples
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getExamples() {
return array(
'api.php?action=pollnywhat=deletepollID=66' = 
'Deletes the poll #66',
@@ -267,4 +271,24 @@
'api.php?action=pollnywhat=votepollID=33choiceID=4' 
= 'Votes (answers) the poll #33 with the 4th choice',
);
}
-}
\ No newline at end of file
+
+   /**
+* @see ApiBase::getExamplesMessages()
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=pollnywhat=deletepollID=66'
+   = 'apihelp-pollny-example-1',
+   'action=pollnywhat=getPollResultspollID=666'
+   = 'apihelp-pollny-example-2',
+   'action=pollnywhat=getRandom'
+   = 'apihelp-pollny-example-3',
+   
'action=pollnywhat=titleExistspageName=Is%20PollNY%20awesome%3F'
+   = 'apihelp-pollny-example-4',
+   'action=pollnywhat=updateStatuspollID=47status=1'
+   = 'apihelp-pollny-example-5',
+   'action=pollnywhat=votepollID=33choiceID=4'
+   = 'apihelp-pollny-example-6'
+   );
+   }
+}
diff --git a/i18n/en.json b/i18n/en.json
index ba654bb..3f4e5dc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -91,5 +91,18 @@
 poll-time-minutes: {{PLURAL:$1|one minute|$1 minutes}},
 poll-time-seconds: {{PLURAL:$1|one second|$1 seconds}},
 specialpages-group-poll: Polls,
-right-polladmin: Administer polls
+right-polladmin: Administer polls,
+apihelp-pollny-description: PollNY API - includes both user and admin 
functions.,
+apihelp-pollny-param-what: What to do?,
+apihelp-pollny-param-choiceID: Same as clicking the choiceIDth choice 
via the GUI; only used when what=vote.,
+apihelp-pollny-param-pageName: Title to check for (only used when 
what=titleExists); should be URL-encoded.,
+apihelp-pollny-param-pollID: Poll ID of the poll that is being 
deleted/updated/voted for.,
+apihelp-pollny-param-pageID: Page ID (only used when 
what=getPollResults).,
+apihelp-pollny-param-status: New status of the poll (when 
what=updateStatus); possible values are 0 (=closed), 1 and 2 (=flagged).,
+apihelp-pollny-example-1: Deletes the poll #66,
+apihelp-pollny-example-2: Gets the results of the poll #666,
+apihelp-pollny-example-3: Gets a random poll to which the current user 
hasn't answered yet,
+apihelp-pollny-example-4: Checks if there is already a poll with the 
title \Is PollNY awesome?\,
+apihelp-pollny-example-5: Sets the status of the poll #47 to 1 (=open); 
possible status values are 0 (=closed), 1 and 2 (=flagged),
+apihelp-pollny-example-6: Votes (answers) the poll #33 with the 4th 
choice
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b502890..e1104ed 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -93,5 +93,18 @@
poll-time-minutes: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of minutes\n{{Related|Poll-time}}\n{{Identical|Minute}},
poll-time-seconds: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of seconds\n{{Related|Poll-time}}\n{{Identical|Second}},
specialpages-group-poll: {{doc-special-group}}\n{{Identical|Poll}},
-   right-polladmin: {{doc-right|polladmin}}
+   right-polladmin: {{doc-right|polladmin}},
+  

[MediaWiki-commits] [Gerrit] Add i18n for API module help - change (mediawiki...PollNY)

2014-12-18 Thread M4tx (Code Review)
M4tx has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/180776

Change subject: Add i18n for API module help
..

Add i18n for API module help

Bug: T76888
Change-Id: I1c7bf76a9c1808273c45bcc3f95847f36199
---
M ApiPollNY.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 56 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PollNY 
refs/changes/76/180776/1

diff --git a/ApiPollNY.php b/ApiPollNY.php
index 1cc38f5..f61cbc6 100644
--- a/ApiPollNY.php
+++ b/ApiPollNY.php
@@ -211,7 +211,7 @@
}
 
/**
-* @return String: human-readable module description
+* @deprecated since MediaWiki core 1.25
 */
public function getDescription() {
return 'PollNY API - includes both user and admin functions';
@@ -244,7 +244,9 @@
);
}
 
-   // Describe the parameter
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getParamDescription() {
return array_merge( parent::getParamDescription(), array(
'what' = 'What to do?',
@@ -256,7 +258,9 @@
) );
}
 
-   // Get examples
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getExamples() {
return array(
'api.php?action=pollnywhat=deletepollID=66' = 
'Deletes the poll #66',
@@ -267,4 +271,24 @@
'api.php?action=pollnywhat=votepollID=33choiceID=4' 
= 'Votes (answers) the poll #33 with the 4th choice',
);
}
-}
\ No newline at end of file
+
+   /**
+* @see ApiBase::getExamplesMessages()
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=pollnywhat=deletepollID=66'
+   = 'apihelp-pollny-example-1',
+   'action=pollnywhat=getPollResultspollID=666'
+   = 'apihelp-pollny-example-2',
+   'action=pollnywhat=getRandom'
+   = 'apihelp-pollny-example-3',
+   
'action=pollnywhat=titleExistspageName=Is%20PollNY%20awesome%3F'
+   = 'apihelp-pollny-example-4',
+   'action=pollnywhat=updateStatuspollID=47status=1'
+   = 'apihelp-pollny-example-5',
+   'action=pollnywhat=votepollID=33choiceID=4'
+   = 'apihelp-pollny-example-6'
+   );
+   }
+}
diff --git a/i18n/en.json b/i18n/en.json
index ba654bb..3f4e5dc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -91,5 +91,18 @@
 poll-time-minutes: {{PLURAL:$1|one minute|$1 minutes}},
 poll-time-seconds: {{PLURAL:$1|one second|$1 seconds}},
 specialpages-group-poll: Polls,
-right-polladmin: Administer polls
+right-polladmin: Administer polls,
+apihelp-pollny-description: PollNY API - includes both user and admin 
functions.,
+apihelp-pollny-param-what: What to do?,
+apihelp-pollny-param-choiceID: Same as clicking the choiceIDth choice 
via the GUI; only used when what=vote.,
+apihelp-pollny-param-pageName: Title to check for (only used when 
what=titleExists); should be URL-encoded.,
+apihelp-pollny-param-pollID: Poll ID of the poll that is being 
deleted/updated/voted for.,
+apihelp-pollny-param-pageID: Page ID (only used when 
what=getPollResults).,
+apihelp-pollny-param-status: New status of the poll (when 
what=updateStatus); possible values are 0 (=closed), 1 and 2 (=flagged).,
+apihelp-pollny-example-1: Deletes the poll #66,
+apihelp-pollny-example-2: Gets the results of the poll #666,
+apihelp-pollny-example-3: Gets a random poll to which the current user 
hasn't answered yet,
+apihelp-pollny-example-4: Checks if there is already a poll with the 
title \Is PollNY awesome?\,
+apihelp-pollny-example-5: Sets the status of the poll #47 to 1 (=open); 
possible status values are 0 (=closed), 1 and 2 (=flagged),
+apihelp-pollny-example-6: Votes (answers) the poll #33 with the 4th 
choice
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b502890..e1104ed 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -93,5 +93,18 @@
poll-time-minutes: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of minutes\n{{Related|Poll-time}}\n{{Identical|Minute}},
poll-time-seconds: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of seconds\n{{Related|Poll-time}}\n{{Identical|Second}},
specialpages-group-poll: {{doc-special-group}}\n{{Identical|Poll}},
-   right-polladmin: {{doc-right|polladmin}}
+