jenkins-bot has submitted this change and it was merged.

Change subject: Add i18n for API module help
......................................................................


Add i18n for API module help

MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
---
M api/ApiGetMarkAsHelpfulItem.php
M api/ApiMarkAsHelpful.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 52 insertions(+), 22 deletions(-)

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



diff --git a/api/ApiGetMarkAsHelpfulItem.php b/api/ApiGetMarkAsHelpfulItem.php
index 587abf5..911240a 100644
--- a/api/ApiGetMarkAsHelpfulItem.php
+++ b/api/ApiGetMarkAsHelpfulItem.php
@@ -69,10 +69,9 @@
                );
        }
 
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
-
+       /**
+        * @deprecated since MediaWiki core 1.25
+        */
        public function getParamDescription() {
                return array(
                        'type' => 'The object type that is being marked as 
helpful',
@@ -82,10 +81,13 @@
                );
        }
 
+       /**
+        * @deprecated since MediaWiki core 1.25
+        */
        public function getDescription() {
                return 'Get a list of all helpful status for an object item';
        }
 
 }
 
-class MWApiGetMarkAsHelpfulItemInvalidPageException extends MWException {}
\ No newline at end of file
+class MWApiGetMarkAsHelpfulItemInvalidPageException extends MWException {}
diff --git a/api/ApiMarkAsHelpful.php b/api/ApiMarkAsHelpful.php
index 18f912a..1f4f512 100644
--- a/api/ApiMarkAsHelpful.php
+++ b/api/ApiMarkAsHelpful.php
@@ -117,10 +117,9 @@
                return true;
        }
 
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
-
+       /**
+        * @deprecated since MediaWiki core 1.25
+        */
        public function getParamDescription() {
                return array(
                        'mahaction' => 'the mark or unmark an item as helpful',
@@ -134,6 +133,9 @@
                );
        }
 
+       /**
+        * @deprecated since MediaWiki core 1.25
+        */
        public function getDescription() {
                return 'Allows users to mark/unmark an object item in the site 
as helpful';
        }
diff --git a/i18n/en.json b/i18n/en.json
index b9822e6..55bf8b2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,13 +1,26 @@
 {
-    "@metadata": {
-        "authors": [
-            "Rob Moen"
-        ]
-    },
-    "markashelpful-desc": "Provides a user interface to mark comments as 
helpful",
-    "mah-mark-text": "Mark as helpful",
-    "mah-you-marked-text": "You think this is helpful",
-    "mah-someone-marked-text": "{{GENDER:$1|$1 thinks this is helpful}}",
-    "mah-undo-mark-text": "undo",
-    "mah-action-error": "There was an error performing this action"
-}
\ No newline at end of file
+       "@metadata": {
+               "authors": [
+                       "Rob Moen"
+               ]
+       },
+       "markashelpful-desc": "Provides a user interface to mark comments as 
helpful",
+       "mah-mark-text": "Mark as helpful",
+       "mah-you-marked-text": "You think this is helpful",
+       "mah-someone-marked-text": "{{GENDER:$1|$1 thinks this is helpful}}",
+       "mah-undo-mark-text": "undo",
+       "mah-action-error": "There was an error performing this action",
+       "apihelp-getmarkashelpfulitem-description": "Get a list of all helpful 
status for an object item.",
+       "apihelp-getmarkashelpfulitem-param-type": "The object type that is 
being marked as helpful.",
+       "apihelp-getmarkashelpfulitem-param-item": "The object item that is 
being marked as helpful.",
+       "apihelp-getmarkashelpfulitem-param-prop": "Which property to get.",
+       "apihelp-getmarkashelpfulitem-param-page": "The page which is 
requesting the item.",
+       "apihelp-markashelpful-description": "Allows users to mark or unmark an 
object item in the site as helpful.",
+       "apihelp-markashelpful-param-mahaction": "Whether to mark or unmark an 
item as helpful.",
+       "apihelp-markashelpful-param-page": "The page which the item to be 
marked is on.",
+       "apihelp-markashelpful-param-type": "The object type that is being 
marked as helpful.",
+       "apihelp-markashelpful-param-item": "The object item that is being 
marked as helpful.",
+       "apihelp-markashelpful-param-useragent": "The User-Agent header of the 
browser.",
+       "apihelp-markashelpful-param-system": "The operating system being 
used.",
+       "apihelp-markashelpful-param-locale": "The locale in use."
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ce82d89..c802a70 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -11,5 +11,18 @@
        "mah-you-marked-text": "Text displayed to the logged in user if they 
mark an item helpful",
        "mah-someone-marked-text": "Used to display username who marked as 
helpful. Parameters:\n* $1 - username, with GENDER support",
        "mah-undo-mark-text": "Text for the the undo mark 
link.\n{{Identical|Undo}}",
-       "mah-action-error": "Generic error message"
+       "mah-action-error": "Generic error message",
+       "apihelp-getmarkashelpfulitem-description": 
"{{doc-apihelp-description|getmarkashelpfulitem}}",
+       "apihelp-getmarkashelpfulitem-param-type": 
"{{doc-apihelp-param|getmarkashelpfulitem|type}}",
+       "apihelp-getmarkashelpfulitem-param-item": 
"{{doc-apihelp-param|getmarkashelpfulitem|item}}",
+       "apihelp-getmarkashelpfulitem-param-prop": 
"{{doc-apihelp-param|getmarkashelpfulitem|prop}}",
+       "apihelp-getmarkashelpfulitem-param-page": 
"{{doc-apihelp-param|getmarkashelpfulitem|page}}",
+       "apihelp-markashelpful-description": 
"{{doc-apihelp-description|markashelpful}}",
+       "apihelp-markashelpful-param-mahaction": 
"{{doc-apihelp-param|markashelpful|mahaction}}",
+       "apihelp-markashelpful-param-page": 
"{{doc-apihelp-param|markashelpful|page}}",
+       "apihelp-markashelpful-param-type": 
"{{doc-apihelp-param|markashelpful|type}}",
+       "apihelp-markashelpful-param-item": 
"{{doc-apihelp-param|markashelpful|item}}",
+       "apihelp-markashelpful-param-useragent": 
"{{doc-apihelp-param|markashelpful|useragent}}",
+       "apihelp-markashelpful-param-system": 
"{{doc-apihelp-param|markashelpful|system}}",
+       "apihelp-markashelpful-param-locale": 
"{{doc-apihelp-param|markashelpful|locale}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MarkAsHelpful
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to