Remove hardcoded number from [[MediaWiki:Searchlimit-help/en]]

Bug: T307756
Change-Id: I2522017c39ebd3ea4f8aa43ea92ccf8f5094b24e
This commit is contained in:
joseph emmanuel kayode (iemarjay) 2022-05-11 10:47:06 +01:00
parent 9badf0bf37
commit 510976284b
3 changed files with 6 additions and 5 deletions

View file

@ -253,7 +253,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
$this->editingPreferences( $user, $context, $preferences );
$this->rcPreferences( $user, $context, $preferences );
$this->watchlistPreferences( $user, $context, $preferences );
$this->searchPreferences( $preferences );
$this->searchPreferences( $context, $preferences );
$this->hookRunner->onGetPreferences( $user, $preferences );
@ -1442,9 +1442,10 @@ class DefaultPreferencesFactory implements PreferencesFactory {
}
/**
* @param IContextSource $context
* @param array &$defaultPreferences
*/
protected function searchPreferences( &$defaultPreferences ) {
protected function searchPreferences( $context, &$defaultPreferences ) {
$defaultPreferences['search-special-page'] = [
'type' => 'api',
];
@ -1474,7 +1475,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
'max' => 500,
'section' => 'searchoptions/searchmisc',
'label-message' => 'searchlimit-label',
'help-message' => 'searchlimit-help',
'help-message' => $context->msg( 'searchlimit-help', 500 ),
'filter' => IntvalFilter::class,
];
}

View file

@ -4088,7 +4088,7 @@
"search-match-redirect-label": "Redirect to exact matches when searching",
"search-match-redirect-help": "Select to get redirected to a page when that page title matches what you have searched for",
"searchlimit-label": "Number of search results to show on each page:",
"searchlimit-help": "Maximum number: 500",
"searchlimit-help": "Maximum number: $1",
"api-clientside-error-noconnect": "Could not connect to the server. Make sure you have a working internet connection and try again.",
"api-clientside-error-http": "Server returned error: HTTP $1.",
"api-clientside-error-timeout": "The server did not respond within the expected time.",

View file

@ -4322,7 +4322,7 @@
"search-match-redirect-label": "Label for user preference to force redirect to a page during search if the page's title matches a search term",
"search-match-redirect-help": "Help text for user preference to force redirect to a page during search if the page's title matches a search term",
"searchlimit-label": "Used in [[Special:Preferences]], tab \"Search\".",
"searchlimit-help": "Shown as hint in [[Special:Preferences]], tab \"Search\".\nShown under [[Special:Preferences#mw-prefsection-lqt]]",
"searchlimit-help": "Shown as hint in [[Special:Preferences]], tab \"Search\".\nShown under [[Special:Preferences#mw-prefsection-lqt]]. $1 - The current maximum limit",
"api-clientside-error-noconnect": "Error shown when an API response fails to load due to a connection issue.",
"api-clientside-error-http": "Error shown when an API response fails to load due to a HTTP error.",
"api-clientside-error-timeout": "Error shown when an API request takes longer than the limit (it times out).",