From d0e45a4f050e4e2b3a4814004dbba0ae609181a5 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 6 Aug 2015 08:51:06 +0200 Subject: [PATCH] API: Use message-per-value for apihelp-query+linkshere-param-prop Use message-per-value for message apihelp-query+linkshere-param-prop/ apihelp-query+transcludedin-param-prop/ apihelp-query+redirects-param-prop/ apihelp-query+fileusage-param-prop to allow smaller strings for translation. Each prop in a message also will show up a new parameter on the help page without the adjust of the translation (but than in english instead of fully skip it). Change-Id: Ie8d8d9c2dd1132767e0f4b2ea907e116e2a18790 --- includes/api/ApiQueryBacklinksprop.php | 1 + includes/api/i18n/en.json | 20 ++++++++++++++++---- includes/api/i18n/qqq.json | 20 ++++++++++++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/includes/api/ApiQueryBacklinksprop.php b/includes/api/ApiQueryBacklinksprop.php index dbed36c1cb..a50d58b22f 100644 --- a/includes/api/ApiQueryBacklinksprop.php +++ b/includes/api/ApiQueryBacklinksprop.php @@ -335,6 +335,7 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase { ), ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_DFLT => 'pageid|title', + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'namespace' => array( ApiBase::PARAM_ISMULTI => true, diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index ae7a9c6818..f5d1c1c9f0 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -657,7 +657,10 @@ "apihelp-query+filerepoinfo-example-simple": "Get information about file repositories.", "apihelp-query+fileusage-description": "Find all pages that use the given files.", - "apihelp-query+fileusage-param-prop": "Which properties to get:\n;pageid:Page ID of each page.\n;title:Title of each page.\n;redirect:Flag if the page is a redirect.", + "apihelp-query+fileusage-param-prop": "Which properties to get:", + "apihelp-query+fileusage-paramvalue-prop-pageid": "Page ID of each page.", + "apihelp-query+fileusage-paramvalue-prop-title": "Title of each page.", + "apihelp-query+fileusage-paramvalue-prop-redirect": "Flag if the page is a redirect.", "apihelp-query+fileusage-param-namespace": "Only include pages in these namespaces.", "apihelp-query+fileusage-param-limit": "How many to return.", "apihelp-query+fileusage-param-show": "Show only items that meet these criteria:\n;redirect:Only show redirects.\n;!redirect:Only show non-redirects.", @@ -781,7 +784,10 @@ "apihelp-query+links-example-namespaces": "Get links from the page Main Page in the {{ns:user}} and {{ns:template}} namespaces.", "apihelp-query+linkshere-description": "Find all pages that link to the given pages.", - "apihelp-query+linkshere-param-prop": "Which properties to get:\n;pageid:Page ID of each page.\n;title:Title of each page.\n;redirect:Flag if the page is a redirect.", + "apihelp-query+linkshere-param-prop": "Which properties to get:", + "apihelp-query+linkshere-paramvalue-prop-pageid": "Page ID of each page.", + "apihelp-query+linkshere-paramvalue-prop-title": "Title of each page.", + "apihelp-query+linkshere-paramvalue-prop-redirect": "Flag if the page is a redirect.", "apihelp-query+linkshere-param-namespace": "Only include pages in these namespaces.", "apihelp-query+linkshere-param-limit": "How many to return.", "apihelp-query+linkshere-param-show": "Show only items that meet these criteria:\n;redirect:Only show redirects.\n;!redirect:Only show non-redirects.", @@ -863,7 +869,10 @@ "apihelp-query+recentchanges-example-generator": "Get page info about recent unpatrolled changes.", "apihelp-query+redirects-description": "Returns all redirects to the given pages.", - "apihelp-query+redirects-param-prop": "Which properties to get:\n;pageid:Page ID of each redirect.\n;title:Title of each redirect.\n;fragment:Fragment of each redirect, if any.", + "apihelp-query+redirects-param-prop": "Which properties to get:", + "apihelp-query+redirects-paramvalue-prop-pageid": "Page ID of each redirect.", + "apihelp-query+redirects-paramvalue-prop-title": "Title of each redirect.", + "apihelp-query+redirects-paramvalue-prop-fragment": "Fragment of each redirect, if any.", "apihelp-query+redirects-param-namespace": "Only include pages in these namespaces.", "apihelp-query+redirects-param-limit": "How many redirects to return.", "apihelp-query+redirects-param-show": "Show only items that meet these criteria:\n;fragment:Only show redirects with a fragment.\n;!fragment:Only show redirects without a fragment.", @@ -958,7 +967,10 @@ "apihelp-query+tokens-example-types": "Retrieve a watch token and a patrol token.", "apihelp-query+transcludedin-description": "Find all pages that transclude the given pages.", - "apihelp-query+transcludedin-param-prop": "Which properties to get:\n;pageid:Page ID of each page.\n;title:Title of each page.\n;redirect:Flag if the page is a redirect.", + "apihelp-query+transcludedin-param-prop": "Which properties to get:", + "apihelp-query+transcludedin-paramvalue-prop-pageid": "Page ID of each page.", + "apihelp-query+transcludedin-paramvalue-prop-title": "Title of each page.", + "apihelp-query+transcludedin-paramvalue-prop-redirect": "Flag if the page is a redirect.", "apihelp-query+transcludedin-param-namespace": "Only include pages in these namespaces.", "apihelp-query+transcludedin-param-limit": "How many to return.", "apihelp-query+transcludedin-param-show": "Show only items that meet these criteria:\n;redirect:Only show redirects.\n;!redirect:Only show non-redirects.", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index 95562d8f1d..a6be2d0eb0 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -609,7 +609,10 @@ "apihelp-query+filerepoinfo-param-prop": "{{doc-apihelp-param|query+filerepoinfo|prop}}", "apihelp-query+filerepoinfo-example-simple": "{{doc-apihelp-example|query+filerepoinfo}}", "apihelp-query+fileusage-description": "{{doc-apihelp-description|query+fileusage}}", - "apihelp-query+fileusage-param-prop": "{{doc-apihelp-param|query+fileusage|prop}}", + "apihelp-query+fileusage-param-prop": "{{doc-apihelp-param|query+fileusage|prop|paramvalues=1}}", + "apihelp-query+fileusage-paramvalue-prop-pageid": "{{doc-apihelp-paramvalue|query+fileusage|prop|pageid}}", + "apihelp-query+fileusage-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+fileusage|prop|title}}", + "apihelp-query+fileusage-paramvalue-prop-redirect": "{{doc-apihelp-paramvalue|query+fileusage|prop|redirect}}", "apihelp-query+fileusage-param-namespace": "{{doc-apihelp-param|query+fileusage|namespace}}", "apihelp-query+fileusage-param-limit": "{{doc-apihelp-param|query+fileusage|limit}}", "apihelp-query+fileusage-param-show": "{{doc-apihelp-param|query+fileusage|show}}", @@ -723,7 +726,10 @@ "apihelp-query+links-example-generator": "{{doc-apihelp-example|query+links}}", "apihelp-query+links-example-namespaces": "{{doc-apihelp-example|query+links}}", "apihelp-query+linkshere-description": "{{doc-apihelp-description|query+linkshere}}", - "apihelp-query+linkshere-param-prop": "{{doc-apihelp-param|query+linkshere|prop}}", + "apihelp-query+linkshere-param-prop": "{{doc-apihelp-param|query+linkshere|prop|paramvalues=1}}", + "apihelp-query+linkshere-paramvalue-prop-pageid": "{{doc-apihelp-paramvalue|query+linkshere|prop|pageid}}", + "apihelp-query+linkshere-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+linkshere|prop|title}}", + "apihelp-query+linkshere-paramvalue-prop-redirect": "{{doc-apihelp-paramvalue|query+linkshere|prop|redirect}}", "apihelp-query+linkshere-param-namespace": "{{doc-apihelp-param|query+linkshere|namespace}}", "apihelp-query+linkshere-param-limit": "{{doc-apihelp-param|query+linkshere|limit}}", "apihelp-query+linkshere-param-show": "{{doc-apihelp-param|query+linkshere|show}}", @@ -796,7 +802,10 @@ "apihelp-query+recentchanges-example-simple": "{{doc-apihelp-example|query+recentchanges}}", "apihelp-query+recentchanges-example-generator": "{{doc-apihelp-example|query+recentchanges}}", "apihelp-query+redirects-description": "{{doc-apihelp-description|query+redirects}}", - "apihelp-query+redirects-param-prop": "{{doc-apihelp-param|query+redirects|prop}}", + "apihelp-query+redirects-param-prop": "{{doc-apihelp-param|query+redirects|prop|paramvalues=1}}", + "apihelp-query+redirects-paramvalue-prop-pageid": "{{doc-apihelp-paramvalue|query+redirects|prop|pageid}}", + "apihelp-query+redirects-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+redirects|prop|title}}", + "apihelp-query+redirects-paramvalue-prop-fragment": "{{doc-apihelp-paramvalue|query+redirects|prop|fragment}}", "apihelp-query+redirects-param-namespace": "{{doc-apihelp-param|query+redirects|namespace}}", "apihelp-query+redirects-param-limit": "{{doc-apihelp-param|query+redirects|limit}}", "apihelp-query+redirects-param-show": "{{doc-apihelp-param|query+redirects|show}}", @@ -883,7 +892,10 @@ "apihelp-query+tokens-example-simple": "{{doc-apihelp-example|query+tokens}}", "apihelp-query+tokens-example-types": "{{doc-apihelp-example|query+tokens}}", "apihelp-query+transcludedin-description": "{{doc-apihelp-description|query+transcludedin}}", - "apihelp-query+transcludedin-param-prop": "{{doc-apihelp-param|query+transcludedin|prop}}", + "apihelp-query+transcludedin-param-prop": "{{doc-apihelp-param|query+transcludedin|prop|paramvalues=1}}", + "apihelp-query+transcludedin-paramvalue-prop-pageid": "{{doc-apihelp-paramvalue|query+transcludedin|prop|pageid}}", + "apihelp-query+transcludedin-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+transcludedin|prop|title}}", + "apihelp-query+transcludedin-paramvalue-prop-redirect": "{{doc-apihelp-paramvalue|query+transcludedin|prop|redirect}}", "apihelp-query+transcludedin-param-namespace": "{{doc-apihelp-param|query+transcludedin|namespace}}", "apihelp-query+transcludedin-param-limit": "{{doc-apihelp-param|query+transcludedin|limit}}", "apihelp-query+transcludedin-param-show": "{{doc-apihelp-param|query+transcludedin|show}}", -- 2.20.1