Last modified: 2014-01-24 23:20:00 UTC
By default, [[MediaWiki:Searchmenu-new]] displays the following message: Create the page "[[:$1]]" on this wiki! The English Wikipedia has customized this to: You may create the page "[[:$1]]", but consider checking the search results below to see whether it is already covered. This is confusing when the search returns no results. There are two ways this could be remedied; * supply a second parameter to the message indicating if there are any results * add another message that is used instead of this one when there are no results
Trevor, Robert, what do you think? Separate messages for no results, pass the result count in, or is there a cleaner way to handle this case?
I absolutely agree that referring to "results below" should only happen when there are indeed results below. And also, doesn't the use of below violate http://www.mediawiki.org/wiki/Internationalisation#Avoid_references_to_screen_layout_and_positions anyways?
(In reply to comment #2) > And also, doesn't the use of below violate > http://www.mediawiki.org/wiki/Internationalisation#Avoid_references_to_screen_layout_and_positions > anyways? I think a lot of the en.wikipedia-specific UI was created without much attention to (or even knowledge of) that page; I might go put a link to it somewhere prominent. The 'below' could probably be dropped (though it's not the only place it's used, e.g. the default message for [[MediaWiki:Newarticletext]] has "to create the page, start typing in the box below".)
This message MediaWiki:Searchmenu-new is only presented to users who can create articles. However, now there is no good method to present information to users who cannot create articles. For instance. The english Wikipedia used to direct anonymous users to http://en.wikipedia.org/wiki/Wikipedia:Articles_for_creation, giving anonymous users a route to follow when they want to create an article, and not leaving them guessing. I think at the very least an additional message alla [[MediaWiki:searchmenu-new-nocreate]] should be provided.
Created attachment 7325 [details] add searchmenu-new-nocreate Patch for a searchmenu-new-nocreate option. This basically amends r61555 from bug 19600.
I applied this patch in r65902
Should this message (or a similarly default blank one) also be used for searches using special search-engine functions: http://en.wikipedia.org/wiki/Special:Search?search=Hello prefix%3AP
http://en.wikipedia.org/wiki/Special:Search?search=Hello%20prefix%3AP
That isn't very nice indeed conrad.... To fix this would require expanding the includes/search/SearchEngine.php with something that can detect the individual searchterms and interpret their meaning (special or not) and give back solely the searchterms stripped from the special keywords.
BTW. Conrad, the issue you refer to is bug 21102.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.
Change 99265 had a related patch set uploaded by MegaAlex: Add search results found as $2 parameter to message searchmenu-new https://gerrit.wikimedia.org/r/99265
Latest patch is the result of the Google Code-In task http://www.google-melange.com/gci/task/view/google/gci2013/5881421512048640 so please help reviewing this in a timely manner.
(In reply to comment #13) > Change 99265 had a related patch set uploaded by MegaAlex: > Add search results found as $2 parameter to message searchmenu-new > > https://gerrit.wikimedia.org/r/99265 This patch is slightly broader in scope than what proposed in the last comments, which ask for en.wiki to be able to customise searchmenu-new* properly. I think we can try and apply to searchmenu-new and searchmenu-exists a logic similar to en.wiki's custom messages'. Currently, if there are no results, search-nonefound above says "There were no results matching the query"; but if there are, nothing is said. So we can cover this case in searchmenu-new and searchmenu-exists with [[translatewiki:Plural#Arbitrary plurals]], simply adding both a sentence of the kind {{PLURAL:$2|0=|See also the page found with your search.|See also the search results found.}} This would put the parameter into use on the two messages and make it available for the empty one; bug 21102 would then take care of the ugliness of the first half of it.
Change 99265 merged by jenkins-bot: Add search results found as parameter to showCreateLink https://gerrit.wikimedia.org/r/99265
Gerrit change #99265 can cause problems for extensions adding extra parameters using the SpecialSearchCreateLink hook. And I updated the documentation at https://www.mediawiki.org/wiki/Manual:Hooks/SpecialSearchCreateLink (please think of the documentation when changing hooks).