From 752aef4593f1aa2d64700bf9738e7e03907eb1cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Fri, 9 Jun 2017 15:43:36 +0200 Subject: [PATCH] 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 Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- .../bootstrap/en/modules/opac-detail.tt | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 1f973f0af2..6770395381 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -46,7 +46,7 @@
@@ -243,8 +243,8 @@ [% IF ( collectiontitle ) %] Collection: [% collectiontitle %] - [% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %] - [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %] + [% IF ( collectionissn ) %] [% ', ISSN ' _ collectionissn %][% END %] + [% IF ( collectionvolume ) %] [% ' ; ' _ collectionvolume %] [% END %] [% END %] @@ -303,9 +303,9 @@ [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% SUBFIELD.separator %] [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] - [% SUBFIELD.value %] + [% SUBFIELD.value %] [% ELSE %] - [% SUBFIELD.value %] + [% SUBFIELD.value %] [% END %] [% END %] [% IF (MARCSUBJCT.authoritylink) %] @@ -540,17 +540,17 @@
-
    [% IF ( defaulttab == 'holdings' ) %]
  • [% ELSE %]
  • [% END %] - [% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %] [% UNLESS too_many_items %] ( [% itemloop.size || 0 %] )[% END %] + [% BLOCK holding_tab_title %][% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %][% END %] + [% INCLUDE holding_tab_title %] [% UNLESS too_many_items %][% ' ( ' _ (itemloop.size || 0) _ ' )' %][% END %]
  • [% IF (SeparateHoldings) %] -
  • Other holdings ( [% otheritemloop.size || 0 %] )
  • +
  • Other holdings [% ' ( ' _ (otheritemloop.size || 0) _ ' )' %]
  • [% END %] [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %]
  • Title notes
  • @@ -593,7 +593,7 @@ [% END %] [% IF Koha.Preference( 'reviewson' ) == 1 %] -
  • Comments ( [% reviews.size || 0 %] )
  • +
  • Comments[% ' ( ' _ (reviews.size || 0) _ ' )' %]
  • [% END %] [% IF ( NovelistSelectProfile && normalized_isbn ) %] @@ -656,21 +656,21 @@ [% INCLUDE items_table items=itemloop tab="holdings" %] [% 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. + 1 item is on order. [% ELSE %] - [% acquisition_details.total_quantity %] items are on order. + [% acquisition_details.total_quantity %] items are on order. [% END %] [% END %] [% IF holds_count.defined || priority %]
    [% IF holds_count.defined %] - Total holds: [% holds_count %] + Total holds: [% holds_count %]i [% END %] [% IF priority %] [% IF holds_count.defined %] - (priority [% priority %]) + (priority [% priority %]) [% ELSE %] - Overall queue priority: [% priority %] + Overall queue priority: [% priority %] [% END %] [% END %]
    @@ -683,9 +683,9 @@ [% ELSE %] [% 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. + 1 item is on order. [% ELSE %] - [% acquisition_details.total_quantity %] items are on order. + [% acquisition_details.total_quantity %] items are on order. [% END %] [% ELSE %]
    No physical items for this record
    @@ -702,7 +702,7 @@ [% IF (otheritemloop.size) %] [% INCLUDE items_table items=otheritemloop tab="otherholdings" %] [% ELSE %] - No other items. + No other items. [% END %] [% INCLUDE shelfbrowser tab='otherholdings' %]
@@ -827,12 +827,12 @@ [% IF ( subscription.letter ) %][% END %] [% IF ( subscription.missinglist ) %] @@ -855,18 +855,18 @@ [% latestserial.serialseq %] [% latestserial.planneddate %] - [% 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 ) %]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 %] [% latestserial.notes %] @@ -996,12 +996,12 @@ [% XISBN.description %] [% END %] [% XISBN.title |html %] - [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %] - [% IF ( XISBN.copyrightdate ) %] ©[% XISBN.copyrightdate %][% END %] + [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %] + [% IF ( XISBN.copyrightdate ) %] ©[% XISBN.copyrightdate %][% END %] [% IF ( XISBN.publishercode ) %]

[% XISBN.publishercode |html %] [% IF ( XISBN.place ) %]([% XISBN.place %])[% END %] - [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear %][% END %] + [% IF ( XISBN.publicationyear ) _ ', ' _ XISBN.publicationyear %][% END %] [% IF ( XISBN.pages ) %][% XISBN.pages %] [% XISBN.illus %] [% XISBN.size %][% END %]

[% END %] @@ -1016,9 +1016,10 @@
[% FOREACH HTML5MediaSet IN HTML5MediaSets %]

- <[% HTML5MediaParent %] controls preload=none> - <[% HTML5MediaSet.child %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] /> - [[% HTML5MediaParent %] tag not supported by your browser.] + [% SET ctrl_preload = ' controls preload=none' #translatability %] + <[% HTML5MediaParent _ ctrl_preload %] > + <[% HTML5MediaSet.child _ 'src="' _ HTML5MediaSet.srcblock _'"' _ HTML5MediaSet.typeblock %] /> + [[% HTML5MediaParent %] tag not supported by your browser.]

[% END %] @@ -1066,11 +1067,8 @@
[% END # / IF Babeltheque %] - [% INCLUDE "openlibrary-readapi.inc" bib = { - normalized_isbn => normalized_isbn, - lccn => lccn, - normalized_oclc => normalized_oclc - } %] + [%# Following on one line due to translation issues %] + [% INCLUDE "openlibrary-readapi.inc" bib = { normalized_isbn => normalized_isbn,lccn => lccn, normalized_oclc => normalized_oclc } %]
@@ -1337,9 +1335,9 @@ [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %] [% IF ITEM_RESULT.priority %] [% IF holds_count.defined %] - (priority [% ITEM_RESULT.priority %]) + (priority [% ITEM_RESULT.priority %]) [% ELSE %] - [% ITEM_RESULT.priority %] + [% ITEM_RESULT.priority %] [% END %] [% END %] -- 2.39.5