From 14de764e5e737d512f42c8a51ccf8aba7112a649 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Sun, 11 Jun 2017 16:54:28 +0200 Subject: [PATCH] Bug 18776: Translatability: Get rid of exposed tt directives in opac-advsearch.tt The file opac-advsearch.tt exposes template directives to translation where translators should not be confronted with. Example in po file: "[%% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype')." "size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and " "OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) " "%%] " To test: - Apply patch - Verify that advanced search in OPAC behaves as before - Create a new translation for a 'language' aa-AA (perl translate create aa-AA) - Verify that template directives ar no longer exposed in aa-AA-opac-bootstrap.po Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart (cherry picked from commit ae684fc9491102ba0b560ca6f414a325e763b31a) Signed-off-by: Fridolin Somers (cherry picked from commit b1bce06e515e22482ca555b85da19f965b475f5f) Signed-off-by: Katrin Fischer --- .../bootstrap/en/modules/opac-advsearch.tt | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt index 2fcc0512eb..800eba4d0a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt @@ -110,8 +110,8 @@
- [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('itemtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('itemtype').size > 0 and expanded_options ) ) %]
    @@ -161,8 +161,8 @@ [% END %]
    - [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('pubdate').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('pubdate').size > 0 and expanded_options ) ) %]
    @@ -177,8 +177,8 @@
    [% END %] - [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('language').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('language').size > 0 and expanded_options ) ) %]
    @@ -203,8 +203,8 @@
    [% END %] - [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('location').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('location').size > 0 and expanded_options ) ) %] [% UNLESS ( singleBranchMode ) %]
    @@ -242,8 +242,8 @@ [% END # / UNLESS singleBranchMode %] [% END %] - [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('sorting').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('sorting').size > 0 and expanded_options ) ) %]
    @@ -260,8 +260,8 @@ [% END %]
    - [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or - ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %] + [%# Following on one line for translatability %] + [% IF ( ( OpacAdvSearchOptions and OpacAdvSearchOptions.grep('subtype').size > 0 and not expanded_options ) or ( OpacAdvSearchMoreOptions and OpacAdvSearchMoreOptions.grep('subtype').size > 0 and expanded_options ) ) %]
    [% IF ( usmarc ) %] -- 2.39.5