From c956cc99509f32f85d5fab84de5177630d085027 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 5 Aug 2015 21:31:15 +0200 Subject: [PATCH] API: Use message-per-value for apihelp-query+alllinks-param-prop Use message-per-value for message apihelp-query+alllinks-param-prop/ apihelp-query+allfileusages-param-prop/ apihelp-query+alltransclusions-param-prop/ apihelp-query+allredirects-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: I0e3880e6bbc4adceb53c9f80edf912ceee417649 --- includes/api/ApiQueryAllLinks.php | 1 + includes/api/i18n/en.json | 18 ++++++++++++++---- includes/api/i18n/qqq.json | 18 ++++++++++++++---- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index fadecfb47e..347da89606 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -255,6 +255,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { ApiBase::PARAM_TYPE => array_merge( array( 'ids', 'title' ), array_keys( $this->props ) ), + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'namespace' => array( ApiBase::PARAM_DFLT => $this->dfltNamespace, diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index ae7a9c6818..e0f424858a 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -394,7 +394,9 @@ "apihelp-query+allfileusages-param-to": "The title of the file to stop enumerating at.", "apihelp-query+allfileusages-param-prefix": "Search for all file titles that begin with this value.", "apihelp-query+allfileusages-param-unique": "Only show distinct file titles. Cannot be used with $1prop=ids.\nWhen used as a generator, yields target pages instead of source pages.", - "apihelp-query+allfileusages-param-prop": "Which pieces of information to include:\n;ids:Adds the page IDs of the using pages (cannot be used with $1unique).\n;title:Adds the title of the file.", + "apihelp-query+allfileusages-param-prop": "Which pieces of information to include:", + "apihelp-query+allfileusages-paramvalue-prop-ids": "Adds the page IDs of the using pages (cannot be used with $1unique).", + "apihelp-query+allfileusages-paramvalue-prop-title": "Adds the title of the file.", "apihelp-query+allfileusages-param-limit": "How many total items to return.", "apihelp-query+allfileusages-param-dir": "The direction in which to list.", "apihelp-query+allfileusages-example-B": "List file titles, including missing ones, with page IDs they are from, starting at B.", @@ -428,7 +430,9 @@ "apihelp-query+alllinks-param-to": "The title of the link to stop enumerating at.", "apihelp-query+alllinks-param-prefix": "Search for all linked titles that begin with this value.", "apihelp-query+alllinks-param-unique": "Only show distinct linked titles. Cannot be used with $1prop=ids.\nWhen used as a generator, yields target pages instead of source pages.", - "apihelp-query+alllinks-param-prop": "Which pieces of information to include:\n;ids:Adds the page ID of the linking page (cannot be used with $1unique).\n;title:Adds the title of the link.", + "apihelp-query+alllinks-param-prop": "Which pieces of information to include:", + "apihelp-query+alllinks-paramvalue-prop-ids": "Adds the page ID of the linking page (cannot be used with $1unique).", + "apihelp-query+alllinks-paramvalue-prop-title": "Adds the title of the link.", "apihelp-query+alllinks-param-namespace": "The namespace to enumerate.", "apihelp-query+alllinks-param-limit": "How many total items to return.", "apihelp-query+alllinks-param-dir": "The direction in which to list.", @@ -478,7 +482,11 @@ "apihelp-query+allredirects-param-to": "The title of the redirect to stop enumerating at.", "apihelp-query+allredirects-param-prefix": "Search for all target pages that begin with this value.", "apihelp-query+allredirects-param-unique": "Only show distinct target pages. Cannot be used with $1prop=ids|fragment|interwiki.\nWhen used as a generator, yields target pages instead of source pages.", - "apihelp-query+allredirects-param-prop": "Which pieces of information to include:\n;ids:Adds the page ID of the redirecting page (cannot be used with $1unique).\n;title:Adds the title of the redirect.\n;fragment:Adds the fragment from the redirect, if any (cannot be used with $1unique).\n;interwiki:Adds the interwiki prefix from the redirect, if any (cannot be used with $1unique).", + "apihelp-query+allredirects-param-prop": "Which pieces of information to include:", + "apihelp-query+allredirects-paramvalue-prop-ids": "Adds the page ID of the redirecting page (cannot be used with $1unique).", + "apihelp-query+allredirects-paramvalue-prop-title": "Adds the title of the redirect.", + "apihelp-query+allredirects-paramvalue-prop-fragment": "Adds the fragment from the redirect, if any (cannot be used with $1unique).", + "apihelp-query+allredirects-paramvalue-prop-interwiki": "Adds the interwiki prefix from the redirect, if any (cannot be used with $1unique).", "apihelp-query+allredirects-param-namespace": "The namespace to enumerate.", "apihelp-query+allredirects-param-limit": "How many total items to return.", "apihelp-query+allredirects-param-dir": "The direction in which to list.", @@ -492,7 +500,9 @@ "apihelp-query+alltransclusions-param-to": "The title of the transclusion to stop enumerating at.", "apihelp-query+alltransclusions-param-prefix": "Search for all transcluded titles that begin with this value.", "apihelp-query+alltransclusions-param-unique": "Only show distinct transcluded titles. Cannot be used with $1prop=ids.\nWhen used as a generator, yields target pages instead of source pages.", - "apihelp-query+alltransclusions-param-prop": "Which pieces of information to include:\n;ids:Adds the page ID of the transcluding page (cannot be used with $1unique).\n;title:Adds the title of the transclusion.", + "apihelp-query+alltransclusions-param-prop": "Which pieces of information to include:", + "apihelp-query+alltransclusions-paramvalue-prop-ids": "Adds the page ID of the transcluding page (cannot be used with $1unique).", + "apihelp-query+alltransclusions-paramvalue-prop-title": "Adds the title of the transclusion.", "apihelp-query+alltransclusions-param-namespace": "The namespace to enumerate.", "apihelp-query+alltransclusions-param-limit": "How many total items to return.", "apihelp-query+alltransclusions-param-dir": "The direction in which to list.", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index 95562d8f1d..2636b869d9 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -369,7 +369,9 @@ "apihelp-query+allfileusages-param-to": "{{doc-apihelp-param|query+allfileusages|to}}", "apihelp-query+allfileusages-param-prefix": "{{doc-apihelp-param|query+allfileusages|prefix}}", "apihelp-query+allfileusages-param-unique": "{{doc-apihelp-param|query+allfileusages|unique}}", - "apihelp-query+allfileusages-param-prop": "{{doc-apihelp-param|query+allfileusages|prop}}", + "apihelp-query+allfileusages-param-prop": "{{doc-apihelp-param|query+allfileusages|prop|paramvalues=1}}", + "apihelp-query+allfileusages-paramvalue-prop-ids": "{{doc-apihelp-param|query+allfileusages|prop|ids}}", + "apihelp-query+allfileusages-paramvalue-prop-title": "{{doc-apihelp-param|query+allfileusages|prop|title}}", "apihelp-query+allfileusages-param-limit": "{{doc-apihelp-param|query+allfileusages|limit}}", "apihelp-query+allfileusages-param-dir": "{{doc-apihelp-param|query+allfileusages|dir}}", "apihelp-query+allfileusages-example-B": "{{doc-apihelp-example|query+allfileusages}}", @@ -401,7 +403,9 @@ "apihelp-query+alllinks-param-to": "{{doc-apihelp-param|query+alllinks|to}}", "apihelp-query+alllinks-param-prefix": "{{doc-apihelp-param|query+alllinks|prefix}}", "apihelp-query+alllinks-param-unique": "{{doc-apihelp-param|query+alllinks|unique}}", - "apihelp-query+alllinks-param-prop": "{{doc-apihelp-param|query+alllinks|prop}}", + "apihelp-query+alllinks-param-prop": "{{doc-apihelp-param|query+alllinks|prop|paramvalues=1}}", + "apihelp-query+alllinks-paramvalue-prop-ids": "{{doc-apihelp-paramvalue|query+alllinks|prop|ids}}", + "apihelp-query+alllinks-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+alllinks|prop|title}}", "apihelp-query+alllinks-param-namespace": "{{doc-apihelp-param|query+alllinks|namespace}}", "apihelp-query+alllinks-param-limit": "{{doc-apihelp-param|query+alllinks|limit}}", "apihelp-query+alllinks-param-dir": "{{doc-apihelp-param|query+alllinks|dir}}", @@ -448,7 +452,11 @@ "apihelp-query+allredirects-param-to": "{{doc-apihelp-param|query+allredirects|to}}", "apihelp-query+allredirects-param-prefix": "{{doc-apihelp-param|query+allredirects|prefix}}", "apihelp-query+allredirects-param-unique": "{{doc-apihelp-param|query+allredirects|unique}}", - "apihelp-query+allredirects-param-prop": "{{doc-apihelp-param|query+allredirects|prop}}", + "apihelp-query+allredirects-param-prop": "{{doc-apihelp-param|query+allredirects|prop|paramvalue=1}}", + "apihelp-query+allredirects-paramvalue-prop-ids": "{{doc-apihelp-param|query+allredirects|prop|ids}}", + "apihelp-query+allredirects-paramvalue-prop-title": "{{doc-apihelp-param|query+allredirects|prop|title}}", + "apihelp-query+allredirects-paramvalue-prop-fragment": "{{doc-apihelp-param|query+allredirects|prop|fragment}}", + "apihelp-query+allredirects-paramvalue-prop-interwiki": "{{doc-apihelp-param|query+allredirects|prop|interwiki}}", "apihelp-query+allredirects-param-namespace": "{{doc-apihelp-param|query+allredirects|namespace}}", "apihelp-query+allredirects-param-limit": "{{doc-apihelp-param|query+allredirects|limit}}", "apihelp-query+allredirects-param-dir": "{{doc-apihelp-param|query+allredirects|dir}}", @@ -461,7 +469,9 @@ "apihelp-query+alltransclusions-param-to": "{{doc-apihelp-param|query+alltransclusions|to}}", "apihelp-query+alltransclusions-param-prefix": "{{doc-apihelp-param|query+alltransclusions|prefix}}", "apihelp-query+alltransclusions-param-unique": "{{doc-apihelp-param|query+alltransclusions|unique}}", - "apihelp-query+alltransclusions-param-prop": "{{doc-apihelp-param|query+alltransclusions|prop}}", + "apihelp-query+alltransclusions-param-prop": "{{doc-apihelp-param|query+alltransclusions|prop|paramvalues=1}}", + "apihelp-query+alltransclusions-paramvalue-prop-ids": "{{doc-apihelp-paramvalue|query+alltransclusions|prop|ids}}", + "apihelp-query+alltransclusions-paramvalue-prop-title": "{{doc-apihelp-paramvalue|query+alltransclusions|prop|title}}", "apihelp-query+alltransclusions-param-namespace": "{{doc-apihelp-param|query+alltransclusions|namespace}}", "apihelp-query+alltransclusions-param-limit": "{{doc-apihelp-param|query+alltransclusions|limit}}", "apihelp-query+alltransclusions-param-dir": "{{doc-apihelp-param|query+alltransclusions|dir}}", -- 2.20.1