Bug 10249 - Untranslatable strings in Javascript on OPAC detail page
Summary: Untranslatable strings in Javascript on OPAC detail page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 09:59 UTC by Katrin Fischer
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10249: Fix untranslatable strings in OPAC detail page (6.46 KB, patch)
2013-05-19 09:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10249: Fix untranslatable strings in OPAC detail page (6.60 KB, patch)
2013-06-04 18:14 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 10249: Fix untranslatable strings in OPAC detail page (6.66 KB, patch)
2013-06-05 09:22 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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