From b1bce06e515e22482ca555b85da19f965b475f5f 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 --- .../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 d1d9b25937..3037c7263b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt @@ -111,8 +111,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 ) ) %]
    @@ -162,8 +162,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 ) ) %]
    @@ -178,8 +178,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 ) ) %]
    @@ -204,8 +204,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 ) %]
    @@ -243,8 +243,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 ) ) %]
    @@ -261,8 +261,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