Bug 18779: Translatability: Get rid of exposed tt directives in authorities-search...
authorMarc Véron <veron@veron.ch>
Mon, 12 Jun 2017 06:20:56 +0000 (08:20 +0200)
committerMason James <mtj@kohaaloha.com>
Tue, 24 Oct 2017 03:42:09 +0000 (16:42 +1300)
The file opac-tmpl/bootstrap/en/includes/authorities-search-results.inc
exposes template directives to translation where translators should not
be confronted with.

Example:
"[%% PROCESS showreference heading=seeals.heading linkType='seealso' "
"type=seeals.type authid=seeals.authid %%] "

To test:
- Apply patch
- Verify that Authority search in OPAC works as before
- Bonus test: create a new language 'aa-AA', verify that line above
  does not show up in aa-AA-opac-bootstrap.po

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 331320f93a5ef5293c3bcad80b9554ddea0196b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4dc640244651c584347b01f35f2cb25b6369a638)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc

index 536d500..8934cca 100644 (file)
@@ -1,11 +1,10 @@
 [% BLOCK showreference %]
-[%#
-    Parameters:
-    heading: the heading itself
-    linkType: currently 'seefrom' or 'seealso', controls the label for the entry
-    type:
-    authid: if it is a linked authority, its authid
-%]
+[%# Parameters: %]
+[%# heading: the heading itself %]
+[%# linkType: currently 'seefrom' or 'seealso', controls the label for the entry %]
+[%# type: %]
+[%# authid: if it is a linked authority, its authid %]
+
     [% SET authidurl = '/cgi-bin/koha/opac-authoritiesdetail.pl?authid=' %]
     [% SET searchurl = '/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&marclist=mainentry&and_or=and&orderby=HeadingAsc&value=' %]
     [% IF marcflavour == 'UNIMARC' %]
                     <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                     <div class="seefrom authref">
-                    [% PROCESS showreference
-                        heading=seefro.heading
-                        linkType='seefrom'
-                        type=seefro.type
-                    %]
+                    [%# Following on one line for translatability %]
+                    [% PROCESS showreference heading=seefro.heading linkType='seefrom' type=seefro.type %]
                     </div>
                 [% END %]
             [% END %]
                     <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]
                     <div class="seealso authref">
-                    [% PROCESS showreference
-                        heading=seeals.heading
-                        linkType='seealso'
-                        type=seeals.type
-                        authid=seeals.authid
-                    %]
+                    [%# Following on one line for translatability %]
+                    [% PROCESS showreference heading=seeals.heading linkType='seealso' type=seeals.type authid=seeals.authid %]
                     </div>
                 [% END %]
             [% END %]