From bc3df6a7121ef60649bb1c212fda9fb1c64251f3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 16 Jun 2023 14:29:42 +0000 Subject: [PATCH] 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 --- .../intranet-tmpl/prog/en/includes/js-biblio-format.inc | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++-- .../prog/en/modules/course_reserves/add_items-step1.tt | 2 +- .../prog/en/modules/course_reserves/batch_add_items.tt | 2 +- .../prog/en/modules/tools/additional-contents.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 8 ++++---- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc index 5f73dc683a..498a7a44e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-biblio-format.inc @@ -23,7 +23,7 @@ if (biblio.title != null && biblio.title != '') { title += escape_str(biblio.title); } else { - title += __("No title"); + title += _("No title"); } title += ''; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index c6dc27d7e7..95ceb7a0e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1984,7 +1984,7 @@ } else if (response.error_code === 'checked_out') { const button = $('