diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index 528c896f9..64dc17ffb 100644 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -694,6 +694,7 @@ class FrontController(RedditController): simple=True).render() return res + search_help_page = "/help/search" verify_langs_regex = re.compile(r"\A[a-z][a-z](,[a-z][a-z])*\Z") @base_listing @validate(query = VLength('q', max_length=512), @@ -734,7 +735,11 @@ class FrontController(RedditController): cleanup_message = strings.invalid_search_query % { "clean_query": cleaned } - + cleanup_message += " " + cleanup_message += strings.search_help % {"search_help": + self.search_help_page + } + res = SearchPage(_('search results'), query, t, num, content=spane, nav_menus = [SearchSortMenu(default=sort)], search_params = dict(sort = sort), diff --git a/r2/r2/lib/strings.py b/r2/r2/lib/strings.py index a9776fb90..7026bf30e 100644 --- a/r2/r2/lib/strings.py +++ b/r2/r2/lib/strings.py @@ -141,6 +141,7 @@ string_dict = dict( search_failed = _("Our search machines are under too much load to handle your request right now. :( Sorry for the inconvenience. Try again in a little bit -- but please don't mash reload; that only makes the problem worse."), invalid_search_query = _("I couldn't understand your query, so I simplified it and searched for \"%(clean_query)s\" instead."), completely_invalid_search_query = _("I couldn't understand your search query. Please try again."), + search_help = _("You may also want to check the [search help page](%(search_help)s) for more information."), generic_quota_msg = _("You've submitted too many links recently. Please try again in an hour."), verified_quota_msg = _("Looks like you're either a brand new user or your posts have not been doing well recently. You may have to wait a bit to post again. In the meantime feel free to [check out the reddiquette](%(reddiquette)s) or join the conversation in a different thread."), unverified_quota_msg = _("Looks like you're either a brand new user or your posts have not been doing well recently. You may have to wait a bit to post again. In the meantime feel free to [check out the reddiquette](%(reddiquette)s), join the conversation in a different thread, or [verify your email address](%(verify)s)."),