From 361e8f6609f586173bf5516b0d8e5a9fcd4a6b87 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 6 Aug 2015 10:22:47 +0200 Subject: [PATCH] API: Use message-per-value for apihelp-query+users-param-prop Use message-per-value for message apihelp-query+users-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: Ic467e2edc130018c61a30c61864f1f0de89540ff --- includes/api/ApiQueryUsers.php | 3 ++- includes/api/i18n/en.json | 10 +++++++++- includes/api/i18n/qqq.json | 10 +++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 8b1a07503a..1d0048ce80 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -305,7 +305,8 @@ class ApiQueryUsers extends ApiQueryBase { 'registration', 'emailable', 'gender', - ) + ), + ApiBase::PARAM_HELP_MSG_PER_VALUE => array(), ), 'users' => array( ApiBase::PARAM_ISMULTI => true diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index ae7a9c6818..f5b1dee6e0 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -985,7 +985,15 @@ "apihelp-query+userinfo-example-data": "Get additional information about the current user.", "apihelp-query+users-description": "Get information about a list of users.", - "apihelp-query+users-param-prop": "Which pieces of information to include:\n;blockinfo:Tags if the user is blocked, by whom, and for what reason.\n;groups:Lists all the groups each user belongs to.\n;implicitgroups:Lists all the groups a user is automatically a member of.\n;rights:Lists all the rights each user has.\n;editcount:Adds the user's edit count.\n;registration:Adds the user's registration timestamp.\n;emailable:Tags if the user can and wants to receive email through [[Special:Emailuser]].\n;gender:Tags the gender of the user. Returns \"male\", \"female\", or \"unknown\".", + "apihelp-query+users-param-prop": "Which pieces of information to include:", + "apihelp-query+users-paramvalue-prop-blockinfo": "Tags if the user is blocked, by whom, and for what reason.", + "apihelp-query+users-paramvalue-prop-groups": "Lists all the groups each user belongs to.", + "apihelp-query+users-paramvalue-prop-implicitgroups": "Lists all the groups a user is automatically a member of.", + "apihelp-query+users-paramvalue-prop-rights": "Lists all the rights each user has.", + "apihelp-query+users-paramvalue-prop-editcount": "Adds the user's edit count.", + "apihelp-query+users-paramvalue-prop-registration": "Adds the user's registration timestamp.", + "apihelp-query+users-paramvalue-prop-emailable": "Tags if the user can and wants to receive email through [[Special:Emailuser]].", + "apihelp-query+users-paramvalue-prop-gender": "Tags the gender of the user. Returns \"male\", \"female\", or \"unknown\".", "apihelp-query+users-param-users": "A list of users to obtain information for.", "apihelp-query+users-param-token": "Use [[Special:ApiHelp/query+tokens|action=query&meta=tokens]] instead.", "apihelp-query+users-example-simple": "Return information for user Example.", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index 95562d8f1d..5bde1a0496 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -907,7 +907,15 @@ "apihelp-query+userinfo-example-simple": "{{doc-apihelp-example|query+userinfo}}", "apihelp-query+userinfo-example-data": "{{doc-apihelp-example|query+userinfo}}", "apihelp-query+users-description": "{{doc-apihelp-description|query+users}}", - "apihelp-query+users-param-prop": "{{doc-apihelp-param|query+users|prop}}", + "apihelp-query+users-param-prop": "{{doc-apihelp-param|query+users|prop|paramvalues=1}}", + "apihelp-query+users-paramvalue-prop-blockinfo": "{{doc-apihelp-paramvalue|query+users|prop|blockinfo}}", + "apihelp-query+users-paramvalue-prop-groups": "{{doc-apihelp-paramvalue|query+users|prop|groups}}", + "apihelp-query+users-paramvalue-prop-implicitgroups": "{{doc-apihelp-paramvalue|query+users|prop|implicitgroups}}", + "apihelp-query+users-paramvalue-prop-rights": "{{doc-apihelp-paramvalue|query+users|prop|rights}}", + "apihelp-query+users-paramvalue-prop-editcount": "{{doc-apihelp-paramvalue|query+users|prop|editcount}}", + "apihelp-query+users-paramvalue-prop-registration": "{{doc-apihelp-paramvalue|query+users|prop|registration}}", + "apihelp-query+users-paramvalue-prop-emailable": "{{doc-apihelp-paramvalue|query+users|prop|emailable}}", + "apihelp-query+users-paramvalue-prop-gender": "{{doc-apihelp-paramvalue|query+users|prop|gender}}", "apihelp-query+users-param-users": "{{doc-apihelp-param|query+users|users}}", "apihelp-query+users-param-token": "{{doc-apihelp-param|query+users|token}}", "apihelp-query+users-example-simple": "{{doc-apihelp-example|query+users}}", -- 2.20.1