View | Details | Raw Unified | Return to bug 12138
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (-8 / +8 lines)
Lines 35-58 Link Here
35
        var countdeletedorders = [% countdeletedorders %];
35
        var countdeletedorders = [% countdeletedorders %];
36
        var is_confirmed;
36
        var is_confirmed;
37
	if (count > 0){
37
	if (count > 0){
38
            is_confirmed = alert( count + " " +_("item(s) are attached to this record. You must delete all items before deleting this record.") );
38
            is_confirmed = alert( _("%s item(s) are attached to this record. You must delete all items before deleting this record.").format(count) );
39
         }
39
         }
40
        else if (countorders > 0){
40
        else if (countorders > 0){
41
            [% IF ( CAN_user_acquisition_order_manage ) %]
41
            [% IF ( CAN_user_acquisition_order_manage ) %]
42
                is_confirmed = confirm( _("Warning: This record is used in")+" "+ countorders + " " +_("order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?") );
42
                is_confirmed = confirm( _("Warning: This record is used in %s order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?").format(countorders) );
43
            [% ELSE %]
43
            [% ELSE %]
44
                is_confirmed = alert( countorders + " " +_("order(s) are using this record. You need order managing permissions to delete this record.") );
44
                is_confirmed = alert( _("%s order(s) are using this record. You need order managing permissions to delete this record.").format(countorders) );
45
            [% END %]
45
            [% END %]
46
        }
46
        }
47
        else if (countdeletedorders > 0){
47
        else if (countdeletedorders > 0){
48
             [% IF ( CAN_user_acquisition_order_manage ) %]
48
             [% IF ( CAN_user_acquisition_order_manage ) %]
49
                 is_confirmed = confirm( countdeletedorders + " " +_("deleted order(s) are using this record. Are you sure you want to delete this record?") );
49
                 is_confirmed = confirm( _("%s deleted order(s) are using this record. Are you sure you want to delete this record?").format(countdeletedorders) );
50
             [% ELSE %]
50
             [% ELSE %]
51
                 is_confirmed = alert( countdeletedorders + " " +_("deleted order(s) are using this record. You need order managing permissions to delete this record.") );
51
                 is_confirmed = alert( _("%s deleted order(s) are using this record. You need order managing permissions to delete this record.").format(countdeletedorders) );
52
             [% END %]
52
             [% END %]
53
        }
53
        }
54
        else if ( holdcount > 0 ) {
54
        else if ( holdcount > 0 ) {
55
            is_confirmed = confirm( holdcount + " " + _("holds(s) for this record. Are you sure you want to delete this record?"));
55
            is_confirmed = confirm( _("%s holds(s) for this record. Are you sure you want to delete this record?").format(holdcount) );
56
        } else {
56
        } else {
57
            is_confirmed = confirm(_("Are you sure you want to delete this record?"));
57
            is_confirmed = confirm(_("Are you sure you want to delete this record?"));
58
        }
58
        }
Lines 74-82 Link Here
74
        var holdcount = [% holdcount %];
74
        var holdcount = [% holdcount %];
75
75
76
        if ( holdcount > 0 ) {
76
        if ( holdcount > 0 ) {
77
            alert( holdcount + " " + _("hold(s) on this record. You must delete all holds before deleting all items.") );
77
            alert( _("%s hold(s) on this record. You must delete all holds before deleting all items.").format(holdcount) );
78
        } else if ( count > 0 ) {
78
        } else if ( count > 0 ) {
79
            if( confirm( _("Are you sure you want to delete the") + " " + count + " " + _("attached items?") ) ) {
79
            if( confirm( _("Are you sure you want to delete the %s attached items?").format(count) ) ) {
80
                window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]";
80
                window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]";
81
            } else {
81
            } else {
82
                return false;
82
                return false;
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js (+13 lines)
Lines 3-8 if ( KOHA === undefined ) var KOHA = {}; Link Here
3
3
4
function _(s) { return s; } // dummy function for gettext
4
function _(s) { return s; } // dummy function for gettext
5
5
6
// http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855
7
String.prototype.format = function() { return formatstr(this, arguments) }
8
function formatstr(str, col) {
9
    col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1);
10
    var idx = 0;
11
    return str.replace(/%%|%s|%(\d+)\$s/g, function (m, n) {
12
        if (m == "%%") { return "%"; }
13
        if (m == "%s") { return col[idx++]; }
14
        return col[n];
15
    });
16
};
17
18
6
// http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804
19
// http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804
7
$.fn.tabIndex = function () {
20
$.fn.tabIndex = function () {
8
    return $(this).parent().find(this).index() - 1;
21
    return $(this).parent().find(this).index() - 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-1 / +1 lines)
Lines 34-40 Link Here
34
            if (total_errors > 0) {
34
            if (total_errors > 0) {
35
                var alertString  = _("Form not submitted because of the following problem(s)");
35
                var alertString  = _("Form not submitted because of the following problem(s)");
36
                alertString += "\n------------------------------------------------------------------------------------\n";
36
                alertString += "\n------------------------------------------------------------------------------------\n";
37
                alertString += "\n- "+ total_errors + _(" mandatory fields empty (highlighted)");
37
                alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
38
                alert(alertString);
38
                alert(alertString);
39
                return false;
39
                return false;
40
            }
40
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/aqbasketuser_search.tt (-1 / +1 lines)
Lines 18-24 Link Here
18
    function add_user(borrowernumber, borrowername) {
18
    function add_user(borrowernumber, borrowername) {
19
        var p = window.opener;
19
        var p = window.opener;
20
        if(p.add_basket_user(borrowernumber, borrowername) < 0) {
20
        if(p.add_basket_user(borrowernumber, borrowername) < 0) {
21
            alert(_("Borrower '" + borrowername + "' is already in the list."));
21
            alert(_("Borrower '%s' is already in the list.").format(borrowername));
22
        }
22
        }
23
    }
23
    }
24
//]]>
24
//]]>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-1 / +1 lines)
Lines 31-37 $(document).ready(function() { Link Here
31
    });
31
    });
32
    $(".modal").on("show", function(){
32
    $(".modal").on("show", function(){
33
        var basket = $(this).data("basketno");
33
        var basket = $(this).data("basketno");
34
        var legend = _("Add order to basket") + " " + basket;
34
        var legend = _("Add order to basket %s").format(basket);
35
        $(this).find("legend").html(legend);
35
        $(this).find("legend").html(legend);
36
    });
36
    });
37
});
37
});
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt (-1 / +1 lines)
Lines 70-76 $(document).ready(function() { Link Here
70
                        $('#merge_' + prop).val(invoice[prop]);
70
                        $('#merge_' + prop).val(invoice[prop]);
71
                    });
71
                    });
72
                    if (invoice.closedate) {
72
                    if (invoice.closedate) {
73
                        $('#merge_status').text(_("Closed on " + invoice.closedate + ""));
73
                        $('#merge_status').text(_("Closed on %s").format(invoice.closedate));
74
                    } else {
74
                    } else {
75
                        $('#merge_status').text(_("Open"));
75
                        $('#merge_status').text(_("Open"));
76
                    }
76
                    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-3 / +2 lines)
Lines 60-67 function Check(ff) { Link Here
60
60
61
    if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
61
    if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
62
        ok=1;
62
        ok=1;
63
        _alertString += "\n- " + _("Order total (") + ff.total.value +
63
        _alertString += "\n- " + _("Order total (%s) exceeds budget available (%s)").format(ff.total.value, actTotal);
64
            _(") exceeds budget available (") + actTotal+")";
65
    }
64
    }
66
65
67
    if ( ff.field_value ) {
66
    if ( ff.field_value ) {
Lines 69-75 function Check(ff) { Link Here
69
        if (empty_item_mandatory > 0) {
68
        if (empty_item_mandatory > 0) {
70
            ok = 1;
69
            ok = 1;
71
            _alertString +=
70
            _alertString +=
72
                "\n- " + empty_item_mandatory + _(" item mandatory fields empty");
71
                "\n- " + _("%s item mandatory fields empty").format(empty_item_mandatory);
73
        }
72
        }
74
73
75
    }
74
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-1 / +1 lines)
Lines 13-19 Link Here
13
            if (total_errors != 0) {
13
            if (total_errors != 0) {
14
                var alertString = _("Form not submitted because of the following problem(s)");
14
                var alertString = _("Form not submitted because of the following problem(s)");
15
                alertString += "\n------------------------------------------------------------------------------------\n";
15
                alertString += "\n------------------------------------------------------------------------------------\n";
16
                alertString += "\n- "+ total_errors+_(" mandatory fields empty (highlighted)");
16
                alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
17
                alert(alertString);
17
                alert(alertString);
18
                return false;
18
                return false;
19
            }
19
            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt (-1 / +1 lines)
Lines 59-65 function validate_goto_page(){ Link Here
59
        return false;
59
        return false;
60
    }
60
    }
61
    else if(page < 1 || page > [% total_pages %] ) {
61
    else if(page < 1 || page > [% total_pages %] ) {
62
        alert(_("The page should be a number between 1 and ") + [% total_pages %] + ".");
62
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
63
        return false;
63
        return false;
64
    }
64
    }
65
    else {
65
    else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-2 / +2 lines)
Lines 67-73 function Check(f) { Link Here
67
67
68
        var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
68
        var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
69
        if (matches && matches.length > 1) {
69
        if (matches && matches.length > 1) {
70
            alert(_("Error importing the framework ") + decodeURIComponent(matches[1]));
70
            alert(_("Error importing the framework %s").format(decodeURIComponent(matches[1])));
71
        }
71
        }
72
72
73
        $('input.input_import').change( function() {
73
        $('input.input_import').change( function() {
Lines 89-95 function Check(f) { Link Here
89
            if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) {
89
            if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) {
90
                if (confirm(_("Do you really want to import the framework fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"))) {
90
                if (confirm(_("Do you really want to import the framework fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"))) {
91
                    var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val();
91
                    var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val();
92
                    $('#importing_' + frameworkcode).find("span").html(_("Importing to framework:")+"<strong>" + frameworkcode + "</strong>. " +_("Importing from file:")+"<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>");
92
                    $('#importing_' + frameworkcode).find("span").html(_("Importing to framework: %s. Importing from file: %s").format("<strong>" + frameworkcode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>"));
93
                    if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
93
                    if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
94
                        var timestamp = new Date().getTime();
94
                        var timestamp = new Date().getTime();
95
                        $('#importing_' + frameworkcode).find("img").attr('src', '[% interface %]/[% theme %]/img/loading-small.gif' + '?' +timestamp);
95
                        $('#importing_' + frameworkcode).find("img").attr('src', '[% interface %]/[% theme %]/img/loading-small.gif' + '?' +timestamp);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt (-1 / +1 lines)
Lines 45-51 $(function(){ Link Here
45
    var blocked            = _("Blocked!");
45
    var blocked            = _("Blocked!");
46
    var saving             = _("Saving...");
46
    var saving             = _("Saving...");
47
    var disabledForAll     = _("Disabled for all");
47
    var disabledForAll     = _("Disabled for all");
48
    var disabledForCurrent = _("Disabled for") + ' ' + $branch;
48
    var disabledForCurrent = _("Disabled for %s").format($branch);
49
49
50
    $('#branch_selector input:submit').hide();
50
    $('#branch_selector input:submit').hide();
51
    $('#branch').change(function(){
51
    $('#branch').change(function(){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-2 / +2 lines)
Lines 46-52 function AreMandatoriesNotOk(){ Link Here
46
        // alert (id_string);
46
        // alert (id_string);
47
        if( ! $("#" + id_string).val() ){
47
        if( ! $("#" + id_string).val() ){
48
            $("#" + id_string).attr('class','subfield_not_filled').focus();
48
            $("#" + id_string).attr('class','subfield_not_filled').focus();
49
            StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
49
            StrAlert += "\t* " + _("%s in tab %s").format(label[i], tab[i]) + "\n";
50
        }
50
        }
51
    }
51
    }
52
    
52
    
Lines 79-85 function AreMandatoriesNotOk(){ Link Here
79
    	
79
    	
80
    	if(isempty){
80
    	if(isempty){
81
    		flag = 1;
81
    		flag = 1;
82
			StrAlert += "\t* Field " + arr[0] + _(" is mandatory, at least one of its subfields must be filled") + "\n";
82
                StrAlert += "\t* " + _("Field %s is mandatory, at least one of its subfields must be filled.").format(arr[0]) + "\n";
83
    	}
83
    	}
84
    	
84
    	
85
    }
85
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-2 / +2 lines)
Lines 258-264 function AreMandatoriesNotOk(){ Link Here
258
      if (tabflag[tagsubfieldid][0]==0){
258
      if (tabflag[tagsubfieldid][0]==0){
259
        var tag=tagsubfieldid.substr(0,3);
259
        var tag=tagsubfieldid.substr(0,3);
260
        var subfield=tagsubfieldid.substr(3,1);    
260
        var subfield=tagsubfieldid.substr(3,1);    
261
        StrAlert += "\t* "+_("tag ")+tag+_(" subfield ")+subfield+" "+tabflag[tagsubfieldid][1]+_(" in tab ")+tabflag[tagsubfieldid][2]+"\n";
261
        StrAlert += "\t* "+_("tag %s subfield %s %s in tab %s").format(tag, subfield, tabflag[tagsubfieldid][1], tabflag[tagsubfieldid][2]) + "\n";
262
        //StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n"; 
262
        //StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n"; 
263
        flag=1;    
263
        flag=1;    
264
      }   
264
      }   
Lines 308-314 function AreMandatoriesNotOk(){ Link Here
308
    	
308
    	
309
    	if(isempty){
309
    	if(isempty){
310
    		flag = 1;
310
    		flag = 1;
311
    		StrAlert += _("\t* Field ") + arr[0] + _(" is mandatory, at least one of its subfields must be filled.") + "\n";
311
                StrAlert += "\t* " + _("Field %s is mandatory, at least one of its subfields must be filled.").format(arr[0]) + "\n";
312
    	}
312
    	}
313
    	
313
    	
314
    }
314
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +1 lines)
Lines 64-70 function Check(f) { Link Here
64
    if (total_errors > 0) {
64
    if (total_errors > 0) {
65
        var alertString2 = _("Form not submitted because of the following problem(s)");
65
        var alertString2 = _("Form not submitted because of the following problem(s)");
66
        alertString2 += "\n------------------------------------------------------------------------------------\n";
66
        alertString2 += "\n------------------------------------------------------------------------------------\n";
67
        alertString2 += "\n- "+ total_errors + _(" mandatory fields empty (highlighted)");
67
        alertString2 += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
68
        alert(alertString2);
68
        alert(alertString2);
69
        return false;
69
        return false;
70
    }
70
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt (-1 / +1 lines)
Lines 24-30 Link Here
24
24
25
    function changeTypeofMaterial(form)
25
    function changeTypeofMaterial(form)
26
    {
26
    {
27
        if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for") +' \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' ' +_("material type?"))) {
27
        if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for '%s' material type?").format(form.material_type.options[form.material_type.selectedIndex].text))) {
28
            objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
28
            objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
29
            objXmlControlField.renderTemplate();
29
            objXmlControlField.renderTemplate();
30
            renderResult(tr_result, form.result.value, true);
30
            renderResult(tr_result, form.result.value, true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt (-1 / +1 lines)
Lines 24-30 Link Here
24
24
25
    function changeTypeofMaterial(form)
25
    function changeTypeofMaterial(form)
26
    {
26
    {
27
        if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for") + ' \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' ' + _("material type?"))) {
27
        if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for '%s' material type?").format(form.material_type.options[form.material_type.selectedIndex].text))) {
28
            objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
28
            objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value);
29
            objXmlControlField.renderTemplate();
29
            objXmlControlField.renderTemplate();
30
            renderResult(tr_result, form.result.value, true);
30
            renderResult(tr_result, form.result.value, true);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-1 / +1 lines)
Lines 68-74 function validate_goto_page(){ Link Here
68
        return false;
68
        return false;
69
    }
69
    }
70
    else if(page < 1 || page > [% total_pages %] ) {
70
    else if(page < 1 || page > [% total_pages %] ) {
71
        alert(_("The page should be a number between 1 and ") + [% total_pages %] + ".");
71
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
72
        return false;
72
        return false;
73
    }
73
    }
74
    else {
74
    else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-1 / +1 lines)
Lines 69-75 function validate_goto_page(){ Link Here
69
        return false;
69
        return false;
70
    }
70
    }
71
    else if(page < 1 || page > [% total_pages %] ) {
71
    else if(page < 1 || page > [% total_pages %] ) {
72
        alert(_("The page should be a number between 1 and ") + [% total_pages %] + ".");
72
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
73
        return false;
73
        return false;
74
    }
74
    }
75
    else {
75
    else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt (-5 / +5 lines)
Lines 119-125 function synchronize() { Link Here
119
        }).done(function (data) {
119
        }).done(function (data) {
120
            if (data) {
120
            if (data) {
121
                $('.loading-overlay').hide();
121
                $('.loading-overlay').hide();
122
                alert(_("Please log in to Koha and try again. (Error: '" + data + "')"));
122
                alert(_("Please log in to Koha and try again. (Error: '%s')").format(data));
123
            } else {
123
            } else {
124
                var uploadIter = $.indexedDB("koha").objectStore("transactions").each(uploadTransaction);
124
                var uploadIter = $.indexedDB("koha").objectStore("transactions").each(uploadTransaction);
125
                uploadIter.done(function() {
125
                uploadIter.done(function() {
Lines 193-199 function finishedLoading() { Link Here
193
193
194
function loadRecords(page) {
194
function loadRecords(page) {
195
[% IF (AllowOfflineCirculation) %]
195
[% IF (AllowOfflineCirculation) %]
196
    $(".loading-overlay div").text(_("Loading page " + page + ", please wait..."));
196
    $(".loading-overlay div").text(_("Loading page %s, please wait...").format(page));
197
    $(".loading-overlay").show();
197
    $(".loading-overlay").show();
198
    $.ajax({
198
    $.ajax({
199
        type: "GET",
199
        type: "GET",
Lines 378-384 function showPatron(barcode, patron, error) { Link Here
378
    if (patron.name.length > 0) {
378
    if (patron.name.length > 0) {
379
        $('.patron-title').text(patron.name);
379
        $('.patron-title').text(patron.name);
380
    } else {
380
    } else {
381
        $('.patron-title').text(_("Unrecognized patron") + " (" + barcode + ")");
381
        $('.patron-title').text(_("Unrecognized patron (%s)").format(barcode));
382
    }
382
    }
383
    if (patron.address.length > 0 || patron.address2.length > 0) {
383
    if (patron.address.length > 0 || patron.address2.length > 0) {
384
        $('#patron-address-1').text(patron.address);
384
        $('#patron-address-1').text(patron.address);
Lines 403-414 function showPatron(barcode, patron, error) { Link Here
403
        $('#patron-email').html('<span class="empty" id="noemailstored">' + _("No email stored.") + '</span></li>');
403
        $('#patron-email').html('<span class="empty" id="noemailstored">' + _("No email stored.") + '</span></li>');
404
    }
404
    }
405
    if (patron.categorycode.length > 0) {
405
    if (patron.categorycode.length > 0) {
406
        $('#patron-category').text(_("Category: ") + patron.categorycode);
406
        $('#patron-category').text(_("Category: %s").format(patron.categorycode));
407
    } else {
407
    } else {
408
        $('#patron-category').html('<span class="empty" id="unknowncategory">' + _("Category code unknown.") + '</span></li>');
408
        $('#patron-category').html('<span class="empty" id="unknowncategory">' + _("Category code unknown.") + '</span></li>');
409
    }
409
    }
410
    if (patron.branchcode.length > 0) {
410
    if (patron.branchcode.length > 0) {
411
        $('#patron-library').text(_("Home library: ") + patron.branchcode);
411
        $('#patron-library').text(_("Home library: %s").format(patron.branchcode));
412
    } else {
412
    } else {
413
        $('#patron-library').html('<span class="empty" id="unknowncategory">' + _("Home library unknown.") + '</span></li>');
413
        $('#patron-library').html('<span class="empty" id="unknowncategory">' + _("Home library unknown.") + '</span></li>');
414
    }
414
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-3 / +3 lines)
Lines 7-13 Link Here
7
            function DeleteConfirm() {
7
            function DeleteConfirm() {
8
                var element_id = selected_layout("delete");
8
                var element_id = selected_layout("delete");
9
                if (element_id>-1) {
9
                if (element_id>-1) {
10
                    var msg = "Are you sure you want to delete [% label_element %] " + element_id + "?"
10
                    var msg = _("Are you sure you want to delete %s %s?").format("[% label_element %]", element_id);
11
                    var answer = confirm(msg);
11
                    var answer = confirm(msg);
12
                    if (answer) {
12
                    if (answer) {
13
                        window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=" + element_id;
13
                        window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=" + element_id;
Lines 64-70 Link Here
64
                        return(document.layouts.action[selected[0]].value);
64
                        return(document.layouts.action[selected[0]].value);
65
                    }
65
                    }
66
                    else {
66
                    else {
67
                        alert(_("Please select only one ")+"[% label_element %]"+_(" to")+op+".");
67
                        alert(_("Please select only one %s to %s.").format("[% label_element %]", op));
68
                        return (-1);
68
                        return (-1);
69
                    }
69
                    }
70
                }
70
                }
Lines 73-79 Link Here
73
                        return(document.layouts.action.value);
73
                        return(document.layouts.action.value);
74
                    }
74
                    }
75
                };
75
                };
76
                alert(_("Please select a ")+"[% label_element %].");
76
                alert(_("Please select a %s.").format("[% label_element %]"));
77
                return (-1);
77
                return (-1);
78
            };
78
            };
79
        //]]>
79
        //]]>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-2 / +1 lines)
Lines 16-23 function enableCheckboxActions(){ Link Here
16
    $(document).ready(function(){
16
    $(document).ready(function(){
17
 $('#pay-fines-form').preventDoubleFormSubmit();
17
 $('#pay-fines-form').preventDoubleFormSubmit();
18
        $("#woall").click(function(event){
18
        $("#woall").click(function(event){
19
            var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!");
19
            var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | format('%.2f') %]" );
20
            msg = msg.replace( "%s", "[% total | format('%.2f') %]" );
21
            var answer = confirm(msg);
20
            var answer = confirm(msg);
22
                if (!answer){
21
                if (!answer){
23
                    event.preventDefault();
22
                    event.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-1 / +1 lines)
Lines 16-22 Link Here
16
    });
16
    });
17
17
18
    function ConfirmDelete( list ) {
18
    function ConfirmDelete( list ) {
19
        return confirm( _("Are you sure you want to delete the list ") + list + "?" );
19
        return confirm( _("Are you sure you want to delete the list %s?").format(list) );
20
    }
20
    }
21
//]]>
21
//]]>
22
</script>
22
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-2 / +2 lines)
Lines 7-13 Link Here
7
    <script type="text/javascript">
7
    <script type="text/javascript">
8
        //<![CDATA[
8
        //<![CDATA[
9
           function DeleteConfirm() {
9
           function DeleteConfirm() {
10
                var msg = _("Are you sure you want to delete batch") + " [% batch_id %]?";
10
                var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
11
                var answer = confirm(msg);
11
                var answer = confirm(msg);
12
                if (answer) {
12
                if (answer) {
13
                    window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&amp;card_element=batch&amp;element_id=[% batch_id %]";
13
                    window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&amp;card_element=batch&amp;element_id=[% batch_id %]";
Lines 32-38 Link Here
32
                    }
32
                    }
33
                    getstr = items.join("&");
33
                    getstr = items.join("&");
34
                    item_msg = item_num.join(", ");
34
                    item_msg = item_num.join(", ");
35
                    var msg = "Are you sure you want to remove card number(s): " + item_msg + " from this batch?"
35
                    var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg);
36
                }
36
                }
37
                else {
37
                else {
38
                    alert(_("Please select at least label to delete."));
38
                    alert(_("Please select at least label to delete."));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-2 / +2 lines)
Lines 6-12 Link Here
6
            function DeleteConfirm() {
6
            function DeleteConfirm() {
7
                var results = selected_images("delete");
7
                var results = selected_images("delete");
8
                if (results.images != -1) {
8
                if (results.images != -1) {
9
                    var msg = "Are you sure you want to delete image(s): " + results.image_ids + "?";
9
                    var msg = _("Are you sure you want to delete image(s): %s?").format(results.image_ids);
10
                    var answer = confirm(msg);
10
                    var answer = confirm(msg);
11
                    if (answer) {
11
                    if (answer) {
12
                        window.location = "/cgi-bin/koha/patroncards/image-manage.pl?op=delete&" + results.images;
12
                        window.location = "/cgi-bin/koha/patroncards/image-manage.pl?op=delete&" + results.images;
Lines 32-38 Link Here
32
                else if (document.delete_images.action.checked){
32
                else if (document.delete_images.action.checked){
33
                        return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value};
33
                        return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value};
34
                };
34
                };
35
                alert(_("Please select image(s) to ") + op + ".");
35
                alert(_("Please select image(s) to %s.").format(op));
36
                return (-1);
36
                return (-1);
37
            };
37
            };
38
        $(document).ready(function() {
38
        $(document).ready(function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-3 / +3 lines)
Lines 7-13 Link Here
7
            function DeleteConfirm() {
7
            function DeleteConfirm() {
8
                var element_id = selected_layout("delete");
8
                var element_id = selected_layout("delete");
9
                if (element_id>-1) {
9
                if (element_id>-1) {
10
                    var msg = _("Are you sure you want to delete") + " [% card_element %] " + element_id + "?"
10
                    var msg = _("Are you sure you want to delete %s %s?").format("[% card_element %]", element_id);
11
                    var answer = confirm(msg);
11
                    var answer = confirm(msg);
12
                    if (answer) {
12
                    if (answer) {
13
                        window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=" + element_id;
13
                        window.location = "/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=" + element_id;
Lines 64-70 Link Here
64
                        return(document.layouts.action[selected[0]].value);
64
                        return(document.layouts.action[selected[0]].value);
65
                    }
65
                    }
66
                    else {
66
                    else {
67
                        alert(_("Please select only one ")+"[% card_element %]"+_(" to ") + op + ".");
67
                        alert(_("Please select only one %s to %s.").format("[% card_element %]", op));
68
                        return (-1);
68
                        return (-1);
69
                    }
69
                    }
70
                }
70
                }
Lines 73-79 Link Here
73
                        return(document.layouts.action.value);
73
                        return(document.layouts.action.value);
74
                    }
74
                    }
75
                };
75
                };
76
                alert(_("Please select a ")+"[% card_element %].");
76
                alert(_("Please select a %s.").format("[% card_element %]"));
77
                return (-1);
77
                return (-1);
78
            };
78
            };
79
79
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +1 lines)
Lines 105-111 function checkMultiHold() { Link Here
105
105
106
        switch (override_items[itemnumber].holdallowed) {
106
        switch (override_items[itemnumber].holdallowed) {
107
            case 0: msg = _("This item normally cannot be put on hold."); break;
107
            case 0: msg = _("This item normally cannot be put on hold."); break;
108
            case 1: msg = _("This item normally cannot be put on hold except for patrons from ") + override_items[itemnumber].homebranch + "."; break;
108
            case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
109
        }
109
        }
110
110
111
        msg += "\n\n" + _("Place hold on this item?");
111
        msg += "\n\n" + _("Place hold on this item?");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt (-1 / +1 lines)
Lines 86-92 $(document).ready(function() { Link Here
86
        if ( total_errors > 0 ) {
86
        if ( total_errors > 0 ) {
87
            var mes  = _("Form not submitted because of the following problem(s)");
87
            var mes  = _("Form not submitted because of the following problem(s)");
88
            mes += "\n------------------------------------------------------------------------------------\n";
88
            mes += "\n------------------------------------------------------------------------------------\n";
89
            mes += "\n- " + total_errors + _(" mandatory fields empty (highlighted)");
89
            mes += "\n- " _("%s mandatory fields empty (highlighted)").format(total_errors);
90
            alert(mes);
90
            alert(mes);
91
            return false;
91
            return false;
92
        }
92
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-4 / +2 lines)
Lines 261-268 function testPredictionPattern() { Link Here
261
    [% END %]
261
    [% END %]
262
262
263
    if(error){
263
    if(error){
264
        alert(_("Cannot test prediction pattern for the following reason(s):") + "\n\n"
264
        alert(_("Cannot test prediction pattern for the following reason(s): %s").format(error_msg));
265
            + error_msg);
266
        return false;
265
        return false;
267
    }
266
    }
268
267
Lines 323-330 function saveAdvancedPattern() { Link Here
323
    var cnfrm = 1;
322
    var cnfrm = 1;
324
    if(found){
323
    if(found){
325
        var msg = _("This pattern name already exists. Do you want to modify it?")
324
        var msg = _("This pattern name already exists. Do you want to modify it?")
326
            + "\n" + _("Warning: it will modify the pattern for all subscriptions")
325
            + "\n" + _("Warning: it will modify the pattern for all subscriptions that are using it.");
327
            + _("that are using it.");
328
        cnfrm = confirm(msg);
326
        cnfrm = confirm(msg);
329
    }
327
    }
330
328
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-6 / +6 lines)
Lines 54-75 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
54
		// window.alert(_("AJAX approved tag: ") + tag);
54
		// window.alert(_("AJAX approved tag: ") + tag);
55
	};
55
	};
56
	var failure_approve = function(tag){
56
	var failure_approve = function(tag){
57
		window.alert(_("AJAX failed to approve tag: ") + tag);
57
                window.alert(_("AJAX failed to approve tag: %s").format(tag));
58
	};
58
	};
59
	var success_reject  = function(tag){
59
	var success_reject  = function(tag){
60
		// window.alert(_("AJAX rejected tag: ") + tag);
60
		// window.alert(_("AJAX rejected tag: ") + tag);
61
	};
61
	};
62
	var failure_reject  = function(tag){
62
	var failure_reject  = function(tag){
63
		window.alert(_("AJAX failed to reject tag: ") + tag);
63
                window.alert(_("AJAX failed to reject tag: %s").format(tag));
64
	};
64
	};
65
	var success_test    = function(tag){
65
	var success_test    = function(tag){
66
		$('#verdict').html(tag + _(" is permitted!"));
66
                $('#verdict').html(_("%s is permitted!").format(tag));
67
	};
67
	};
68
	var failure_test    = function(tag){
68
	var failure_test    = function(tag){
69
		$('#verdict').html(tag + _(" is prohibited!"));
69
                $('#verdict').html(_("%s is prohibited!").format(tag));
70
	};
70
	};
71
	var indeterminate_test = function(tag){
71
	var indeterminate_test = function(tag){
72
		$('#verdict').html(tag + _(" is neither permitted nor prohibited!"));
72
                $('#verdict').html(_("%s is neither permitted nor prohibited!").format(tag));
73
	};
73
	};
74
74
75
	var success_test_call = function() {
75
	var success_test_call = function() {
Lines 122-128 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
122
			}
122
			}
123
		});
123
		});
124
		$("*").ajaxError(function(evt, request, settings){
124
		$("*").ajaxError(function(evt, request, settings){
125
			if ((alerted +=1) <= 1){ window.alert(_("AJAX error")+" (" + alerted + " alert)"); }
125
                        if ((alerted +=1) <= 1){ window.alert(_("AJAX error (%s alert)").format(alerted)); }
126
		});
126
		});
127
        $("#tagst").dataTable($.extend(true, {}, dataTablesDefaults, {
127
        $("#tagst").dataTable($.extend(true, {}, dataTablesDefaults, {
128
            "aoColumnDefs": [
128
            "aoColumnDefs": [
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-4 / +4 lines)
Lines 116-128 Link Here
116
        var dayMonth = month + '/' + day;
116
        var dayMonth = month + '/' + day;
117
        var dateString = year + '/' + month + '/' + day;
117
        var dateString = year + '/' + month + '/' + day;
118
        if (exception_holidays[dateString] != null) {
118
        if (exception_holidays[dateString] != null) {
119
            return [true, "exception", _("Exception") + ": "+exception_holidays[dateString].title];
119
            return [true, "exception", _("Exception: %s").format(exception_holidays[dateString].title)];
120
        } else if ( week_days[weekDay] != null ){
120
        } else if ( week_days[weekDay] != null ){
121
            return [true, "repeatableweekly", _("Weekly holiday") + ": "+week_days[weekDay].title];
121
            return [true, "repeatableweekly", _("Weekly holiday: %s").format(week_days[weekDay].title)];
122
        } else if ( day_month_holidays[dayMonth] != null ) {
122
        } else if ( day_month_holidays[dayMonth] != null ) {
123
            return [true, "repeatableyearly", _("Yearly holiday") + ": "+day_month_holidays[dayMonth].title];
123
            return [true, "repeatableyearly", _("Yearly holiday: %s").format(day_month_holidays[dayMonth].title)];
124
        } else if (holidays[dateString] != null) {
124
        } else if (holidays[dateString] != null) {
125
            return [true, "holiday", _("Single holiday") + ": "+holidays[dateString].title];
125
            return [true, "holiday", _("Single holiday: %s").format(holidays[dateString].title)];
126
        } else {
126
        } else {
127
            return [true, "normalday", _("Normal day")];
127
            return [true, "normalday", _("Normal day")];
128
        }
128
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt (-10 / +8 lines)
Lines 84-100 $(document).ready(function(){ Link Here
84
            );
84
            );
85
85
86
            if ( aData['match_id'] ) {
86
            if ( aData['match_id'] ) {
87
                [% IF ( record_type == 'auth' ) -%]
88
                var matching_msg = _("Matches authority %s (score=%s):%s");
89
                [%- ELSE -%]
90
                var matching_msg = _("Matches biblio %s (score=%s):%s");
91
                [%- END %]
87
                $('td:eq(4)', nRow).html(
92
                $('td:eq(4)', nRow).html(
88
                    [% IF ( record_type == 'auth' ) -%]
93
                    matching_msg.format(aData['match_id'], aData['score'],
89
                    _("Matches authority ")
94
                    '<a target="_blank" href="' + record_details_url
90
                    [%- ELSE -%]
95
                    + aData['match_id'] + '">' + aData['match_citation'] + '</a>')
91
                    _("Matches biblio ")
92
                    [%- END %]
93
                    + aData['match_id']
94
                    + " (" + _("score") + "="
95
                    + aData['score']
96
                    + '):' + '<a target="_blank" href="' + record_details_url
97
                    + aData['match_id'] + '">' + aData['match_citation'] + '</a>'
98
                );
96
                );
99
            }
97
            }
100
98
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-1 / +1 lines)
Lines 70-76 Link Here
70
            var information_category_node = $(select_attr).parent().parent().find('span.information_category');
70
            var information_category_node = $(select_attr).parent().parent().find('span.information_category');
71
            information_category_node.html("");
71
            information_category_node.html("");
72
            if ( category.length > 0 ) {
72
            if ( category.length > 0 ) {
73
                information_category_node.html(_("This attribute will be only applied to the patron's category") +' "' + category + '"');
73
                information_category_node.html(_("This attribute will be only applied to the patron's category %s").format(category));
74
            }
74
            }
75
            if ( type == 'select' ) {
75
            if ( type == 'select' ) {
76
                var options = '<option value = ""></option>';
76
                var options = '<option value = ""></option>';
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-5 / +5 lines)
Lines 238-249 Link Here
238
        var fileSizeInK = Math.round(evt.target.files[0].size/1024);
238
        var fileSizeInK = Math.round(evt.target.files[0].size/1024);
239
239
240
        if (!fileType.match(/comma-separated-values|csv|excel/i)) {
240
        if (!fileType.match(/comma-separated-values|csv|excel/i)) {
241
            alert(_("Uploads limited to csv. Incorrect filetype: ")+fileType);
241
            alert(_("Uploads limited to csv. Incorrect filetype: %s").format(fileType));
242
            parent.location='quotes-upload.pl';
242
            parent.location='quotes-upload.pl';
243
            return;
243
            return;
244
        }
244
        }
245
        if (fileSizeInK > 512) {
245
        if (fileSizeInK > 512) {
246
            if (!confirm(evt.target.files[0].name+' '+fileSizeInK+_(" KB Do you really want to upload this file?"))) {
246
            if (!confirm(_("%s %s KB Do you really want to upload this file?").format(evt.target.files[0].name, fileSizeInK))) {
247
                parent.location='quotes-upload.pl';
247
                parent.location='quotes-upload.pl';
248
                return;
248
                return;
249
            }
249
            }
Lines 269-279 Link Here
269
            success     : function(){
269
            success     : function(){
270
                            var response = JSON.parse(jqXHR.responseText);
270
                            var response = JSON.parse(jqXHR.responseText);
271
                            if (response.success) {
271
                            if (response.success) {
272
                                alert(response.records+_(" quotes saved."));
272
                                alert(_("%s quotes saved.").format(response.records));
273
                                window.location.reload(true);   // is this the best route?
273
                                window.location.reload(true);   // is this the best route?
274
                            }
274
                            }
275
                            else {
275
                            else {
276
                                alert(response.records+_(" quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details."));
276
                                alert(_("%s quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.").format(response.records));
277
                                window.location.reload(true);   // is this the best route?
277
                                window.location.reload(true);   // is this the best route?
278
                            }
278
                            }
279
                          },
279
                          },
Lines 287-293 Link Here
287
        if (!idsToDelete) {
287
        if (!idsToDelete) {
288
            alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
288
            alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
289
        }
289
        }
290
        else if (confirm(_("Are you sure you wish to delete quote(s) ")+idsToDelete+"?")) {
290
        else if (confirm(_("Are you sure you wish to delete quote(s) %s?").format(idsToDelete))) {
291
            oTable.$('.selected').each(function(){
291
            oTable.$('.selected').each(function(){
292
                oTable.fnDeleteRow(this);
292
                oTable.fnDeleteRow(this);
293
            });
293
            });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt (-2 / +1 lines)
Lines 160-166 Link Here
160
            if (!idsToDelete) {
160
            if (!idsToDelete) {
161
                alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
161
                alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
162
            }
162
            }
163
            else if (confirm(_("Are you sure you wish to delete quote(s) ")+idsToDelete+"?")) {
163
            else if (confirm(_("Are you sure you wish to delete quote(s) %s?").format(idsToDelete))) {
164
                oTable.$('.selected').each(function(){
164
                oTable.$('.selected').each(function(){
165
                        var quoteID = $(this).attr('id');
165
                        var quoteID = $(this).attr('id');
166
                            $.ajax({
166
                            $.ajax({
167
- 

Return to bug 12138