From ec3681ce2774ac4c745e01239399d01579054d76 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 13 May 2019 14:01:53 +0000 Subject: [PATCH] Bug 14242: (follow-up) Move English strings out of JavaScript In order for English strings to be translatable they must be defined in the template, not in the JS file. Signed-off-by: Maryse Simard --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/js/autofill.js | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index 02d6386..092fd9d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -390,7 +390,8 @@ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js index 327566f..d3c2e46 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js @@ -25,13 +25,10 @@ self.$elm = $(elm); self.fields = fields; - var UNDO_STRING = _("Undo"); - var GOOGLE_BOOKS_STRING = _("Search Google Books"); - /* decorate element as autofiller */ var $inputgroup = $('
'); - self.$undo = $(''); - self.$fillbtn = $('' + GOOGLE_BOOKS_STRING + ''); + self.$undo = $(''); + self.$fillbtn = $('' + MSG_SEARCH_GOOGLE_BOOKS + ''); self.$error = $(''); self.$elm.wrap($inputgroup); self.$elm.after(self.$error); -- 2.7.4