Here is the js code for jquery autocomplete in Rails 4.2 app:
$(this).autocomplete({
minLength: 1,
source: $(this).data('autocomplete-source'),
select: function(event, ui) {
$(this).val(ui.item.value);
}
});
When there is no hit, on the low left corner of the page, there is a message saying No search results.
. Here is the html source code:
<span class="ui-helper-hidden-accessible" role="status" aria-live="assertive" aria-relevant="additions">
<div>No search results.</div>
</span>
Also in the same spot, user selection will show in full text. We don't quite understand what makes this message showing on the page. How can we make this message showing in autocomplete box and I18n.t it with our own?