Bug 11467

Summary: Untranslatable strings in opac-detail.tt
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: chris, f.demians, jonathan.druart, katrin.fischer, liz, mtj, mtompset, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, OpacBrowseResults)
Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, OpacBrowseResults)
Bug 11467: Bug Untranslatable srings in opac-detail.tt (IDreamBooks*, OpacBrowseResults)

Description Katrin Fischer 2014-01-02 08:38:22 UTC
Some strings in Javascript are not properly formatted for translation:

$(".title").append('<a href="'+json.book.detail_link+'" id="idreambooksreadometer"><img src="http://idreambooks.com/remotereadometer/'+isbn+'.jpg" alt="'+json.book.title+' by '+json.book.author+'" title="Rating based on reviews of '+json.book.title+'"></a>');

$("#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>");

if (arrPagination[i].author) html += "<br /> by " + arrPagination[i].author;
Comment 1 Katrin Fischer 2015-06-08 01:30:09 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-06-18 02:23:00 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-06-18 07:53:43 UTC
Created attachment 40253 [details] [review]
Bug 11467: 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'.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 4 Jonathan Druart 2015-06-18 07:54:27 UTC
Maybe the format js function could have been used to permit a better translation in some languages.
Comment 5 Katrin Fischer 2015-06-18 07:57:01 UTC
Hm, I forgot about that newer option.
Comment 6 Tomás Cohen Arazi 2015-06-19 14:47:54 UTC
Patch pushed to master.

Thanks Katrina!
Comment 7 Chris Cormack 2015-06-25 21:21:18 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 8 Liz Rea 2015-07-20 22:01:37 UTC
Pushed to 3.18.x, will be in 3.18.09
Comment 9 Mason James 2015-07-25 10:35:19 UTC
Contains string changes, holding till 3.16.14