From: umherirrender Date: Thu, 6 Aug 2015 08:17:34 +0000 (+0200) Subject: API: Use message-per-value for apihelp-query+userinfo-param-prop X-Git-Tag: 1.31.0-rc.0~10385^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=c1f90160be3f78c306baa3dac43663bda1370100;p=lhc%2Fweb%2Fwiklou.git API: Use message-per-value for apihelp-query+userinfo-param-prop Use message-per-value for message apihelp-query+userinfo-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: I7bb36e4fd95e68fe4798e31070b6fa05ac550d38 --- diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index e003e31f85..75a0adb6e2 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -268,10 +268,12 @@ class ApiQueryUserInfo extends ApiQueryBase { 'registrationdate', 'unreadcount', ), - ApiBase::PARAM_HELP_MSG => array( - 'apihelp-query+userinfo-param-prop', - self::WL_UNREAD_LIMIT - 1, - self::WL_UNREAD_LIMIT . '+', + ApiBase::PARAM_HELP_MSG_PER_VALUE => array( + 'unreadcount' => array( + 'apihelp-query+userinfo-paramvalue-prop-unreadcount', + self::WL_UNREAD_LIMIT - 1, + self::WL_UNREAD_LIMIT . '+', + ), ), ) ); diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index ae7a9c6818..b22dc9dc7b 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -980,7 +980,22 @@ "apihelp-query+usercontribs-example-ipprefix": "Show contributions from all IP addresses with prefix 192.0.2..", "apihelp-query+userinfo-description": "Get information about the current user.", - "apihelp-query+userinfo-param-prop": "Which pieces of information to include:\n;blockinfo:Tags if the current user is blocked, by whom, and for what reason.\n;hasmsg:Adds a tag messages if the current user has pending messages.\n;groups:Lists all the groups the current user belongs to.\n;implicitgroups:Lists all the groups the current user is automatically a member of.\n;rights:Lists all the rights the current user has.\n;changeablegroups:Lists the groups the current user can add to and remove from.\n;options:Lists all preferences the current user has set.\n;preferencestoken:Deprecated. Get a token to change current user's preferences.\n;editcount:Adds the current user's edit count.\n;ratelimits:Lists all rate limits applying to the current user.\n;realname:Adds the user's real name.\n;email:Adds the user's email address and email authentication date.\n;acceptlang:Echoes the Accept-Language header sent by the client in a structured format.\n;registrationdate:Adds the user's registration date.\n;unreadcount:Adds the count of unread pages on the user's watchlist (maximum $1; returns $2 if more).", + "apihelp-query+userinfo-param-prop": "Which pieces of information to include:", + "apihelp-query+userinfo-paramvalue-prop-blockinfo": "Tags if the current user is blocked, by whom, and for what reason.", + "apihelp-query+userinfo-paramvalue-prop-hasmsg": "Adds a tag messages if the current user has pending messages.", + "apihelp-query+userinfo-paramvalue-prop-groups": "Lists all the groups the current user belongs to.", + "apihelp-query+userinfo-paramvalue-prop-implicitgroups": "Lists all the groups the current user is automatically a member of.", + "apihelp-query+userinfo-paramvalue-prop-rights": "Lists all the rights the current user has.", + "apihelp-query+userinfo-paramvalue-prop-changeablegroups": "Lists the groups the current user can add to and remove from.", + "apihelp-query+userinfo-paramvalue-prop-options": "Lists all preferences the current user has set.", + "apihelp-query+userinfo-paramvalue-prop-preferencestoken": "Deprecated. Get a token to change current user's preferences.", + "apihelp-query+userinfo-paramvalue-prop-editcount": "Adds the current user's edit count.", + "apihelp-query+userinfo-paramvalue-prop-ratelimits": "Lists all rate limits applying to the current user.", + "apihelp-query+userinfo-paramvalue-prop-realname": "Adds the user's real name.", + "apihelp-query+userinfo-paramvalue-prop-email": "Adds the user's email address and email authentication date.", + "apihelp-query+userinfo-paramvalue-prop-acceptlang": "Echoes the Accept-Language header sent by the client in a structured format.", + "apihelp-query+userinfo-paramvalue-prop-registrationdate": "Adds the user's registration date.", + "apihelp-query+userinfo-paramvalue-prop-unreadcount": "Adds the count of unread pages on the user's watchlist (maximum $1; returns $2 if more).", "apihelp-query+userinfo-example-simple": "Get information about the current user.", "apihelp-query+userinfo-example-data": "Get additional information about the current user.", diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json index 95562d8f1d..0b60340efa 100644 --- a/includes/api/i18n/qqq.json +++ b/includes/api/i18n/qqq.json @@ -903,7 +903,22 @@ "apihelp-query+usercontribs-example-user": "{{doc-apihelp-example|query+usercontribs}}", "apihelp-query+usercontribs-example-ipprefix": "{{doc-apihelp-example|query+usercontribs}}", "apihelp-query+userinfo-description": "{{doc-apihelp-description|query+userinfo}}", - "apihelp-query+userinfo-param-prop": "{{doc-apihelp-param|query+userinfo|prop|params=* $1 - Maximum value for the \"unreadcount\" property.\n* $2 - Return value when there are more unread pages.|paramstart=3}}", + "apihelp-query+userinfo-param-prop": "{{doc-apihelp-param|query+userinfo|prop|paramvalues=1}}", + "apihelp-query+userinfo-paramvalue-prop-blockinfo": "{{doc-apihelp-paramvalue|query+userinfo|prop|blockinfo}}", + "apihelp-query+userinfo-paramvalue-prop-hasmsg": "{{doc-apihelp-paramvalue|query+userinfo|prop|hasmsg}}", + "apihelp-query+userinfo-paramvalue-prop-groups": "{{doc-apihelp-paramvalue|query+userinfo|prop|groups}}", + "apihelp-query+userinfo-paramvalue-prop-implicitgroups": "{{doc-apihelp-paramvalue|query+userinfo|prop|implicitgroups}}", + "apihelp-query+userinfo-paramvalue-prop-rights": "{{doc-apihelp-paramvalue|query+userinfo|prop|rights}}", + "apihelp-query+userinfo-paramvalue-prop-changeablegroups": "{{doc-apihelp-paramvalue|query+userinfo|prop|changeablegroups}}", + "apihelp-query+userinfo-paramvalue-prop-options": "{{doc-apihelp-paramvalue|query+userinfo|prop|options}}", + "apihelp-query+userinfo-paramvalue-prop-preferencestoken": "{{doc-apihelp-paramvalue|query+userinfo|prop|preferencestoken}}", + "apihelp-query+userinfo-paramvalue-prop-editcount": "{{doc-apihelp-paramvalue|query+userinfo|prop|editcount}}", + "apihelp-query+userinfo-paramvalue-prop-ratelimits": "{{doc-apihelp-paramvalue|query+userinfo|prop|ratelimits}}", + "apihelp-query+userinfo-paramvalue-prop-realname": "{{doc-apihelp-paramvalue|query+userinfo|prop|realname}}", + "apihelp-query+userinfo-paramvalue-prop-email": "{{doc-apihelp-paramvalue|query+userinfo|prop|email}}", + "apihelp-query+userinfo-paramvalue-prop-acceptlang": "{{doc-apihelp-paramvalue|query+userinfo|prop|acceptlang}}", + "apihelp-query+userinfo-paramvalue-prop-registrationdate": "{{doc-apihelp-paramvalue|query+userinfo|prop|registrationdate}}", + "apihelp-query+userinfo-paramvalue-prop-unreadcount": "{{doc-apihelp-paramvalue|query+userinfo|prop|unreadcount|params=* $1 - Maximum value for the \"unreadcount\" property.\n* $2 - Return value when there are more unread pages.|paramstart=3}}", "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}}",