Bug 18693: Translatability: Get rid of exposing a [%% FOREACH loop in translation for branch-selector.inc

The file branch-selector.inc exposes the following line to translation
(due to newlines insied a tt directive):
%s %s [%% FOREACH branch IN branches; IF branch.selected; selectall = 0; END; END %%]

Additionally, export.tt exposes the following line to translation:
[%% INCLUDE 'branch-selector.inc' branches = libraries %%]

To test:
- Apply patch
- In Staff client, go to Home > Tools > Export data
- Verify that library selection behaves as before
- Bonus test: Create a "language" aa-AA (perl translate create aa-AA
  from folder misc/translator, verify that lines mentioned above do
  no longer appear in aa-AA-staff-prog.po
- Run QA tools (newest version with test for newlines in tt directives)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marc Véron 2017-05-30 07:13:31 +02:00 committed by Jonathan Druart
parent 5a30dea05b
commit 0ee3249438
2 changed files with 6 additions and 7 deletions

View File

@ -1,10 +1,10 @@
[%# First check to see if we have anything selected, otherwise we select all %]
[% selectall = 1 %]
[% FOREACH branch IN branches;
IF branch.selected;
selectall = 0;
END;
END %]
[% FOREACH branch IN branches %]
[% IF branch.selected %]
[% selectall = 0 %]
[% END %]
[% END %]
<div class="branchselector">
<p><a href="#" id="checkall"> <i class="fa fa-check"></i> Select all</a> | <a href="#" id="checknone"> <i class="fa fa-remove"></i> Clear all</a></p>
<div class="branchgridrow">

View File

@ -97,8 +97,7 @@ $(document).ready(function() {
<li>
<label>Library: </label>
[% INCLUDE 'branch-selector.inc'
branches = libraries %]
[% INCLUDE 'branch-selector.inc' branches = libraries %]
</li>
</ol>