Bugzilla – Attachment 18665 Details for
Bug 10249
Untranslatable strings in Javascript on OPAC detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10249: Fix untranslatable strings in OPAC detail page
Bug-10249-Fix-untranslatable-strings-in-OPAC-detai.patch (text/plain), 6.66 KB, created by
Chris Cormack
on 2013-06-05 09:22:06 UTC
(
hide
)
Description:
Bug 10249: Fix untranslatable strings in OPAC detail page
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-06-05 09:22:06 UTC
Size:
6.66 KB
patch
obsolete
>From c535325c7a963682ff4dddf6cc895af0b459c1d5 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 19 May 2013 10:56:01 +0200 >Subject: [PATCH] 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> >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 22 ++++++++++---------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 1effd07..37f5f5b 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -184,17 +184,17 @@ $(function () { > }, function (data) { > > if (data.auth_status != 'ok') { >- window.alert('Your CGI session cookie is not current. Please refresh the page and try again.'); >+ window.alert(_("Your CGI session cookie is not current. Please refresh the page and try again.")); > } else { > $("#rating_value").val(data.rating_value); > > if (data.rating_value) { >- $("#rating_value_text").text('your rating: ' + data.rating_value + ', '); >+ $("#rating_value_text").text(_("your rating:") + ' ' + data.rating_value + ', '); > } else { > $("#rating_value_text").text(''); > } > >- $("#rating_text").text('average rating: ' + data.rating_avg_int + ' (' + data.rating_total + ' votes)'); >+ $("#rating_text").text(_("average rating:") + " " + data.rating_avg_int + ' (' + data.rating_total + ' votes)'); > > } > }, "json"); >@@ -317,7 +317,7 @@ function renderPagIndexList(index, ul) > var ini = index - 1; > var end = ini + totalPagItemList - 1; > li = $("<li />"); >- html = (index > pag_index_ini)?"<a href='#' id='rew_list_index' onclick='rewindList()' title='Click to rewind the list to " + ini + " - " + end + "'>«</a>":"«"; >+ html = (index > pag_index_ini)?"<a href='#' id='rew_list_index' onclick='rewindList()' title='" + _("Click to rewind the list to") + " " + ini + " - " + end + "'>«</a>":"«"; > li.html(html); > ul.append(li); > var title = ""; >@@ -325,9 +325,9 @@ function renderPagIndexList(index, ul) > if (arrPagination[i] == undefined) continue; > var li = $("<li />"); > if (arrPagination[i].url != "") { >- title = "See biblio "" + arrPagination[i].title + "" "; >- if (arrPagination[i].author != "") title += " by "" + arrPagination[i].author + """; >- title += " with biblionumber " + arrPagination[i].biblionumber; >+ title = _("See biblio") + " "" + arrPagination[i].title + "" "; >+ if (arrPagination[i].author != "") title += " " + _("by") + """ + arrPagination[i].author + """; >+ title += " " + _("with biblionumber") + " " + arrPagination[i].biblionumber; > html = "<a href='" + arrPagination[i].url + "' title='" + title + "' class='a_pag' id='a_pag_" + i + "'"; > html += " onmouseover='renderPagination(" + i + ", " + (arrPagination.length - 1) + ", $(\"#ul_pagination_list\"), true)'"; > html += ">" + i + "</a>"; >@@ -339,7 +339,7 @@ function renderPagIndexList(index, ul) > li = $("<li />"); > ini = index + 1; > end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1; >- html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"<a href='#' id='fw_list_index' onclick='forwardList()' title='Click to forward the list to " + ini + " - " + end + "'>»</a>":"»"; >+ html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"<a href='#' id='fw_list_index' onclick='forwardList()' title='" + _("Click to forward the list to") + " " + ini + " - " + end + "'>»</a>":"»"; > li.html(html); > ul.append(li); > }//renderPagIndexList >@@ -354,7 +354,7 @@ function renderPagination(index, total, ul, highlIndex) > var j = 0; > for (var i = index; i <= total && j < totalPagItemList; i++) { > 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 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; > li.html(html); >@@ -365,9 +365,9 @@ function renderPagination(index, total, ul, highlIndex) > for (i = pag_index_ini; i < index && j < totalPagItemList; i++) { > if (arrPagination[i] == undefined || arrPagination[i].url == "") continue; > $("#li_pag_" + i).remove(); >- var li = $("<li id='li_pag_" + i + "' " + ((j % 2 == 0)?"class='highlight'":"") + " title='Go to detail' />"); >+ 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); > ul.append(li); > j++; >-- >1.7.10.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 10249
:
18235
|
18646
| 18665