Commit b6bf1b88 by Jim Abramson

Merge pull request #4056 from edx/jsa/search-spell-correction-fixes

clarify and internationalize the search spell correction message.
parents ff42848c 5dfd4d4d
...@@ -460,7 +460,12 @@ if Backbone? ...@@ -460,7 +460,12 @@ if Backbone?
@collection.current_page = response.page @collection.current_page = response.page
@collection.pages = response.num_pages @collection.pages = response.num_pages
if !_.isNull response.corrected_text 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. # 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 # In the future we might not load all of a user's votes at once
# so this would probably be necessary anyway # so this would probably be necessary anyway
......
...@@ -45,8 +45,12 @@ body.discussion { ...@@ -45,8 +45,12 @@ body.discussion {
// alert copy // alert copy
.message { .message {
@include font-size(12); @include font-size(12);
@extend %t-weight5;
color: $white; color: $white;
em {
@extend %t-weight5;
font-style: italic;
}
} }
// links to jump to users/content in alerts // links to jump to users/content in alerts
......
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
<script aria-hidden="true" type="text/template" id="search-alert-template"> <script aria-hidden="true" type="text/template" id="search-alert-template">
<div class="search-alert" id="search-alert-${'<%- cid %>'}"> <div class="search-alert" id="search-alert-${'<%- cid %>'}">
<div class="search-alert-content"> <div class="search-alert-content">
<p class="message">${'<%- message %>'}</p> <p class="message">${'<%= message %>'}</p>
</div> </div>
<div class="search-alert-controls"> <div class="search-alert-controls">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment