From b58a5389b8a77ead32b57a73a6784f0af2af7da6 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 5 Aug 2015 21:54:08 +0200 Subject: [PATCH] API: Use message-per-value for apihelp-query+blocks-param-prop Use message-per-value for message apihelp-query+blocks-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: If2eb9a40aa1d059e70956cf20493b2288ee34cec --- includes/api/ApiQueryBlocks.php | 3 ++- includes/api/i18n/en.json | 12 +++++++++++- includes/api/i18n/qqq.json | 12 +++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php index 25f0bf70d9..d004020db8 100644 --- a/includes/api/ApiQueryBlocks.php +++ b/includes/api/ApiQueryBlocks.php @@ -303,7 +303,8 @@ class ApiQueryBlocks extends ApiQueryBase { 'range', 'flags' ), - ApiBase::PARAM_ISMULTI => true + ApiBase::PARAM_ISMULTI => true, + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'show' => array( ApiBase::PARAM_TYPE => array( diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index ae7a9c6818..4df4fbc5b7 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -533,7 +533,17 @@ "apihelp-query+blocks-param-users": "List of users to search for (optional).", "apihelp-query+blocks-param-ip": "Get all blocks applying to this IP or CIDR range, including range blocks.\nCannot be used together with $3users. CIDR ranges broader than IPv4/$1 or IPv6/$2 are not accepted.", "apihelp-query+blocks-param-limit": "The maximum number of blocks to list.", - "apihelp-query+blocks-param-prop": "Which properties to get:\n;id:Adds the ID of the block.\n;user:Adds the username of the blocked user.\n;userid:Adds the user ID of the blocked user.\n;by:Adds the username of the blocking user.\n;byid:Adds the user ID of the blocking user.\n;timestamp:Adds the timestamp of when the block was given.\n;expiry:Adds the timestamp of when the block expires.\n;reason:Adds the reason given for the block.\n;range:Adds the range of IP addresses affected by the block.\n;flags:Tags the ban with (autoblock, anononly, etc.).", + "apihelp-query+blocks-param-prop": "Which properties to get:", + "apihelp-query+blocks-paramvalue-prop-id": "Adds the ID of the block.", + "apihelp-query+blocks-paramvalue-prop-user": "Adds the username of the blocked user.", + "apihelp-query+blocks-paramvalue-prop-userid": "Adds the user ID of the blocked user.", + "apihelp-query+blocks-paramvalue-prop-by": "Adds the username of the blocking user.", + "apihelp-query+blocks-paramvalue-prop-byid": "Adds the user ID of the blocking user.", + "apihelp-query+blocks-paramvalue-prop-timestamp": "Adds the timestamp of when the block was given.", + "apihelp-query+blocks-paramvalue-prop-expiry": "Adds the timestamp of when the block expires.", + "apihelp-query+blocks-paramvalue-prop-reason": "Adds the reason given for the block.", + "apihelp-query+blocks-paramvalue-prop-range": "Adds the range of IP addresses affected by the block.", + "apihelp-query+blocks-paramvalue-prop-flags": "Tags the ban with (autoblock, anononly, etc.).", "apihelp-query+blocks-param-show": "Show only items that meet these criteria.\nFor example, to see only indefinite blocks on IP addresses, set $1show=ip|!temp.", "apihelp-query+blocks-example-simple": "List blocks.", "apihelp-query+blocks-example-users": "List blocks of users Alice and Bob.", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index 95562d8f1d..0b83ce8e95 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -499,7 +499,17 @@ "apihelp-query+blocks-param-users": "{{doc-apihelp-param|query+blocks|users}}", "apihelp-query+blocks-param-ip": "{{doc-apihelp-param|query+blocks|ip|params=* $1 - Minimum CIDR prefix for IPv4\n* $2 - Minimum CIDR prefix for IPv6|paramstart=3}}", "apihelp-query+blocks-param-limit": "{{doc-apihelp-param|query+blocks|limit}}", - "apihelp-query+blocks-param-prop": "{{doc-apihelp-param|query+blocks|prop}}", + "apihelp-query+blocks-param-prop": "{{doc-apihelp-param|query+blocks|prop|paramvalues=1}}", + "apihelp-query+blocks-paramvalue-prop-id": "{{doc-apihelp-paramvalue|query+blocks|prop|id}}", + "apihelp-query+blocks-paramvalue-prop-user": "{{doc-apihelp-paramvalue|query+blocks|prop|user}}", + "apihelp-query+blocks-paramvalue-prop-userid": "{{doc-apihelp-paramvalue|query+blocks|prop|userid}}", + "apihelp-query+blocks-paramvalue-prop-by": "{{doc-apihelp-paramvalue|query+blocks|prop|by}}", + "apihelp-query+blocks-paramvalue-prop-byid": "{{doc-apihelp-paramvalue|query+blocks|prop|byid}}", + "apihelp-query+blocks-paramvalue-prop-timestamp": "{{doc-apihelp-paramvalue|query+blocks|prop|timestamp}}", + "apihelp-query+blocks-paramvalue-prop-expiry": "{{doc-apihelp-paramvalue|query+blocks|prop|expiry}}", + "apihelp-query+blocks-paramvalue-prop-reason": "{{doc-apihelp-paramvalue|query+blocks|prop|reason}}", + "apihelp-query+blocks-paramvalue-prop-range": "{{doc-apihelp-paramvalue|query+blocks|prop|range}}", + "apihelp-query+blocks-paramvalue-prop-flags": "{{doc-apihelp-paramvalue|query+blocks|prop|flags}}", "apihelp-query+blocks-param-show": "{{doc-apihelp-param|query+blocks|show}}", "apihelp-query+blocks-example-simple": "{{doc-apihelp-example|query+blocks}}", "apihelp-query+blocks-example-users": "{{doc-apihelp-example|query+blocks}}", -- 2.20.1