ApiSandbox: Add text about limit's "max" value
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 14 Nov 2016 17:01:50 +0000 (12:01 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 14 Nov 2016 17:05:31 +0000 (12:05 -0500)
In action=help this is reflected by the "Type" field, but that field
isn't displayed in ApiSandbox.

Change-Id: I7e491acc8ba7fdc3463f3cf1656b13fb3949d7d3

languages/i18n/en.json
languages/i18n/qqq.json
resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.apisandbox.js

index a033edd..305fe33 100644 (file)
        "apisandbox-continue": "Continue",
        "apisandbox-continue-clear": "Clear",
        "apisandbox-continue-help": "{{int:apisandbox-continue}} will [https://www.mediawiki.org/wiki/API:Query#Continuing_queries continue] the last request; {{int:apisandbox-continue-clear}} will clear continuation-related parameters.",
+       "apisandbox-param-limit": "Enter <kbd>max</kbd> to use the maximum limit.",
        "booksources": "Book sources",
        "booksources-summary": "",
        "booksources-search-legend": "Search for book sources",
index e5df378..3a8b6d6 100644 (file)
        "apisandbox-continue": "Button text for sending another request using query continuation.\n{{Identical|Continue}}",
        "apisandbox-continue-clear": "Button text for clearing query continuation parameters.\n{{Identical|Clear}}",
        "apisandbox-continue-help": "Help text for the continue and clear buttons.",
+       "apisandbox-param-limit": "Additional documentation text for 'limit'-type parameters.",
        "booksources": "{{doc-special|BookSources}}\n\n'''This message shouldn't be changed unless it has serious mistakes.'''\n\nIt's used as the page name of the configuration page of [[Special:BookSources]]. Changing it breaks existing sites using the default version of this message.\n\nSee also:\n* {{msg-mw|Booksources|title}}\n* {{msg-mw|Booksources-text|text}}",
        "booksources-summary": "{{doc-specialpagesummary|booksources}}",
        "booksources-search-legend": "Box heading on [[Special:BookSources|book sources]] special page. The box is for searching for places where a particular book can be bought or viewed.",
index 5c2f12a..8c3b67d 100644 (file)
@@ -1867,6 +1867,7 @@ return [
                        'apisandbox-continue',
                        'apisandbox-continue-clear',
                        'apisandbox-continue-help',
+                       'apisandbox-param-limit',
                        'api-format-prettyprint-status',
                        'blanknamespace',
                ],
index 64cfcf5..aa1761d 100644 (file)
                                                                if ( pi.parameters[ i ].highmax !== undefined ) {
                                                                        dl.append( $( '<dd>', {
                                                                                addClass: 'info',
-                                                                               append: Util.parseHTML( mw.message(
-                                                                                       'api-help-param-limit2', pi.parameters[ i ].max, pi.parameters[ i ].highmax
-                                                                               ).parse() )
+                                                                               append: [
+                                                                                       Util.parseHTML( mw.message(
+                                                                                               'api-help-param-limit2', pi.parameters[ i ].max, pi.parameters[ i ].highmax
+                                                                                       ).parse() ),
+                                                                                       ' ',
+                                                                                       Util.parseHTML( mw.message( 'apisandbox-param-limit' ).parse() )
+                                                                               ]
                                                                        } ) );
                                                                } else {
                                                                        dl.append( $( '<dd>', {
                                                                                addClass: 'info',
-                                                                               append: Util.parseHTML( mw.message(
-                                                                                       'api-help-param-limit', pi.parameters[ i ].max
-                                                                               ).parse() )
+                                                                               append: [
+                                                                                       Util.parseHTML( mw.message(
+                                                                                               'api-help-param-limit', pi.parameters[ i ].max
+                                                                                       ).parse() ),
+                                                                                       ' ',
+                                                                                       Util.parseHTML( mw.message( 'apisandbox-param-limit' ).parse() )
+                                                                               ]
                                                                        } ) );
                                                                }
                                                                break;