API: Use message-per-value for apihelp-query+userinfo-param-prop
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 6 Aug 2015 08:17:34 +0000 (10:17 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 6 Aug 2015 08:17:34 +0000 (10:17 +0200)
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

includes/api/ApiQueryUserInfo.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json

index e003e31..75a0adb 100644 (file)
@@ -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 . '+',
+                                       ),
                                ),
                        )
                );
index ae7a9c6..b22dc9d 100644 (file)
        "apihelp-query+usercontribs-example-ipprefix": "Show contributions from all IP addresses with prefix <kbd>192.0.2.</kbd>.",
 
        "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 <samp>messages</samp> 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:<span class=\"apihelp-deprecated\">Deprecated.</span> 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 <code>Accept-Language</code> 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 <samp>$2</samp> 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 <samp>messages</samp> 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": "<span class=\"apihelp-deprecated\">Deprecated.</span> 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 <code>Accept-Language</code> 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 <samp>$2</samp> 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.",
 
index 95562d8..0b60340 100644 (file)
        "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}}",