From 85bcf2ecb58d509fa1c830105387fe0f38730e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 11 Jun 2017 08:01:54 +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. from folder misc/translator: perl translate create aa-AA ...and verifiy that strings translated from itemsearch.tt and starting with [%% no longer appear in aa-AA-staff-prog.po (Patch re-written, needs a new sign-off) --- .../prog/en/modules/catalogue/itemsearch.tt | 47 ++++------------------ 1 file changed, 8 insertions(+), 39 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..21244e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -125,15 +125,8 @@ [% IF q.size %] [% size = q.size - 1 %] [% FOREACH i IN [0 .. size] %] - [% - params = { - f => f.$i - q = q.$i - op = op.$i - } - %] - [% IF i > 0 %] - [% j = i - 1 %] + [% params = { f => f.$i q = q.$i op = op.$i } %] + [% IF i > 0 %] [% j = i - 1 %] [% params.c = c.$j %] [% END %] [% INCLUDE form_field_select_text params=params %] @@ -417,41 +410,17 @@
- [% 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="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" - %] + [% 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" - %] + [% 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" - %] + [% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" %] [% END %]
-- 2.1.4