Bug 41623: Fix translation pickup in catalogue_details.inc

This patch redoes the fix that was made in bug 38450 to make sure
the "Waiting at ... since ..." string is picked up by the translation
tool. It's a parenthesis move.

See bug 38450 for explanation.

_("This %s is picked").format(foo)
_("This %s is NOT picked".format(bar))

To test:
1. Install a new langage
gulp po:update --lang fr-CA
./misc/translator/translate install fr-CA

2. Place a hold

3. Check in the item on hold and confirm the hold

4. Go to the record details page
   --> Waiting at ... since ... is in English

5. Check the translation files
cd misc/translator/po/
git grep "Waiting at" fr-CA*

--> There is no "Waiting at %s, %s since %s."

6. Apply patch

7. Update strings again

8. Check translation files again
--> The string should be there

9. Translate the string (making sure to remove the fuzzy line if any)

10. Install the translation again (only the translate install part)

11. Check the record details page
    --> It should be translated!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
This commit is contained in:
Caroline Cyr La Rose 2026-01-14 16:45:53 -05:00 committed by Laura Escamilla
parent 85b5e4ff44
commit 5f3af25e36
No known key found for this signature in database
GPG Key ID: 6B1D9CA1AF817BC3
1 changed files with 2 additions and 2 deletions

View File

@ -571,9 +571,9 @@
if ( status == 'on_hold') {
if ( row.first_hold.waiting_date ) {
if ( row.first_hold.desk ) {
nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.".format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date))));
nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.").format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date)));
} else {
nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s since %s.".format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date))));
nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s since %s.").format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date)));
}
[% IF Koha.Preference('canreservefromotherbranches') %]
if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) {