From d783939fd971a60b82b94559758f072edb71e6c3 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 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" --- .../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 0c65c11..9b791ff 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 %] @@ -265,7 +292,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; @@ -325,13 +353,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" %] @@ -339,19 +365,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" %] @@ -375,8 +398,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" %]