From 99a4aa57ad4161d2a841b7e11f2c25688ae2864b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Tue, 30 May 2017 07:13:31 +0200 Subject: [PATCH] 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 (cherry picked from commit 0ee3249438b85cb47aa9ff623bac4f405df7161f) Signed-off-by: Fridolin Somers (cherry picked from commit b6f5f0331d6ea8b472a1e06b54d787482f4ae88d) Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/includes/branch-selector.inc | 10 +++++----- .../intranet-tmpl/prog/en/modules/tools/export.tt | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc index e6dfdb7e44..b91ecc2b6f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc @@ -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 %]

Select all | Clear all

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt index cfa252cd4a..2cf40d8c98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt @@ -101,8 +101,7 @@ $(document).ready(function() {
  • - [% INCLUDE 'branch-selector.inc' - branches = libraries %] + [% INCLUDE 'branch-selector.inc' branches = libraries %]
  • -- 2.39.5