From 33c7b21cde85230d4ea6080bfa85d70bf60ee587 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 7 Apr 2011 10:46:15 +0200 Subject: [PATCH] Bug 6084: Missing translation markers in javascript alert messages I ommited commented lines and "if $debug" lines too. Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack --- .../prog/en/includes/labels-batches-toolbar.inc | 10 +++++----- .../prog/en/includes/patroncards-batches-toolbar.inc | 10 +++++----- koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js | 2 +- .../prog/en/modules/acqui/neworderempty.tmpl | 4 ++-- .../prog/en/modules/admin/biblio_framework.tmpl | 2 +- .../intranet-tmpl/prog/en/modules/admin/cities.tmpl | 2 +- .../intranet-tmpl/prog/en/modules/admin/stopwords.tmpl | 2 +- .../prog/en/modules/cataloguing/additem.tmpl | 2 +- .../en/modules/cataloguing/value_builder/macles.tmpl | 2 +- .../prog/en/modules/labels/label-edit-batch.tmpl | 2 +- .../prog/en/modules/labels/label-manage.tmpl | 8 ++++---- .../prog/en/modules/offline_circ/process_koc.tmpl | 4 ++-- .../prog/en/modules/patroncards/image-manage.tmpl | 2 +- .../prog/en/modules/patroncards/manage.tmpl | 8 ++++---- .../prog/en/modules/serials/checkexpiration.tmpl | 2 +- .../prog/en/modules/serials/serials-recieve.tmpl | 2 +- .../prog/en/modules/tools/cleanborrowers.tmpl | 4 ++-- koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl | 4 ++-- 18 files changed, 36 insertions(+), 36 deletions(-) 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 f3a20060e9..77ee7d4796 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 @@ -22,7 +22,7 @@ } } 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("&"); @@ -34,7 +34,7 @@ // 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); @@ -67,7 +67,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("&"); @@ -76,7 +76,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=&" + getstr, 700, 800); @@ -101,7 +101,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 80e552e0e3..237c9aa058 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 @@ -22,7 +22,7 @@ } } 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("&"); @@ -34,7 +34,7 @@ // 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=&" + 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/xmlControlfield.js b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js index dca6e751ad..5acb5fde7e 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js @@ -209,7 +209,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) }).responseXML; if (this.xmlDoc) this.renderTemplate(); $("*").ajaxError(function(evt, request, settings){ - alert("AJAX error: receiving data from " + settings.url); + alert(_("AJAX error: receiving data from ") + settings.url); }); },//loadXmlValues 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 d8b34cef6b..52e9dc7e49 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -78,13 +78,13 @@ $(document).ready(function() // if user decreases the quantity if($(this).val() < ) { - 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() return false; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tmpl index 860f57a3a7..8d979e8220 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tmpl @@ -73,7 +73,7 @@ $(document).ready(function() { var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search); if (matches && matches.length > 1) { - alert("Error importing the framework " + decodeURIComponent(matches[1])); + alert(_("Error importing the framework ") + decodeURIComponent(matches[1])); } }); 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 dbe2612a1b..8b4aaa9293 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tmpl @@ -13,7 +13,7 @@ //"); } 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 161a041041..d5f98c4aed 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 to " + op + "."); + alert(_('Please select only one ')+''+_(' to')+op+'.'); return (-1); } } @@ -73,7 +73,7 @@ return(document.layouts.action.value); } }; - alert("Please select a ."); + alert(_('Please select a ')+'.'); 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 960052c3cc..260754c5f2 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() } @@ -84,4 +84,4 @@ function CheckForm(f) { - \ No newline at end of file + 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 0872d17f0c..ecf35119a1 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 08ab466187..a35eabddc5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/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 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 to " + op + "."); + alert(_('Please select only one ')+''+_(' to ') + op + '.'); return (-1); } } @@ -73,7 +73,7 @@ return(document.layouts.action.value); } }; - alert("Please select a ."); + alert(_('Please select a ')+'.'); 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 a2f78abc74..c839562ef7 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 b8d7b00427..009859678f 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(){

Note: Subscription is about to expire next issue.

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 331ec2c684..d9847dd93f 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/opac-tmpl/prog/en/modules/opac-review.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tmpl index bac63f6ad9..4397ef0a75 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) { - alert("injecting OLD comment: " +comment); + alert(_('injecting OLD comment: ')+comment); parent.opener.$('#c p').prev("small").prev("h5").html("Your Edited Comment (preview, pending approval)"); parent.opener.$('#c p').html(comment); parent.opener.$('#c p').append(" &reviewid=\');\">Edit<\/a>"); @@ -16,7 +16,7 @@ return 1; }; var inject_new = function(comment) { - alert("injecting NEW comment: " +comment); + alert(_("injecting NEW comment: ") +comment); parent.opener.$('#newcomment').attr("class","yours"); parent.opener.$('#newcomment').html( "
Your Comment (preview, pending approval)<\/h5>" + -- 2.39.5