Bug 34038: Fix incorrect use of __() in .tt and .inc files
This patch corrects instances of the double-underscore function being used in .tt and .inc files where the single-underscore function should be used instead. To test, apply the patch and update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, in this case misc/translator/po/fr-FR-staff-prog.po - Confirm that the strings are now in the .po file for translation. You should find these lines: - koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc: "No title." - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt: "Check in and add to bundle" "Ignore holds and add to bundle" - koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step1.tt: "Please enter only a barcode, or only a biblionumber." - koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt: "Please enter only barcodes, or only biblionumbers." - koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt: "Please specify a content for 'Default'" - Check fr-FR-opac-bootstrap.po for these lines: - koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc: "Please enter a valid date (should match %s)." - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt: "No item was selected" - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt, koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt, koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt: "No item was selected" Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
93dd749eca
commit
d1d9f4698e
10 changed files with 17 additions and 17 deletions
|
@ -23,7 +23,7 @@
|
|||
if (biblio.title != null && biblio.title != '') {
|
||||
title += escape_str(biblio.title);
|
||||
} else {
|
||||
title += __("No title");
|
||||
title += _("No title");
|
||||
}
|
||||
title += '</span>';
|
||||
|
||||
|
|
|
@ -1984,7 +1984,7 @@
|
|||
} else if (response.error_code === 'checked_out') {
|
||||
const button = $('<button type="button">')
|
||||
.addClass('btn btn-xs')
|
||||
.text(__("Check in and add to bundle"))
|
||||
.text(_("Check in and add to bundle"))
|
||||
.on('click', function () {
|
||||
addToBundle(url, { external_id: barcode, force_checkin: true });
|
||||
});
|
||||
|
@ -2001,7 +2001,7 @@
|
|||
} else if (response.error_code === 'reserved') {
|
||||
const button = $('<button type="button">')
|
||||
.addClass('btn btn-xs')
|
||||
.text(__("Ignore holds and add to bundle"))
|
||||
.text(_("Ignore holds and add to bundle"))
|
||||
.on('click', function () {
|
||||
addToBundle(url, { external_id: barcode, ignore_holds: true });
|
||||
});
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
$("input[type='submit']").click(function(e){
|
||||
if ( $("#biblionumber").val().length > 0 && $("#barcode").val().length > 0 ) {
|
||||
e.preventDefault();
|
||||
alert(__("Please enter only a barcode, or only a biblionumber."));
|
||||
alert(_("Please enter only a barcode, or only a biblionumber."));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
$("input[type='submit']").click(function(e){
|
||||
if ( $("#biblionumbers").val().length > 0 && $("#barcodes").val().length > 0 ) {
|
||||
e.preventDefault();
|
||||
alert(__("Please enter only barcodes, or only biblionumbers."));
|
||||
alert(_("Please enter only barcodes, or only biblionumbers."));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -646,7 +646,7 @@
|
|||
[% END %]
|
||||
|
||||
if ( ! content.length > 0 ) {
|
||||
alert(__("Please specify a content for 'Default'"));
|
||||
alert(_("Please specify a content for 'Default'"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
},
|
||||
});
|
||||
|
||||
var MSG_PLEASE_ENTER_A_VALID_DATE = ( __("Please enter a valid date (should match %s).") );
|
||||
var MSG_PLEASE_ENTER_A_VALID_DATE = ( _("Please enter a valid date (should match %s).") );
|
||||
|
||||
function is_valid_date(date) {
|
||||
// An empty string is considered as a valid date for convenient reasons.
|
||||
|
|
|
@ -374,7 +374,7 @@
|
|||
$("#tag_hides").hide();
|
||||
$("#tagsel_form").show();
|
||||
} else {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@
|
|||
function tagAdded() {
|
||||
var checkedBoxes = $("input:checkbox:checked");
|
||||
if (!$(checkedBoxes).size()) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -656,7 +656,7 @@
|
|||
[% END %]
|
||||
|
||||
if ($(".confirmjs:checked").size() == 0) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@
|
|||
if (checkedCount > 0) {
|
||||
holdBiblioNums(checkedBiblioNums);
|
||||
} else {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@
|
|||
function tagSelected() {
|
||||
var checkedBoxes = $(".searchresults :checkbox:checked");
|
||||
if ($(checkedBoxes).size() == 0) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
} else {
|
||||
$("#tagsel_tag").hide();
|
||||
$(".resort").hide();
|
||||
|
@ -641,7 +641,7 @@
|
|||
function tagAdded() {
|
||||
var checkedBoxes = $(".searchresults :checkbox:checked");
|
||||
if ($(checkedBoxes).size() == 0) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -843,7 +843,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
|
|||
function holdSelections() {
|
||||
var checkedBoxes = $("input:checkbox:checked");
|
||||
if ($(checkedBoxes).size() == 0) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
} else {
|
||||
var bibs = "";
|
||||
$(checkedBoxes).each(function(){
|
||||
|
@ -861,7 +861,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
|
|||
$(".tag_hides").hide();
|
||||
$("#tagsel_form").show();
|
||||
} else {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
|
|||
function tagAdded() {
|
||||
var checkedBoxes = $("input:checkbox:checked");
|
||||
if (!$(checkedBoxes).size()) {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -998,7 +998,7 @@ $(function() {
|
|||
return confirmDelete(MSG_REMOVE_ONE_FROM_LIST);
|
||||
}
|
||||
} else {
|
||||
alert( __("No item was selected") );
|
||||
alert( _("No item was selected") );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue