When placing a multi-hold, the error message that appears if you don't select a pickup library is untranslatable. To recreate the message: 1. In the staff interface, search the catalog with a term that will return a couple of items (e.g. Shakespeare) 2. In the search results, select two or more results 3. Click Place hold 4. Search for a patron (e.g. Acevedo) 5. Click Place holds --> Error "Please make sure all selected titles have a pickup location set" To get po files: ktd --shell cd misc/translator/po gulp po:update --lang fr-CA git grep "Please make sure all" --> Returns nothing
Created attachment 166826 [details] [review] Bug 36872: Untranslatable strings in request.tt There are errors in the JavaScript in the holds template in the staff client which results in strings not being translatable. This patch corrects the errors. To test, apply the patch and run through the process of placing a hold on multiple items in the staff interface. - At the hold confirmation step, try to submit the form without selecting pickup locations for one or more titles. - You should get an alert, "Please make sure all selected titles have a pickup location set". - Uncheck the checkboxes next to each title you're placing a hold on. - Submit the form. You should get an error: "Please select at least one title". - Test the translation process with a language, e.g. fr-FR: - In KTD, run: gulp po:update --lang fr-FR - Check fr-FR-staff-prog.po for the line referring to koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:1499 - You should see the string "Please make sure all selected titles have a pickup location set".
Created attachment 166827 [details] [review] Bug 36872: Untranslatable strings in request.tt There are errors in the JavaScript in the holds template in the staff client which results in strings not being translatable. This patch corrects the errors. To test, apply the patch and run through the process of placing a hold on multiple items in the staff interface. - At the hold confirmation step, try to submit the form without selecting pickup locations for one or more titles. - You should get an alert, "Please make sure all selected titles have a pickup location set". - Uncheck the checkboxes next to each title you're placing a hold on. - Submit the form. You should get an error: "Please select at least one title". - Test the translation process with a language, e.g. fr-FR: - In KTD, run: gulp po:update --lang fr-FR - Check fr-FR-staff-prog.po for the line referring to koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:1499 - You should see the string "Please make sure all selected titles have a pickup location set". Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Thanks Owen!
Created attachment 166881 [details] [review] Bug 36872: Untranslatable strings in request.tt There are errors in the JavaScript in the holds template in the staff client which results in strings not being translatable. This patch corrects the errors. To test, apply the patch and run through the process of placing a hold on multiple items in the staff interface. - At the hold confirmation step, try to submit the form without selecting pickup locations for one or more titles. - You should get an alert, "Please make sure all selected titles have a pickup location set". - Uncheck the checkboxes next to each title you're placing a hold on. - Submit the form. You should get an error: "Please select at least one title". - Test the translation process with a language, e.g. fr-FR: - In KTD, run: gulp po:update --lang fr-FR - Check fr-FR-staff-prog.po for the line referring to koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:1499 - You should see the string "Please make sure all selected titles have a pickup location set". Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 24.05! Well done everyone, thank you!
Are those \n needed at all?
Looks like this is since Bug 28273 And there are other places : > git grep '" + "\\n"' origin/main origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: msg = _("- Please select a pickup location for the item" + "\n") origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: msg = _("- Please select a pickup location for this hold" + "\n"); origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: msg = _("- Please select a pickup location for this hold" + "\n");
Backported to 23.05.x for upcoming 23.05.12
(In reply to Fridolin Somers from comment #7) > Looks like this is since Bug 28273 > > And there are other places : > > git grep '" + "\\n"' origin/main > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > msg = _("- Please select a pickup location for the item" + "\n") > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > msg = _("- Please select a pickup location for this hold" + "\n"); > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > msg = _("- Please select a pickup location for this hold" + "\n"); Fridolin, do we need to open a follow-up bug?
(In reply to Lucas Gass from comment #9) > (In reply to Fridolin Somers from comment #7) > > Looks like this is since Bug 28273 > > > > And there are other places : > > > git grep '" + "\\n"' origin/main > > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > > msg = _("- Please select a pickup location for the item" + "\n") > > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > > msg = _("- Please select a pickup location for this hold" + "\n"); > > origin/main:koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt: > > msg = _("- Please select a pickup location for this hold" + "\n"); > > Fridolin, do we need to open a follow-up bug? Yes, I think it would be good.
Created Bug 37017