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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Owen Leonard 2024-09-03 11:41:03 +00:00 committed by Katrin Fischer
parent d45d4912e8
commit a15841cb11
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 4 additions and 4 deletions

View file

@ -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));
});
});
</script>

View file

@ -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();
}

View file

@ -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));
});
});
</script>