From c8002996535ee7d945a01b96e5e1f702352dcc63 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 5 Aug 2023 01:47:04 +0200 Subject: [PATCH] i18n: Split apihelp for parameter list=gadgets/gadgetcategories prop= Easier to translate There is no visible change on Special:ApiHelp/query+gadgets Also split for list=gadgetcategories&gcprop= Visible on Special:ApiHelp/query+gadgetcategories Bug: T285545 Change-Id: Ic40326cd747ffe2153cff7d10e0083bd5e51345e --- i18n/api/en.json | 10 ++++++++-- i18n/api/qqq.json | 6 ++++++ includes/Api/ApiQueryGadgetCategories.php | 1 + includes/Api/ApiQueryGadgets.php | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/i18n/api/en.json b/i18n/api/en.json index f08563d8..043aedce 100644 --- a/i18n/api/en.json +++ b/i18n/api/en.json @@ -5,12 +5,18 @@ ] }, "apihelp-query+gadgetcategories-summary": "Returns a list of gadget categories.", - "apihelp-query+gadgetcategories-param-prop": "What gadget category information to get:\n;name:Internal category name.\n;title:Category title.\n;members:Number of gadgets in category.", + "apihelp-query+gadgetcategories-param-prop": "What gadget category information to get:", + "apihelp-query+gadgetcategories-paramvalue-prop-name": "Internal category name.", + "apihelp-query+gadgetcategories-paramvalue-prop-title": "Category title.", + "apihelp-query+gadgetcategories-paramvalue-prop-members": "Number of gadgets in category.", "apihelp-query+gadgetcategories-param-names": "Names of categories to retrieve.", "apihelp-query+gadgetcategories-example-1": "Get a list of existing gadget categories", "apihelp-query+gadgetcategories-example-2": "Get all information about categories named \"foo\" and \"bar\"", "apihelp-query+gadgets-summary": "Returns a list of gadgets used on this wiki.", - "apihelp-query+gadgets-param-prop": "What gadget information to get:\n;id:Internal gadget ID.\n;metadata:The gadget metadata.\n;desc:Gadget description transformed into HTML (can be slow, use only if really needed).", + "apihelp-query+gadgets-param-prop": "What gadget information to get:", + "apihelp-query+gadgets-paramvalue-prop-id": "Internal gadget ID.", + "apihelp-query+gadgets-paramvalue-prop-metadata": "The gadget metadata.", + "apihelp-query+gadgets-paramvalue-prop-desc": "Gadget description transformed into HTML (can be slow, use only if really needed).", "apihelp-query+gadgets-param-categories": "Gadgets from what categories to retrieve.", "apihelp-query+gadgets-param-ids": "IDs of gadgets to retrieve.", "apihelp-query+gadgets-param-allowedonly": "List only gadgets allowed to current user.", diff --git a/i18n/api/qqq.json b/i18n/api/qqq.json index 3cd46a7a..c03afb15 100644 --- a/i18n/api/qqq.json +++ b/i18n/api/qqq.json @@ -7,11 +7,17 @@ }, "apihelp-query+gadgetcategories-summary": "{{doc-apihelp-summary|query+gadgetcategories}}", "apihelp-query+gadgetcategories-param-prop": "{{doc-apihelp-param|query+gadgetcategories|prop}}", + "apihelp-query+gadgetcategories-paramvalue-prop-name": "{{doc-apihelp-paramvalue|query+gadgetcategories|prop|name}}", + "apihelp-query+gadgetcategories-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+gadgetcategories|prop|title}}", + "apihelp-query+gadgetcategories-paramvalue-prop-members": "{{doc-apihelp-paramvalue|query+gadgetcategories|prop|members}}", "apihelp-query+gadgetcategories-param-names": "{{doc-apihelp-param|query+gadgetcategories|names}}", "apihelp-query+gadgetcategories-example-1": "{{doc-apihelp-example|query+gadgetcategories}}", "apihelp-query+gadgetcategories-example-2": "{{doc-apihelp-example|query+gadgetcategories}}", "apihelp-query+gadgets-summary": "{{doc-apihelp-summary|query+gadgets}}", "apihelp-query+gadgets-param-prop": "{{doc-apihelp-param|query+gadgets|prop}}", + "apihelp-query+gadgets-paramvalue-prop-id": "{{doc-apihelp-paramvalue|query+gadgets|prop|id}}", + "apihelp-query+gadgets-paramvalue-prop-metadata": "{{doc-apihelp-paramvalue|query+gadgets|prop|metadata}}", + "apihelp-query+gadgets-paramvalue-prop-desc": "{{doc-apihelp-paramvalue|query+gadgets|prop|desc}}", "apihelp-query+gadgets-param-categories": "{{doc-apihelp-param|query+gadgets|categories}}", "apihelp-query+gadgets-param-ids": "{{doc-apihelp-param|query+gadgets|ids}}", "apihelp-query+gadgets-param-allowedonly": "{{doc-apihelp-param|query+gadgets|allowedonly}}", diff --git a/includes/Api/ApiQueryGadgetCategories.php b/includes/Api/ApiQueryGadgetCategories.php index 8483f095..ca554f8d 100644 --- a/includes/Api/ApiQueryGadgetCategories.php +++ b/includes/Api/ApiQueryGadgetCategories.php @@ -99,6 +99,7 @@ class ApiQueryGadgetCategories extends ApiQueryBase { 'title', 'members', ], + ApiBase::PARAM_HELP_MSG_PER_VALUE => [], ], 'names' => [ ParamValidator::PARAM_TYPE => 'string', diff --git a/includes/Api/ApiQueryGadgets.php b/includes/Api/ApiQueryGadgets.php index 342562bf..dd4b35f3 100644 --- a/includes/Api/ApiQueryGadgets.php +++ b/includes/Api/ApiQueryGadgets.php @@ -214,6 +214,7 @@ class ApiQueryGadgets extends ApiQueryBase { 'metadata', 'desc', ], + ApiBase::PARAM_HELP_MSG_PER_VALUE => [], ], 'categories' => [ ParamValidator::PARAM_ISMULTI => true,