From: Brad Jorsch Date: Mon, 14 Nov 2016 17:01:50 +0000 (-0500) Subject: ApiSandbox: Add text about limit's "max" value X-Git-Tag: 1.31.0-rc.0~4862^2 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=c0821b20aa38c9aae5c9607874b39c7d6237df3b;p=lhc%2Fweb%2Fwiklou.git ApiSandbox: Add text about limit's "max" value In action=help this is reflected by the "Type" field, but that field isn't displayed in ApiSandbox. Change-Id: I7e491acc8ba7fdc3463f3cf1656b13fb3949d7d3 --- diff --git a/languages/i18n/en.json b/languages/i18n/en.json index a033eddb69..305fe334ee 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1928,6 +1928,7 @@ "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 max to use the maximum limit.", "booksources": "Book sources", "booksources-summary": "", "booksources-search-legend": "Search for book sources", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index e5df378ab2..3a8b6d6f3d 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2112,6 +2112,7 @@ "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.", diff --git a/resources/Resources.php b/resources/Resources.php index 5c2f12ae2e..8c3b67d1d3 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1867,6 +1867,7 @@ return [ 'apisandbox-continue', 'apisandbox-continue-clear', 'apisandbox-continue-help', + 'apisandbox-param-limit', 'api-format-prettyprint-status', 'blanknamespace', ], diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index 64cfcf5c47..aa1761dc66 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -1346,16 +1346,24 @@ if ( pi.parameters[ i ].highmax !== undefined ) { dl.append( $( '
', { 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( $( '
', { 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;