Bugzilla – Attachment 63773 Details for
Bug 18654
Translatability: Get rid of tt directives starting with [%% in translation for itemsearch.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18654: Translatability: Get rid of tt directives starting with [%% in translation for itemsearch.tt
Bug-18654-Translatability-Get-rid-of-tt-directives.patch (text/plain), 5.92 KB, created by
Alex Buckley
on 2017-05-28 10:34:49 UTC
(
hide
)
Description:
Bug 18654: Translatability: Get rid of tt directives starting with [%% in translation for itemsearch.tt
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-05-28 10:34:49 UTC
Size:
5.92 KB
patch
obsolete
>From bd4a03278f06a10800ad87b9ec72a47c1269828e Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >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 <alexbuckley@catalyst.net.nz> >--- > .../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 %]<fieldset>[% END %] >+[% BLOCK fieldset_end %]</fieldset>[% END %] >+ > [% BLOCK form_field_select %] > <div class="form-field form-field-select"> > <label class="form-field-label" for="[% name %]">[% INCLUDE form_label label=name %]</label> >@@ -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 @@ > </div> > </fieldset> > </div> >- <fieldset> >- [% 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 %] >- </fieldset> >- <fieldset> >- [% 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 %] >- </fieldset> >- <fieldset> >+ [% 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 %] > <p class="hint">You can use the following wildcard characters: % _</p> > <p class="hint">% matches any number of characters</p> > <p class="hint">_ matches only a single character</p> >- </fieldset> >- <fieldset> >+ [% INCLUDE fieldset_end %] >+ [% INCLUDE fieldset_start %] > <div class="form-field"> > <label class="form-field-label" for="itemcallnumber_from">From call number:</label> > [% value = CGI.param('itemcallnumber_from') %] >@@ -495,15 +464,15 @@ > <input type="text" name="datelastborrowed" /> > <span class="hint">ISO Format (YYYY-MM-DD)</span> > </div> >- </fieldset> >- <fieldset> >+ [% INCLUDE fieldset_end %] >+ [% INCLUDE fieldset_start %] > <div class="form-field-radio"> > <label>Output:</label> > <input type="radio" id="format-html" name="format" value="html" checked="checked" /> <label for="format-html">Screen</label> > <input type="radio" id="format-csv" name="format" value="csv" /> <label for="format-csv">CSV</label> > <input type="radio" id="format-barcodes" name="format" value="barcodes"/> <label for="format-barcodes">Barcodes file</label> > </div> >- </fieldset> >+ [% INCLUDE fieldset_end %] > </form> > </div> > </div> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18654
:
63643
|
63773
|
64177
|
64723
|
65407
|
66640
|
67082