Bugzilla – Attachment 40251 Details for
Bug 11467
Untranslatable strings in opac-detail.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, OpacBrowseResults)
Bug-Untranslatable-srings-in-opac-detailtt-IDreamB.patch (text/plain), 7.18 KB, created by
Mark Tompsett
on 2015-06-18 02:23:00 UTC
(
hide
)
Description:
Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, OpacBrowseResults)
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-18 02:23:00 UTC
Size:
7.18 KB
patch
obsolete
>From 818b32791544158aa367988a419a33d9542964b4 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Mon, 8 Jun 2015 03:18:35 +0200 >Subject: [PATCH] Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, > OpacBrowseResults) > >Patch marks several strings in the Javascript on the OPAC detail >and result page for translation. > >1) IDreamBooks* >- Activate the 3 IDreamBooks* system preferences >- Check the 'cloud' and additional content shows up correctly on > the detail and result pages >- Verify everything works as expected and the same as without the patch > >2) OpacBrowseResults >- Activate OpacBrowseResults >- Do various searches >- Verify the nex, previous, browse result list features still > work the same as without the patch > >Bonus: Check new strings appear in the .po files by updating one > language with the patch applied (perl translate update de-DE) > >NOTE: Really should have read the test plan more closely. > I couldn't find the 'Go to detail:' section, until I clicked > 'Browse results'. > >http://bugs.koha-community.org/show_bug.cgi?id=11467 > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 ++++---- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- > 2 files changed, 6 insertions(+), 6 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 840f6ec..7d3c84c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1635,7 +1635,7 @@ > isbn = isbn.replace(/-/, ''); > > [% IF ( IDreamBooksReadometer ) %] >- $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+' by '+json.book.author+'" title="Rating based on reviews of '+json.book.title+'"></a>'); >+ $(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="https://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+_(" by ")+json.book.author+'" title="'+_("Rating based on reviews of ")+json.book.title+'"></a>'); > [% END %] > > [% IF ( IDreamBooksReviews ) %] >@@ -1644,11 +1644,11 @@ > > //append happy-sad cloud review > >- $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>rating based on reviews at iDreamBooks.com</a></span>"); >+ $("#catalogue_detail_biblio").append("<span class='idreambookssummary results_summary'><a href='"+json.book.detail_link+"'><img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%</a> <a href='http://www.idreambooks.com/'>"+_("rating based on reviews at iDreamBooks.com")+"</a></span>"); > > //insert data into Book reviews tab > $.each(json.book.critic_reviews, function(){ >- $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>Review date: "+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>Review result: "+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='iDreamBooks.com rating' title='"+this.pos_or_neg+"' /></a></div></div>"); >+ $("#idb_review_snippets").append("<div class='review'><div><a href='"+this.review_link+"'>"+this.source+"</a></div><div>\"..."+this.snippet+"...\"</div><div>"+_("Review date: ")+this.review_date+"</div><div><a class='reviewlink' href='"+json.book.detail_link+"'>"+_("Review result: ")+this.pos_or_neg+" <img src='"+this.smiley_or_sad_small+"' alt='"+_("iDreamBooks.com rating")+"' title='"+this.pos_or_neg+"' /></a></div></div>"); > }); > $("#seemoreidb").attr('href', json.book.detail_link); > $("#tab_idb_critic_reviews").show(); >@@ -1751,7 +1751,7 @@ > if (arrPagination[i] == undefined || arrPagination[i].url == "") continue; > var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"") + " title='" + _("Go to detail") + "' />"); > var html = "<span class='li_pag_index'>" + i + "</span><a href='" + arrPagination[i].url + "'>" + arrPagination[i].title + "</a>"; >- if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author; >+ if (arrPagination[i].author) html += "<br /> " + _("by") + " " + arrPagination[i].author; > li.html(html); > if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD"); > ul.append(li); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index d905f13..bbc5c2e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -716,7 +716,7 @@ $(document).ready(function(){ > json = 'json = '+xdr.responseText; // the string now looks like.. json = { ... }; > eval(json); // json is now a regular JSON object > if(json.total_results > 0 && json.book.rating > 0){ >- $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%"); >+ $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%"); > $(element).show(); > } else { > $(element).remove(); >@@ -726,7 +726,7 @@ $(document).ready(function(){ > } else { > $.getJSON("https://idreambooks.com/newbooks/api.json?q="+encodeURIComponent(isbn)+"&key=8bf66516232d1b72f3e47df939653e1e", function(json){ > if(json.total_results > 0 && json.book.rating > 0){ >- $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+" by "+json.book.author+"' title='Rating based on reviews of "+json.book.title+"'>"+json.book.rating+"%"); >+ $(element).children('a').html("<img src='"+json.book.to_read_or_not_small+"' alt='"+json.book.title+_(" by ")+json.book.author+"' title='"+_("Rating based on reviews of ")+json.book.title+"'>"+json.book.rating+"%"); > $(element).show(); > } else { > $(element).remove(); >-- >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 11467
:
39968
|
40251
|
40253