Bugzilla – Attachment 65504 Details for
Bug 18754
Translatability: Get rid of exposed tt directives in opac-detail.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt
Bug-18754-Translatability-Get-rid-of-exposed-tt-di.patch (text/plain), 19.11 KB, created by
Marcel de Rooy
on 2017-08-04 14:49:48 UTC
(
hide
)
Description:
Bug 18754: Translatability: Get rid of exposed tt directives in opac-detail.tt
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-08-04 14:49:48 UTC
Size:
19.11 KB
patch
obsolete
>From 7e60ec9389a97cc534138f8786ae76754e1fd826 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 9 Jun 2017 15:43:36 +0200 >Subject: [PATCH] Bug 18754: Translatability: Get rid of exposed tt directives > in opac-detail.tt >Content-Type: text/plain; charset=utf-8 > >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> >--- > .../opac-tmpl/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 d95dc8c..71d82b9 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 @@ > <div class="main"> > <ul class="breadcrumb"> > <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >- <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> > </ul> > > <div class="container-fluid"> >@@ -243,8 +243,8 @@ > [% IF ( collectiontitle ) %] > <span class="results_summary collection"><span class="label">Collection: </span> > [% collectiontitle %] >- [% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %] >- [% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %] >+ [% IF ( collectionissn ) %] [% ', ISSN ' _ collectionissn %][% END %] >+ [% IF ( collectionvolume ) %] [% ' ; ' _ collectionvolume %] [% END %] > > </span> > [% END %] >@@ -303,9 +303,9 @@ > [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] > [% SUBFIELD.separator %] > [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] >- <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a> >+ <a role="button" data-toggle="modal" title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a> > [% ELSE %] >- <a title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value %]</a> >+ <a title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value %]</a> > [% END %] > [% END %] > [% IF (MARCSUBJCT.authoritylink) %] >@@ -540,17 +540,17 @@ > </div> <!-- / #catalogue_detail_biblio --> > > <div id="bibliodescriptions" class="toptabs"> >- > <ul> > [% IF ( defaulttab == 'holdings' ) %] > <li id="tab_holdings" class="ui-tabs-active"> > [% ELSE %] > <li id="tab_holdings"> > [% END %] >- <a href="#holdings">[% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %] [% UNLESS too_many_items %] ( [% itemloop.size || 0 %] )[% END %]</a> >+ [% BLOCK holding_tab_title %][% IF SeparateHoldings %]<span>[% LoginBranchname %] holdings</span>[% ELSE %]<span>Holdings</span>[% END %][% END %] >+ <a href="#holdings">[% INCLUDE holding_tab_title %] [% UNLESS too_many_items %][% ' ( ' _ (itemloop.size || 0) _ ' )' %][% END %]</a> > </li> > [% IF (SeparateHoldings) %] >- <li><a href="#otherholdings">Other holdings ( [% otheritemloop.size || 0 %] )</a></li> >+ <li><a href="#otherholdings">Other holdings [% ' ( ' _ (otheritemloop.size || 0) _ ' )' %]</a></li> > [% END %] > [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] > <li id="tab_descriptions"> <a href="#descriptions">Title notes</a></li> >@@ -593,7 +593,7 @@ > [% END %] > > [% IF Koha.Preference( 'reviewson' ) == 1 %] >- <li id="tab_comments"><a href="#comments">Comments ( [% reviews.size || 0 %] )</a></li> >+ <li id="tab_comments"><a href="#comments">Comments[% ' ( ' _ (reviews.size || 0) _ ' )' %]</a></li> > [% 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. >+ <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 %] > [% END %] > [% IF holds_count.defined || priority %] > <div id="bib_holds"> > [% IF holds_count.defined %] >- Total holds: [% holds_count %] >+ <span>Total holds: [% holds_count %]i</span> > [% END %] > [% IF priority %] > [% IF holds_count.defined %] >- (priority [% priority %]) >+ <span>(priority [% priority %])</span> > [% ELSE %] >- Overall queue priority: [% priority %] >+ <span>Overall queue priority: [% priority %]</span> > [% END %] > [% END %] > </div> >@@ -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. >+ <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 %] > </td> > <td>[% latestserial.notes %]</td> > </tr> >@@ -996,12 +996,12 @@ > <td>[% XISBN.description %]</td> > [% END %] > <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% XISBN.biblionumber %]">[% XISBN.title |html %]</a> >- [% IF ( XISBN.author ) %] by [% XISBN.author |html %][% END %] >- [% IF ( XISBN.copyrightdate ) %] ©[% XISBN.copyrightdate %][% END %] >+ [% IF ( XISBN.author ) %]<span> by </span>[% XISBN.author |html %][% END %] >+ [% IF ( XISBN.copyrightdate ) %]<span> ©</span>[% XISBN.copyrightdate %][% END %] > [% IF ( XISBN.publishercode ) %] > <p>[% 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 %] > </p> > [% END %] >@@ -1016,9 +1016,10 @@ > <div id="html5media"> > [% FOREACH HTML5MediaSet IN HTML5MediaSets %] > <p> >- <[% 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 %] /> >+ <span>[[% HTML5MediaParent %] tag not supported by your browser.]</span> > </[% HTML5MediaParent %]> > </p> > [% END %] >@@ -1066,11 +1067,8 @@ > </div> > [% 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 } %] > > </div> <!-- /.span9 --> > >@@ -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 %]) >+ <span>(priority [% ITEM_RESULT.priority %])</span> > [% ELSE %] >- [% ITEM_RESULT.priority %] >+ <span>[% ITEM_RESULT.priority %]</span> > [% END %] > [% END %] > </td> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18754
:
64132
|
64178
|
65412
| 65504 |
65505