clarify and internationalize the search spell correction message.
This commit is contained in:
@@ -460,7 +460,12 @@ if Backbone?
|
||||
@collection.current_page = response.page
|
||||
@collection.pages = response.num_pages
|
||||
if !_.isNull response.corrected_text
|
||||
@addSearchAlert('Showing results for "' + response.corrected_text + '"');
|
||||
message = interpolate(
|
||||
_.escape(gettext('No results found for %(original_query)s. Showing results for %(suggested_query)s.')),
|
||||
{"original_query": "<em>" + _.escape(text) + "</em>", "suggested_query": "<em>" + response.corrected_text + "</em>"},
|
||||
true
|
||||
)
|
||||
@addSearchAlert(message)
|
||||
# TODO: Perhaps reload user info so that votes can be updated.
|
||||
# In the future we might not load all of a user's votes at once
|
||||
# so this would probably be necessary anyway
|
||||
|
||||
@@ -45,8 +45,12 @@ body.discussion {
|
||||
// alert copy
|
||||
.message {
|
||||
@include font-size(12);
|
||||
@extend %t-weight5;
|
||||
color: $white;
|
||||
|
||||
em {
|
||||
@extend %t-weight5;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
// links to jump to users/content in alerts
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
<script aria-hidden="true" type="text/template" id="search-alert-template">
|
||||
<div class="search-alert" id="search-alert-${'<%- cid %>'}">
|
||||
<div class="search-alert-content">
|
||||
<p class="message">${'<%- message %>'}</p>
|
||||
<p class="message">${'<%= message %>'}</p>
|
||||
</div>
|
||||
|
||||
<div class="search-alert-controls">
|
||||
|
||||
Reference in New Issue
Block a user