From bd4a03278f06a10800ad87b9ec72a47c1269828e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 23 May 2017 09:03:40 +0200 Subject: [PATCH] Bug 18654: Translatability: Get rid of tt directives starting with [%% in translation for itemsearch.tt Translation for file itemsearch.tt exposes tt directifes like: %s %s %s %s %s %s %s %s %s [%% params = { f => f.$i q = q.$i op = op.$i } %%] %s %s %s %s %s %s %s %s %s %s %s or [%% INCLUDE form_field_select name="homebranch" options = branches empty_option = "All libraries" %%] [%% INCLUDE form_field_select name="holdingbranch" options = branches empty_option = "All libraries" %%] %s [%% INCLUDE form_field_select name="location" options = locations empty_option = "All locations" %%] %s This patch fixes it. To test: - Apply patch - Verify that itemsearch behaves as before - Verify that code changes make sense - Test a translatiion e.g. translator create aa-AA and verifiy that strings from itemsearch.tt starting with [%% no longer appear Followed test plan and patch worked as intended Signed-off-by: Alex Buckley --- .../prog/en/modules/catalogue/itemsearch.tt | 71 ++++++---------------- 1 file changed, 20 insertions(+), 51 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 5905e3e..5d87073 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -29,6 +29,9 @@ [% END %] [% END %] +[% BLOCK fieldset_start %]
[% END %] +[% BLOCK fieldset_end %]
[% END %] + [% BLOCK form_field_select %]
@@ -125,13 +128,7 @@ [% IF q.size %] [% size = q.size - 1 %] [% FOREACH i IN [0 .. size] %] - [% - params = { - f => f.$i - q = q.$i - op = op.$i - } - %] + [% params = { f => f.$i q = q.$i op = op.$i } %] [% IF i > 0 %] [% j = i - 1 %] [% params.c = c.$j %] @@ -416,51 +413,23 @@
-
- [% INCLUDE form_field_select - name="homebranch" - options = branches - empty_option = "All libraries" - %] - [% INCLUDE form_field_select - name="holdingbranch" - options = branches - empty_option = "All libraries" - %] - [% IF locations.size %] - [% INCLUDE form_field_select - name="location" - options = locations - empty_option = "All locations" - %] - [% END %] -
-
- [% INCLUDE form_field_select - name="itype" - options = itemtypes - empty_option = "All item types" - %] - [% INCLUDE form_field_select - name="ccode" - options = ccodes - empty_option = "All collection codes" - %] - [% IF notforloans.size %] - [% INCLUDE form_field_select - name="notforloan" - options = notforloans - empty_option = "All statuses" - %] - [% END %] -
-
+ [% INCLUDE fieldset_start %] + [% INCLUDE form_field_select name="homebranch" options = branches empty_option = "All libraries" %] + [% INCLUDE form_field_select name="holdingbranch" options = branches empty_option = "All libraries" %] + [% INCLUDE form_field_select name="location" options = locations empty_option = "All locations" IF locations.size %] + [% INCLUDE fieldset_end %] + [% INCLUDE fieldset_start %] + [% INCLUDE form_field_select name="itype" options = itemtypes empty_option = "All item types" %] + [% INCLUDE form_field_select name="ccode" options = ccodes empty_option = "All collection codes" %] + [% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" IF notforloans.size %] + [% INCLUDE fieldset_end %] + [% INCLUDE fieldset_start %] [% INCLUDE form_field_select_text_block %]

You can use the following wildcard characters: % _

% matches any number of characters

_ matches only a single character

-
-
+ [% INCLUDE fieldset_end %] + [% INCLUDE fieldset_start %]
[% value = CGI.param('itemcallnumber_from') %] @@ -495,15 +464,15 @@ ISO Format (YYYY-MM-DD)
-
-
+ [% INCLUDE fieldset_end %] + [% INCLUDE fieldset_start %]
-
+ [% INCLUDE fieldset_end %] -- 2.1.4