API: Use message-per-value for apihelp-query+search-param-prop
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 6 Aug 2015 07:38:57 +0000 (09:38 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 6 Aug 2015 07:38:57 +0000 (09:38 +0200)
Use message-per-value for message
apihelp-query+search-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: Id2088213f4577c8cb88e479e8fca0e6bd3d619f4

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

index 349e7fa..65fd727 100644 (file)
@@ -316,18 +316,19 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                        'size',
                                        'wordcount',
                                        'timestamp',
-                                       'score',
                                        'snippet',
                                        'titlesnippet',
                                        'redirecttitle',
                                        'redirectsnippet',
                                        'sectiontitle',
                                        'sectionsnippet',
-                                       'hasrelated',
                                        'isfilematch',
                                        'categorysnippet',
+                                       'score', // deprecated
+                                       'hasrelated', // deprecated
                                ),
                                ApiBase::PARAM_ISMULTI => true,
+                               ApiBase::PARAM_HELP_MSG_PER_VALUE => array(),
                        ),
                        'offset' => array(
                                ApiBase::PARAM_DFLT => 0,
index ae7a9c6..a510af3 100644 (file)
        "apihelp-query+search-param-namespace": "Search only within these namespaces.",
        "apihelp-query+search-param-what": "Which type of search to perform.",
        "apihelp-query+search-param-info": "Which metadata to return.",
-       "apihelp-query+search-param-prop": "Which properties to return:\n;size:Adds the size of the page in bytes.\n;wordcount:Adds the word count of the page.\n;timestamp:Adds the timestamp of when the page was last edited.\n;snippet:Adds a parsed snippet of the page.\n;titlesnippet:Adds a parsed snippet of the page title.\n;redirectsnippet:Adds a parsed snippet of the redirect title.\n;redirecttitle:Adds the title of the matching redirect.\n;sectionsnippet:Adds a parsed snippet of the matching section title.\n;sectiontitle:Adds the title of the matching section.\n;categorysnippet:Adds a parsed snippet of the matching category.\n;isfilematch:Adds a boolean indicating if the search matched file content.\n;score:<span class=\"apihelp-deprecated\">Deprecated and ignored.</span>\n;hasrelated:<span class=\"apihelp-deprecated\">Deprecated and ignored.</span>",
+       "apihelp-query+search-param-prop": "Which properties to return:",
+       "apihelp-query+search-paramvalue-prop-size": "Adds the size of the page in bytes.",
+       "apihelp-query+search-paramvalue-prop-wordcount": "Adds the word count of the page.",
+       "apihelp-query+search-paramvalue-prop-timestamp": "Adds the timestamp of when the page was last edited.",
+       "apihelp-query+search-paramvalue-prop-snippet": "Adds a parsed snippet of the page.",
+       "apihelp-query+search-paramvalue-prop-titlesnippet": "Adds a parsed snippet of the page title.",
+       "apihelp-query+search-paramvalue-prop-redirectsnippet": "Adds a parsed snippet of the redirect title.",
+       "apihelp-query+search-paramvalue-prop-redirecttitle": "Adds the title of the matching redirect.",
+       "apihelp-query+search-paramvalue-prop-sectionsnippet": "Adds a parsed snippet of the matching section title.",
+       "apihelp-query+search-paramvalue-prop-sectiontitle": "Adds the title of the matching section.",
+       "apihelp-query+search-paramvalue-prop-categorysnippet": "Adds a parsed snippet of the matching category.",
+       "apihelp-query+search-paramvalue-prop-isfilematch": "Adds a boolean indicating if the search matched file content.",
+       "apihelp-query+search-paramvalue-prop-score": "<span class=\"apihelp-deprecated\">Deprecated and ignored.</span>",
+       "apihelp-query+search-paramvalue-prop-hasrelated": "<span class=\"apihelp-deprecated\">Deprecated and ignored.</span>",
        "apihelp-query+search-param-limit": "How many total pages to return.",
        "apihelp-query+search-param-interwiki": "Include interwiki results in the search, if available.",
        "apihelp-query+search-param-backend": "Which search backend to use, if not the default.",
index 95562d8..63d6564 100644 (file)
        "apihelp-query+search-param-namespace": "{{doc-apihelp-param|query+search|namespace}}",
        "apihelp-query+search-param-what": "{{doc-apihelp-param|query+search|what}}",
        "apihelp-query+search-param-info": "{{doc-apihelp-param|query+search|info}}",
-       "apihelp-query+search-param-prop": "{{doc-apihelp-param|query+search|prop}}",
+       "apihelp-query+search-param-prop": "{{doc-apihelp-param|query+search|prop|paramvalues=1}}",
+       "apihelp-query+search-paramvalue-prop-size": "{{doc-apihelp-paramvalue|query+search|prop|size}}",
+       "apihelp-query+search-paramvalue-prop-wordcount": "{{doc-apihelp-paramvalue|query+search|prop|wordcount}}",
+       "apihelp-query+search-paramvalue-prop-timestamp": "{{doc-apihelp-paramvalue|query+search|prop|timestamp}}",
+       "apihelp-query+search-paramvalue-prop-snippet": "{{doc-apihelp-paramvalue|query+search|prop|snippet}}",
+       "apihelp-query+search-paramvalue-prop-titlesnippet": "{{doc-apihelp-paramvalue|query+search|prop|titlesnippet}}",
+       "apihelp-query+search-paramvalue-prop-redirectsnippet": "{{doc-apihelp-paramvalue|query+search|prop|redirectsnippet}}",
+       "apihelp-query+search-paramvalue-prop-redirecttitle": "{{doc-apihelp-paramvalue|query+search|prop|redirecttitle}}",
+       "apihelp-query+search-paramvalue-prop-sectionsnippet": "{{doc-apihelp-paramvalue|query+search|prop|sectionsnippet}}",
+       "apihelp-query+search-paramvalue-prop-sectiontitle": "{{doc-apihelp-paramvalue|query+search|prop|sectiontitle}}",
+       "apihelp-query+search-paramvalue-prop-categorysnippet": "{{doc-apihelp-paramvalue|query+search|prop|categorysnippet}}",
+       "apihelp-query+search-paramvalue-prop-isfilematch": "{{doc-apihelp-paramvalue|query+search|prop|isfilematch}}",
+       "apihelp-query+search-paramvalue-prop-score": "{{doc-apihelp-paramvalue|query+search|prop|score}}",
+       "apihelp-query+search-paramvalue-prop-hasrelated": "{{doc-apihelp-paramvalue|query+search|prop|hasrelated}}",
        "apihelp-query+search-param-limit": "{{doc-apihelp-param|query+search|limit}}",
        "apihelp-query+search-param-interwiki": "{{doc-apihelp-param|query+search|interwiki}}",
        "apihelp-query+search-param-backend": "{{doc-apihelp-param|query+search|backend}}",