From a15841cb11f8361775c7b180fdadace0eb3135e9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 3 Sep 2024 11:41:03 +0000 Subject: [PATCH] Bug 37814: Fix incorrect use of __() in .tt files This patch corrects instances of the double-underscore function being used in .tt files where the single-underscore function should be used instead. To test, apply the patch and update a translation, e.g. fr-FR: > gulp po:update --lang fr-FR - Open the corresponding .po file for the affected 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/modules/members/alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" - koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt "Click to expand this section" - Check fr-FR-opac-bootstrap.po for this line: - koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt: "Are you sure you want to unsubscribe %s from email alerts for %s?" Sponsored-by: Athens County Public Libraries Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../prog/en/modules/members/alert-subscriptions.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 ++-- .../bootstrap/en/modules/opac-alert-subscriptions.tt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt index 3be92e0f44..936511c59e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt @@ -109,7 +109,7 @@ $(".unsubscribe").submit(function(){ var patron = $(this).data('patron'); var title = $(this).data('title'); - return confirmDelete(__("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); + return confirmDelete(_("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); }); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index ca4a298717..e271740a77 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1854,10 +1854,10 @@ legend.collapsed i.fa.fa-caret-down::before { function togglePanel( node ){ var panel = node.nextAll(); if(panel.is(":visible")){ - node.addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") ); + node.addClass("collapsed").removeClass("expanded").attr("title", _("Click to expand this section") ); panel.hide(); } else { - node.addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") ); + node.addClass("expanded").removeClass("collapsed").attr("title", _("Click to collapse this section") ); panel.show(); panel.find("input, select, textarea").eq(0).focus(); } diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt index d19b2fe6d3..e413ee30b4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscriptions.tt @@ -105,7 +105,7 @@ $(".unsubscribe").submit(function(){ var patron = $(this).data('patron'); var title = $(this).data('title'); - return confirmDelete(__("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); + return confirmDelete(_("Are you sure you want to unsubscribe %s from email alerts for %s?").format(patron, title)); }); }); -- 2.39.5