From 01745dbaf6a5743aa3683e9fe33e7d0cf7d78ed3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi <tomascohen@gmail.com> Date: Mon, 18 Apr 2011 08:04:52 -0300 Subject: [PATCH] [3.2.x] Bug 6084 - Missing translation markers in javascript alert messages Content-Type: text/plain; charset="utf-8" Wrap alert string with _() so they became translatable. Commented and 'if $debug' lines are ommited in the process. Places to fix where found with To+ I ommited commented lines and "if $debug" lines too. --- .../prog/en/includes/background-job.inc | 2 +- .../intranet-tmpl/prog/en/includes/calendar.inc | 4 ++-- .../prog/en/includes/labels-batches-toolbar.inc | 14 +++++++------- .../en/includes/patroncards-batches-toolbar.inc | 14 +++++++------- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 4 ++-- .../prog/en/modules/acqui/neworderempty.tmpl | 4 ++-- .../prog/en/modules/admin/cities.tmpl | 2 +- .../prog/en/modules/admin/stopwords.tmpl | 2 +- .../prog/en/modules/cataloguing/additem.tmpl | 2 +- .../modules/cataloguing/value_builder/macles.tmpl | 2 +- .../prog/en/modules/labels/label-manage.tmpl | 8 ++++---- .../prog/en/modules/offline_circ/process_koc.tmpl | 6 +++--- .../prog/en/modules/patroncards/image-manage.tmpl | 2 +- .../prog/en/modules/patroncards/manage.tmpl | 10 +++++----- .../prog/en/modules/serials/checkexpiration.tmpl | 2 +- .../prog/en/modules/serials/serials-recieve.tmpl | 2 +- .../prog/en/modules/tools/cleanborrowers.tmpl | 4 ++-- .../prog/en/modules/tools/stage-marc-import.tmpl | 2 +- koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc | 2 +- .../prog/en/modules/opac-results-grouped.tmpl | 4 ++-- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 4 ++-- .../opac-tmpl/prog/en/modules/opac-review.tmpl | 4 ++-- 22 files changed, 50 insertions(+), 50 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc index 7d65d4d..3adc93a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc @@ -73,7 +73,7 @@ backgroundJobProgressTimer = setInterval("updateJobProgress()", 500); }, error: function(xml, textStatus) { - alert('Failed to submit form: ' + textStatus); + alert(_('Failed to submit form')+': '+ textStatus); } }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index aa6e9c7..8600ed9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -79,7 +79,7 @@ function Date_from_syspref(dstring) { } else if (dformat === "metric") { return new Date(dateX[2], (dateX[1] - 1), dateX[0]); // DD/MM/YYYY to (YYYY,m(0-11),d) } else { - if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);} + if (debug > 0) {alert(_("KOHA ERROR - Unrecognized date format: ") +dformat);} return 0; } } @@ -92,7 +92,7 @@ function get_Calendar_limit (date,did) { if (debug && debug > 5) { var month = date.getMonth() + 1; var dateString = date.getFullYear() + '-' + month + '-' + date.getDate(); - alert("Comparing incoming (" + dateString + ") vs " + alert(_('Comparing incoming ')+'(' + dateString + ') vs ' + "'" + did + "' limit\n" + "\n thisdate: " + date + "\nlimitdate: " + limitDate diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc index 47a0b8f..4a0d4ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc @@ -2,7 +2,7 @@ <script type="text/JavaScript"> //<![CDATA[ function DeleteConfirm() { - var msg = "Are you sure you want to delete batch <!-- TMPL_VAR NAME="batch_id" -->?" + var msg = _('Are you sure you want to delete batch')+' <!-- TMPL_VAR NAME="batch_id" -->?'; var answer = confirm(msg); if (answer) { window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&label_element=batch&element_id=<!-- TMPL_VAR NAME="batch_id" -->"; @@ -22,19 +22,19 @@ } } if (items.length < 1) { - alert("Please select at least one item to delete."); + alert(_('Please select at least one item to delete.')); return; // no item selected } getstr = items.join("&"); item_msg = item_num.join(", "); - var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?" + var msg = _('Are you sure you want to remove label number(s):')+' '+ item_msg + _(' from this batch?'); } // else if (document.items.action.checked) { // getstr = "label_id="+document.items.action.value; // var msg = "Are you sure you want to remove selected item from this batch?" // } else { - alert("Please select at least label to delete."); + alert(_('Please select at least label to delete.')); return; // no item selected } var answer = confirm(msg); @@ -61,7 +61,7 @@ } } if (labels.length < 1) { - alert("Please select at least one label to export."); + alert(_('Please select at least one label to export.')); return; // no batch selected } getstr = labels.join("&"); @@ -70,7 +70,7 @@ getstr = document.items.action.value; } else { - alert("Please select at least one label to export."); + alert(_('Please select at least one label to export.')); return; // no batch selected } return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&" + getstr, 700, 800); @@ -95,7 +95,7 @@ return(document.items.action.value); } }; - alert("Please select at least one item."); + alert(_('Please select at least one item.')); return (-1); }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-batches-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-batches-toolbar.inc index 80e552e..43b1330 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-batches-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-batches-toolbar.inc @@ -2,7 +2,7 @@ <script type="text/JavaScript"> //<![CDATA[ function DeleteConfirm() { - var msg = "Are you sure you want to delete batch <!-- TMPL_VAR NAME="batch_id" -->?" + var msg = _('Are you sure you want to delete batch')+' <!-- TMPL_VAR NAME="batch_id" -->?'; var answer = confirm(msg); if (answer) { window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=batch&element_id=<!-- TMPL_VAR NAME="batch_id" -->"; @@ -22,19 +22,19 @@ } } if (items.length < 1) { - alert("Please select at least one item to delete."); + alert(_('Please select at least one item to delete.')); return; // no item selected } getstr = items.join("&"); item_msg = item_num.join(", "); - var msg = "Are you sure you want to remove card number(s): " + item_msg + " from this batch?" + var msg = _('Are you sure you want to remove card number(s):')+' '+ item_msg + ' ' + _('from this batch?'); } // else if (document.items.action.checked) { // getstr = "label_id="+document.items.action.value; // var msg = "Are you sure you want to remove selected item from this batch?" // } else { - alert("Please select at least label to delete."); + alert(_('Please select at least label to delete.')); return; // no item selected } var answer = confirm(msg); @@ -61,7 +61,7 @@ } } if (patroncards.length < 1) { - alert("Please select at least one card to export."); + alert(_('Please select at least one card to export.')); return; // no batch selected } getstr = patroncards.join("&"); @@ -70,7 +70,7 @@ getstr = document.items.action.value; } else { - alert("Please select at least one card to export."); + alert(_('Please select at least one card to export.')); return; // no batch selected } return GB_showCenter('Export Labels', "/cgi-bin/koha/patroncards/print.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&" + getstr, 700, 800); @@ -95,7 +95,7 @@ return(document.items.action.value); } }; - alert("Please select at least one item."); + alert(_('Please select at least one item.')); return (-1); }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 4b65f82..2ab031b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -4,7 +4,7 @@ function uncheckbox(form, field) { var price = new Number(form.elements['price' + field].value); var tmpprice = ""; - var errmsg = "ERROR: Price is not a valid number, please check the price and try again!" + var errmsg = _('ERROR: Price is not a valid number, please check the price and try again!'); if (isNaN(price)) { alert(errmsg); for(var i=0; i<form.elements['price' + field].value.length; ++i) { @@ -384,7 +384,7 @@ function closeandprint(bg){ if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){ setTimeout("window.location.reload();",3000); }else{ - alert('Error downloading the file'); + alert(_('Error downloading the file')); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 133a9ae..c3c2b1c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -77,13 +77,13 @@ $(document).ready(function() // if user decreases the quantity if($(this).val() < <!-- TMPL_VAR name="quantityrec" -->) { - alert("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"); + alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog")); return true; } else { // if user increases the quantity - alert("You can't add a new item, please create a new order line"); + alert(_("You can't add a new item, please create a new order line")); // and we replace the original value $(this).val(<!-- TMPL_VAR name="quantityrec" -->) return false; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl index 203d19b..2d725f4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl @@ -5,7 +5,7 @@ //<![CDATA[ function Check(f) { if (f.city_zipcode.value.length == 0 && f.city_name.value.length == 0 ) { - alert("City name & zipcode missing"); + alert(_('City name & zipcode missing')); } else{ document.Aform.submit(); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl index 6fc0148..7b2a92b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tmpl @@ -19,7 +19,7 @@ } function Check(f) { if (f.word.value.length==0) { - alert("Form not submitted: word missing"); + alert(_('Form not submitted: word missing')); } else { document.Aform.submit(); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl index 6a32740..3cda858 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tmpl @@ -160,7 +160,7 @@ $(document).ready(function() { }); function set_to_today(id, force) { - if (! id) { alert("Bad id " + id + " sent to set_to_today()"); return 0; } + if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; } if ($("#" + id).val() == '' || $("#" + id).val() == '0000-00-00' || force) { $("#" + id).val("<!-- TMPL_VAR NAME="today_iso" -->"); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tmpl index 161a041..d5f98c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/macles.tmpl @@ -157,7 +157,7 @@ function add_macles(myvalue) //for (i=0;i< (mycountMACLESgen - mycountMACLESinit);i++){ // PluginAddField(myvalue); //} - alert("veuillez d'abord creer le nombre de champs necessaires "); + alert(_("veuillez d'abord creer le nombre de champs necessaires ")); } else { // Pour chaque valeur cochee, ajouter la valeur dans un noeud MACLES. for (i=0;i<tab.length;i++){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tmpl index 31fcf16..2157a49 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tmpl @@ -38,7 +38,7 @@ } } if (batches.length < 1) { - alert("Please select at least one batch to export."); + alert(_("Please select at least one batch to export.")); return; // no batch selected } getstr = batches.join("&"); @@ -47,7 +47,7 @@ getstr = "batch_id="+document.layouts.action.value; } else { - alert("Please select at least one batch to export."); + alert(_("Please select at least one batch to export.")); return; // no batch selected } return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?" + getstr, 700, 800); @@ -64,7 +64,7 @@ return(document.layouts.action[selected[0]].value); } else { - alert("Please select only one <!-- TMPL_VAR NAME="label_element" --> to " + op + "."); + alert(_('Please select only one ')+'<!-- TMPL_VAR NAME="label_element" -->'+_(' to ') + op + '.'); return (-1); } } @@ -73,7 +73,7 @@ return(document.layouts.action.value); } }; - alert("Please select a <!-- TMPL_VAR NAME="label_element" -->."); + alert(_('Please select a ')+'<!-- TMPL_VAR NAME="label_element" -->.'); return (-1); }; //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tmpl index 960052c..250f1b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tmpl @@ -10,7 +10,7 @@ $(document).ready(function(){ }); function CheckUpload(f){ if(f.fileToUpload.value == ""){ - alert("Please choose a file to upload"); + alert(_("Please choose a file to upload")); } else { return ajaxFileUpload() } @@ -18,7 +18,7 @@ function CheckUpload(f){ } function CheckForm(f) { if (f.uploadedfileid.value == '') { - alert('Please upload a file first.'); + alert(_('Please upload a file first.')); } else { $("#fileuploadstatus").hide(); $("#fileuploadform").slideUp(); @@ -84,4 +84,4 @@ function CheckForm(f) { </div> -<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" --> \ No newline at end of file +<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" --> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tmpl index 0872d17..ecf3511 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tmpl @@ -32,7 +32,7 @@ else if (document.delete_images.action.checked){ return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value}; }; - alert("Please select image(s) to " + op + "."); + alert(_("Please select image(s) to ") + op + "."); return (-1); }; function showHideLayers(element, time, action) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tmpl index 08ab466..d614d2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tmpl @@ -7,7 +7,7 @@ function DeleteConfirm() { var element_id = selected_layout("delete"); if (element_id>-1) { - var msg = "Are you sure you want to delete <!-- TMPL_VAR NAME="card_element" --> " + element_id + "?" + var msg = _('Are you sure you want to delete ').'<!-- TMPL_VAR NAME="card_element" --> ' + element_id + '?'; var answer = confirm(msg); if (answer) { window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=<!-- TMPL_VAR NAME="card_element" -->&element_id=" + element_id; @@ -38,7 +38,7 @@ } } if (batches.length < 1) { - alert("Please select at least one batch to export."); + alert(_('Please select at least one batch to export.')); return; // no batch selected } getstr = batches.join("&"); @@ -47,7 +47,7 @@ getstr = "batch_id="+document.layouts.action.value; } else { - alert("Please select at least one batch to export."); + alert(_('Please select at least one batch to export.')); return; // no batch selected } return GB_showCenter('Export Patron Cards', "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800); @@ -64,7 +64,7 @@ return(document.layouts.action[selected[0]].value); } else { - alert("Please select only one <!-- TMPL_VAR NAME="card_element" --> to " + op + "."); + alert(_('Please select only one ')+'<!-- TMPL_VAR NAME="card_element" --> '+_('to ')+ op + '.'); return (-1); } } @@ -73,7 +73,7 @@ return(document.layouts.action.value); } }; - alert("Please select a <!-- TMPL_VAR NAME="card_element" -->."); + alert(_('Please select a ')+'<!-- TMPL_VAR NAME="card_element" -->.'); return (-1); }; //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tmpl index a2f78ab..1a53536 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tmpl @@ -13,7 +13,7 @@ return true; } else { - alert("You must enter a date !"); + alert(_('You must enter a date !')); document.f.date.focus(); return false; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tmpl index b8d7b00..be6bac9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tmpl @@ -306,7 +306,7 @@ function barcode_check(){ <h3>Note: Subscription is about to expire next issue.</h3> <script type="text/javascript"> <!-- - alert("Subscription is about to expire next issue"); + alert(_('Subscription is about to expire next issue')); //--> </script> <!-- /TMPL_IF --> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tmpl index 331ec2c..d9847dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tmpl @@ -11,14 +11,14 @@ function checkForm(form) { if((form.checkbox[0].checked)){ if(!(form.date1.value)){ - alert("please enter a date !"); + alert(_("please enter a date !")); document.form.date1.focus(); return false; } } if((form.checkbox[1].checked)){ if(!(form.date2.value)){ - alert("please enter a date !"); + alert(_("please enter a date !")); document.form.date2.focus(); return false; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl index 4e43c72..4863f9d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl @@ -14,7 +14,7 @@ $(document).ready(function(){ }); function CheckForm(f) { if ($("#fileToUpload").value == '') { - alert('Please upload a file first.'); + alert(_('Please upload a file first.')); } else { return submitBackgroundJob(f); } diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc index c36daa6..4b0fce6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc @@ -32,7 +32,7 @@ function get_Calendar_limit (date,did) { if (debug && debug > 5) { var month = date.getMonth() + 1; var dateString = date.getFullYear() + '-' + month + '-' + date.getDate(); - alert("Comparing incoming (" + dateString + ") vs " + alert(_("Comparing incoming (") + dateString + ") vs " + "'" + did + "' limit\n" + "\n thisdate: " + date + "\nlimitdate: " + limitDate diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl index cb8ecd3..8092478 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tmpl @@ -34,12 +34,12 @@ $(document).ready(function(){ var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); <!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) { Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd()); - }<!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF --> + }<!-- TMPL_ELSE --> alert(_('You must be logged in to create or add to Lists')); <!-- /TMPL_IF --> return false; } else if($("#addto").find("option:selected").attr("value") == "newlist"){ <!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) { Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd()); - }<!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF --> + }<!-- TMPL_ELSE --> alert(_('You must be logged in to create or add to Lists')); <!-- /TMPL_IF --> return false; } if($("#addto").find("option:selected").attr("value") == "addtocart"){ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index 5485237..653733a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -164,12 +164,12 @@ $(document).ready(function(){ } else if($("#addto").find("option:selected").attr("value") == "newlist"){ <!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) { Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd()); - }<!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF --> + }<!-- TMPL_ELSE --> alert(_('You must be logged in to create or add to Lists')); <!-- /TMPL_IF --> return false; } else if($("#addto").find("option:selected").attr("value") == "morelists"){ <!-- TMPL_IF NAME="loggedinusername" -->if (vShelfAdd()) { Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd()); - }<!-- TMPL_ELSE --> alert('You must be logged in to create or add to Lists'); <!-- /TMPL_IF --> + }<!-- TMPL_ELSE --> alert(_('You must be logged in to create or add to Lists')); <!-- /TMPL_IF --> return false; } if($("#addto").find("option:selected").attr("value") == "addtocart" || $("#addto").attr("class") == "addtocart"){ diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl index 573295e..f43d8e4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl @@ -8,7 +8,7 @@ $(document).ready(function() { var inject_old = function(comment) { <!-- TMPL_IF NAME="reviewid" --> - <!-- TMPL_IF NAME="cgi_debug" -->alert("injecting OLD comment: " +comment);<!-- /TMPL_IF --> + <!-- TMPL_IF NAME="cgi_debug" -->alert(_("injecting OLD comment: ") +comment);<!-- /TMPL_IF --> parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)"); parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').html(comment); parent.opener.$('#c<!-- TMPL_VAR NAME="reviewid" --> p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&reviewid=<!-- TMPL_VAR NAME="reviewid" -->\');\">Edit<\/a>"); @@ -16,7 +16,7 @@ return 1; }; var inject_new = function(comment) { - <!-- TMPL_IF NAME="cgi_debug" -->alert("injecting NEW comment: " +comment);<!-- /TMPL_IF --> + <!-- TMPL_IF NAME="cgi_debug" -->alert(_("injecting NEW comment: ") +comment);<!-- /TMPL_IF --> parent.opener.$('#newcomment').attr("class","yours"); parent.opener.$('#newcomment').html( "<h5>Your Comment (preview, pending approval)<\/h5>" + -- 1.7.1