From a6cf34d164c045bbd5e7ea250eae9fb666ccbb13 Mon Sep 17 00:00:00 2001 From: Katrin Fischer 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 ' - 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 ' - 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 Strings are now translated, and no emergent JS errors have revealed themselves. Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton (cherry picked from commit 787a480626be474afa65737ae37a6c07cad0b1c7) Signed-off-by: Tomas Cohen Arazi --- .../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 390a9f061c..b1723e3c38 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -170,17 +170,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"); @@ -303,7 +303,7 @@ function renderPagIndexList(index, ul) var ini = index - 1; var end = ini + totalPagItemList - 1; li = $("
  • "); - html = (index > pag_index_ini)?"«":"«"; + html = (index > pag_index_ini)?"«":"«"; li.html(html); ul.append(li); var title = ""; @@ -311,9 +311,9 @@ function renderPagIndexList(index, ul) if (arrPagination[i] == undefined) continue; var 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 = ""; @@ -325,7 +325,7 @@ function renderPagIndexList(index, ul) li = $("
  • "); ini = index + 1; end = (arrPagination.length > index + totalPagItemList)?index + totalPagItemList:arrPagination.length - 1; - html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"»":"»"; + html = (end <= arrPagination.length - 1 && (end - index) >= totalPagItemList)?"»":"»"; li.html(html); ul.append(li); }//renderPagIndexList @@ -340,7 +340,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 = $("
  • "); + var li = $("
  • "); var html = "" + i + "" + arrPagination[i].title + ""; if (arrPagination[i].author) html += "
    by " + arrPagination[i].author; li.html(html); @@ -351,9 +351,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 = $("
  • "); + var li = $("
  • "); var html = "" + i + "" + arrPagination[i].title + ""; - if (arrPagination[i].author) html += "
    by " + arrPagination[i].author; + if (arrPagination[i].author) html += "
    " + _("by") + " " + arrPagination[i].author; li.html(html); ul.append(li); j++; -- 2.39.5