diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-06-28 17:04:45 -0300 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-06-28 17:08:48 -0300 |
commit | 0e6217184eeeb69fa85fcf97d28be37e9042a71d (patch) | |
tree | 988f628b602d43685d2e26f68b3b28e6dc469671 /web-ui/app/js/search | |
parent | 1cf3d16637e0a128c3e12236614cc0cd4f40dfc7 (diff) |
Added remaining translations strings
Diffstat (limited to 'web-ui/app/js/search')
-rw-r--r-- | web-ui/app/js/search/search_trigger.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/web-ui/app/js/search/search_trigger.js b/web-ui/app/js/search/search_trigger.js index 4b9cb1dc..2aff027c 100644 --- a/web-ui/app/js/search/search_trigger.js +++ b/web-ui/app/js/search/search_trigger.js @@ -19,19 +19,19 @@ define( [ 'flight/lib/component', 'views/templates', - 'page/events' - ], function (defineComponent, templates, events) { + 'page/events', + 'views/i18n' + ], function (defineComponent, templates, events, i18n) { 'use strict'; return defineComponent(searchTrigger); function searchTrigger() { - var placeHolder = 'Search results for: '; - this.defaultAttrs({ input: 'input[type=search]', - form: 'form' + form: 'form', + searchResultsPrefix: 'search-results-for' }); this.render = function() { @@ -57,14 +57,14 @@ define( this.showOnlySearchTerms = function(event){ var value = this.select('input').val(); - var searchTerms = value.slice(placeHolder.length); + var searchTerms = value.slice((i18n.t(this.attr.searchResultsPrefix) + ': ').length); this.select('input').val(searchTerms); }; this.showSearchTermsAndPlaceHolder = function(event){ var value = this.select('input').val(); if (value.length > 0){ - this.select('input').val(placeHolder + value); + this.select('input').val(i18n.t(this.attr.searchResultsPrefix) + ': ' + value); } }; |