Sn1per has uploaded a new change for review.

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

Change subject: Convert API help to use i18n
......................................................................

Convert API help to use i18n

  - API php modified to use new i18n messages
  - i18n messages edited to add said messages

Bug: T76887
Change-Id: Iee51f4dd0ba8dbfb464337071fc37d0c9c956d25
---
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiResponse.php
3 files changed, 22 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiGrok 
refs/changes/68/179768/1

diff --git a/i18n/en.json b/i18n/en.json
index 2d9475a..a4165fd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,6 +3,17 @@
                "authors": ["Max Semenik"]
        },
        "wikigrok-desc": "Creates an easy way to fill in missing Wikidata 
information",
+       "apihelp-wikigrokresponse-description": "Processes a user's WikiGrok 
answers.",
+       "apihelp-wikigrokresponse-param-page_id": "The ID of the page",
+       "apihelp-wikigrokresponse-param-user_token": "The user's token",
+       "apihelp-wikigrokresponse-param-subject_id": "The WikiData ID of the 
subject of the page",
+       "apihelp-wikigrokresponse-param-subject": "The label (in English) of 
the subject of the page",
+       "apihelp-wikigrokresponse-param-task_token": "The unique WikiGrok 
instance token",
+       "apihelp-wikigrokresponse-param-task_type": "The version of WikiGrok 
that the user interacted with",
+       "apihelp-wikigrokresponse-param-campaign_name": "The name of the 
WikiGrok campaign the response was generated from",
+       "apihelp-wikigrokresponse-param-claims": "The JSON encoded claims that 
the user submitted",
+       "apihelp-wikigrokresponse-param-mobile_mode": "The version of 
MobileFrontend that the user was using",
+       "apihelp-wikigrokresponse-param-testing": "Whether or not the user is 
testing WikiGrok",
        "apihelp-query+wikigrokrandom-description": "Returns a random page 
belonging to a WikiGrok campaign",
        "apihelp-query+wikigrokrandom-example-1": "Get a random page",
        "apihelp-query+wikigrokrandom-example-2": "Get a random page belonging 
to a particular campaign",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e17a6cb..6bfb72f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,6 +5,17 @@
                ]
        },
        "wikigrok-desc": "{{desc}}",
+       "apihelp-wikigrokresponse-description": "",
+       "apihelp-wikigrokresponse-param-page_id": "",
+       "apihelp-wikigrokresponse-param-user_token": "",
+       "apihelp-wikigrokresponse-param-subject_id": "",
+       "apihelp-wikigrokresponse-param-subject": "",
+       "apihelp-wikigrokresponse-param-task_token": "",
+       "apihelp-wikigrokresponse-param-task_type": "",
+       "apihelp-wikigrokresponse-param-campaign_name": "",
+       "apihelp-wikigrokresponse-param-claims": "",
+       "apihelp-wikigrokresponse-param-mobile_mode": "",
+       "apihelp-wikigrokresponse-param-testing": "",
        "apihelp-query+wikigrokrandom-description": 
"{{doc-apihelp-description|query+wikigrokrandom}}",
        "apihelp-query+wikigrokrandom-example-1": 
"{{doc-apihelp-example|query+wikigrokrandom}}",
        "apihelp-query+wikigrokrandom-example-2": 
"{{doc-apihelp-example|query+wikigrokrandom}}",
diff --git a/includes/api/ApiResponse.php b/includes/api/ApiResponse.php
index f8de055..8b15d7b 100644
--- a/includes/api/ApiResponse.php
+++ b/includes/api/ApiResponse.php
@@ -183,35 +183,6 @@
                );
        }
 
-       /**
-        * Gets the descriptions of the allowed parameters.
-        *
-        * @return array
-        */
-       public function getParamDescription() {
-               return array(
-                       'page_id' => 'The ID of the page',
-                       'user_token' => "The user's token",
-                       'subject_id' => 'The WikiData ID of the subject of the 
page',
-                       'subject' => 'The label (in English) of the subject of 
the page',
-                       'task_token' => 'The unique WikiGrok instance token',
-                       'task_type' => 'The version of WikiGrok that the user 
interacted with',
-                       'campaign_name' => 'The name of the WikiGrok campaign 
the response was generated from',
-                       'claims' => 'The JSON encoded claims that the user 
submitted',
-                       'mobile_mode' => 'The version of MobileFrontend that 
the user was using',
-                       'testing' => 'Whether or not the user is testing 
WikiGrok',
-               );
-       }
-
-       /**
-        * Get the description of the action.
-        *
-        * @return string
-        */
-       public function getDescription() {
-               return "Processes a user's WikiGrok answers.";
-       }
-
        // FIXME: Document this action on mw.org.
        //public function getHelpUrls() {
        //      return 
'https://www.mediawiki.org/wiki/Extension:MobileFrontend#action.3Dwikigrokresponse';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee51f4dd0ba8dbfb464337071fc37d0c9c956d25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiGrok
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>

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

Reply via email to