Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt
The file opac-detail.tt exposes a lot of template directives to translation where translators should not be confronted with.
Some examples from po file are:
$[% SUBFIELD.code %] [% SUBFIELD.value %]
%s [%% INCLUDE \"openlibrary-readapi.inc\" bib = { normalized_isbn => "
"normalized_isbn, lccn => lccn, normalized_oclc => normalized_oclc } %%]
See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END "
"%]
To test:
- Apply patch
- Do a search in OPAC that has more than 1 results
- Go to the detail page of one of the items found
- Verify that the details display as before and that you can
browse the results with Previous and Next
- In staff client, change OPACXSLTDetailsDisplay from 'default' to
empty for "no xslt" and repeat steps above
- In staff client, set HTML5MediaEnabled to 'OPAC' or 'OPAC and staff client'
- Verify that media catalogued in field 856 still work
- 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
Followed test plan which works as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
<li><a href="#">Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %]</a></li>
<li><a href="#"><span>Details for: </span>[% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %]</a></li>
[% IF Koha.Preference('OPACAcquisitionDetails') and Koha.Preference('AcqCreateItem') != 'ordering' and acquisition_details.total_quantity > 0 %]
[% IF acquisition_details.total_quantity == 1 %]
1 item is on order.
<span>1 item is on order.</span>
[% ELSE %]
[% acquisition_details.total_quantity %] items are on order.
<span>[% acquisition_details.total_quantity %] items are on order.</span>
[% END %]
[% ELSE %]
<div id="noitems">No physical items for this record</div>
@ -702,7 +702,7 @@
[% IF (otheritemloop.size) %]
[% INCLUDE items_table items=otheritemloop tab="otherholdings" %]
[% ELSE %]
No other items.
<span>No other items.</span>
[% END %]
[% INCLUDE shelfbrowser tab='otherholdings' %]
</div>
@ -827,12 +827,12 @@
[% IF ( subscription.letter ) %]<span class="email_notifications">
[% IF ( loggedinusername ) %]
[% IF ( subscription.hasalert ) %]
You have subscribed to email notification on new issues. <a style="color:#000;" class="btn" title="Cancel email notification" href="/cgi-bin/koha/opac-alert-subscribe.pl?op=cancel&externalid=[% subscription.subscriptionid %]&alerttype=issue&biblionumber=[% subscription.biblionumber %]">Cancel email notification</a>
<span>You have subscribed to email notification on new issues. </span><a style="color:#000;" class="btn" title="Cancel email notification" href="/cgi-bin/koha/opac-alert-subscribe.pl?op=cancel&externalid=[% subscription.subscriptionid %]&alerttype=issue&biblionumber=[% subscription.biblionumber %]">Cancel email notification</a>
[% ELSE %]
<a style="color:#000;" class="btn" title="Subscribe to email notification on new issues" href="/cgi-bin/koha/opac-alert-subscribe.pl?externalid=[% subscription.subscriptionid %]&alerttype=issue&biblionumber=[% subscription.biblionumber %]">Subscribe to email notification on new issues</a>
[% END %]
[% ELSE %]
You must log in if you want to subscribe to email notification on new issues
<span>You must log in if you want to subscribe to email notification on new issues</span>
[% END %]
</span>[% END %]
[% IF ( subscription.missinglist ) %]
@ -855,18 +855,18 @@
<td>[% latestserial.serialseq %]</td>
<td>[% latestserial.planneddate %]</td>
<td>
[% IF (latestserial.status1 ) %]Expected[% END %]
[% IF (latestserial.status2 ) %]Arrived[% END %]
[% IF (latestserial.status3 ) %]Late[% END %]
[% IF (latestserial.status4 ) %]Missing[% END %]
[% IF (latestserial.status41 ) %]Missing (never received)[% END %]
[% IF (latestserial.status42 ) %]Missing (sold out)[% END %]
[% IF (latestserial.status43 ) %]Missing (damaged)[% END %]
[% IF (latestserial.status44 ) %]Missing (lost)[% END %]
[% IF (latestserial.status5 ) %]Not issued[% END %]
[% IF (latestserial.status6 ) %]Delete[% END %]
[% IF (latestserial.status7 ) %]Claimed[% END %]
[% IF (latestserial.status8 ) %]Stopped[% END %]
[% IF (latestserial.status1 ) %]<span>Expected</span>[% END %]
[% IF (latestserial.status2 ) %]<span>Arrived</span>[% END %]
[% IF (latestserial.status3 ) %]<span>Late</span>[% END %]
[% IF (latestserial.status4 ) %]<span>Missing</span>[% END %]
[% IF (latestserial.status41 ) %]<span>Missing (never received)</span>[% END %]
[% IF (latestserial.status42 ) %]<span>Missing (sold out)</span>[% END %]
[% IF (latestserial.status43 ) %]<span>Missing (damaged)</span>[% END %]
[% IF (latestserial.status44 ) %]<span>Missing (lost)</span>[% END %]
[% IF (latestserial.status5 ) %]<span>Not issued</span>[% END %]
[% IF (latestserial.status6 ) %]<span>Delete</span>[% END %]
[% IF (latestserial.status7 ) %]<span>Claimed</span>[% END %]
[% IF (latestserial.status8 ) %]<span>Stopped</span>[% END %]