Bug 10249

Summary: Untranslatable strings in Javascript on OPAC detail page
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: bgkriegel, chrish, gmcharlt, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 10249: Fix untranslatable strings in OPAC detail page
Bug 10249: Fix untranslatable strings in OPAC detail page
Bug 10249: Fix untranslatable strings in OPAC detail page

Description Katrin Fischer 2013-05-15 09:59:42 UTC
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt

Untranslatable strings are:
178 Your rating
343,354 Go to detail
328 Click to forward the list to
306 Click to rewind the list to

Also some CSS is hardcoded, as a background color on line 347
if (highlIndex && i == index) li.css("backgroundColor", "#DDDDDD"); 

I think one possible solution would be to use variables in those places and then have something like
var sth = _("Go to detail")
Comment 1 Katrin Fischer 2013-05-15 10:06:57 UTC
Also 'by' in a few lines.
Everything that builds HTML-Tags with Javascript is a bit suspicious.
Comment 2 Katrin Fischer 2013-05-19 09:31:48 UTC Comment hidden (obsolete)
Comment 3 Jared Camins-Esakov 2013-06-04 18:14:42 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2013-06-05 09:22:06 UTC
Created attachment 18665 [details] [review]
Bug 10249: Fix untranslatable strings in OPAC detail page

Star ratings feature:
- Your CGI session cookie is not current. Please refresh
  the page and try again.
- average rating:
- your rating:

Browse results feature:
- Click to rewind the list to
- See biblio
- with biblionumber
- by (between title and author)
- Click to forward the list to
- Go to detail

To test:
- Update the po file using 'perl translate update <langcode>'
- Translate all new strings, maybe mark them with XX to make it easier
  to find them
- Install the updated translation file using 'perl translate install
  <langcode>'
- Test the ratings and browse results features in the OPAC detail page
- Verify everything is still working/displaying like it should
- Check that you don't find any unstranslated strings/terms

Some hints where the changes are:
- Change an existing rating - the average and your rating will change
- Browse result list and check mouse over tooltips for all links

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Strings are now translated, and no emergent JS errors have revealed
themselves.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 5 Galen Charlton 2013-06-05 14:26:10 UTC
Pushed to master.  Thanks, Katrin!
Comment 6 Tomás Cohen Arazi (tcohen) 2013-06-10 16:09:12 UTC
This patch has been pushed to 3.12.x, will be in 3.12.1.

Thanks Katrin!.
Comment 7 Bernardo Gonzalez Kriegel 2013-06-14 20:12:20 UTC
Pushed to 3.10.x, will be in 3.10.7
Comment 8 Chris Hall 2013-06-17 09:06:55 UTC
Pushed to 3.8.x, will be in 3.8.14