From 1eb85ad7578410354668ff81f9f35bbc2f6b9734 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Fri, 28 Nov 2014 10:06:18 -0300 Subject: [PATCH] Bug 13357: Untranslatable strings on itemsearch.tt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch enable translation of labels on itemsearch.tt To test: 1) Translate for a fairly complete language (es-ES de-DE) 2) On staff, go to Search > Item search 3) Check there are many untranslated strings e.g. Text before pulldowns on first and second box All options on third box 4) Apply the patch 5) Repeat 1 & 2 6) Check there are now some strings translated 7) Update translation file, check there are some new strings to translate (may be they are fuzzy) e.g. "All statuses", "All collection codes" Patch works as expected. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/catalogue/itemsearch.tt | 69 ++++++++++++------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index a8a7030e39..135c5bdc21 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -1,9 +1,36 @@ [% USE CGI %] [% USE JSON.Escape %] +[% BLOCK form_label %] + [% SWITCH label %] + [% CASE 'barcode' %]Barcode + [% CASE 'itemcallnumber' %]Call number + [% CASE 'stocknumber' %]Stock number + [% CASE 'title' %]Title + [% CASE 'author' %]Author + [% CASE 'publishercode' %]Publisher + [% CASE 'publicationdate' %]Publication date + [% CASE 'collectiontitle' %]Collection + [% CASE 'isbn' %]ISBN + [% CASE 'issn' %]ISSN + [% CASE 'homebranch' %]Home library + [% CASE 'All libraries' %]All libraries + [% CASE 'location' %]Shelving location + [% CASE 'All locations' %]All locations + [% CASE 'itype' %]Item type + [% CASE 'All item types' %]All item types + [% CASE 'ccode' %]Collection code + [% CASE 'All collection codes' %]All collection codes + [% CASE 'notforloan' %]Status + [% CASE 'All statuses' %]All statuses + [% CASE 'damaged' %]Damaged + [% CASE 'itemlost' %]Lost + [% END %] +[% END %] + [% BLOCK form_field_select %]
- + [% END %] @@ -274,7 +301,8 @@ $(document).ready(function () { // Add the "New field" link. var form_field = $('div.form-field-select-text').last() - var button_field_new = $('New field'); + var NEW_FIELD = _("New field"); + var button_field_new = $('' + NEW_FIELD + ''); button_field_new.click(function() { addNewField(); return false; @@ -334,13 +362,11 @@
[% INCLUDE form_field_select name="homebranch" - label="Home library" options = branches empty_option = "All libraries" %] [% INCLUDE form_field_select name="location" - label="Shelving location" options = locations empty_option = "All locations" %] @@ -348,19 +374,16 @@
[% INCLUDE form_field_select name="itype" - label="Item type" options = itemtypes empty_option = "All item types" %] [% INCLUDE form_field_select name="ccode" - label="Collection code" options = ccodes empty_option = "All collection codes" %] [% INCLUDE form_field_select name="notforloan" - label="Status" options = notforloans empty_option = "All statuses" %] @@ -384,8 +407,8 @@ (inclusive)
- [% INCLUDE form_field_radio_yes_no name="damaged" label="Damaged" %] - [% INCLUDE form_field_radio_yes_no name="itemlost" label="Lost" %] + [% INCLUDE form_field_radio_yes_no name="damaged" %] + [% INCLUDE form_field_radio_yes_no name="itemlost" %]