Created attachment 160797 [details] Screenshot of the untranslatable pop up There is a untranslatable string In requeste.tt: "Please make sure all selected titles have a pickup location set" (line 1552). See the attachment. The string shows up when you are making a multi-hold and leave one of the titles without pick-up place and then try to save the holds.
*** Bug 35770 has been marked as a duplicate of this bug. ***
Created attachment 161011 [details] [review] Bug 35769: Fix untranslatable strings in request.tt This fixes some strings in the JavaScript part of the template that were missing from the po files. This is one way to test: * Apply patch * Run gulp po:update --lang <language-code> * Compare strings changed in the patch, with strings appearing in <language-code>-staff-prog.po * Translate the strings and remove "fuzzy" line * In k-t-d, run: sudo koha-translate --install <language-code> --dev <instance> * Verify that now the translated version of the template contains your translated strings * Verify the translated page works correctly, no errors
I think you have extra parenthesis: msg = (_("- Please select a pickup location for the item") + "\n"); should be msg = _("- Please select a pickup location for the item") + "\n";
I know, but the strings weren't picked up for translation before I added them. I copied from another place in the file where it worked. Do you see why else this did not work before?
Created attachment 161222 [details] [review] Bug 35769: Fix untranslatable strings in request.tt This fixes some strings in the JavaScript part of the template that were missing from the po files. This is one way to test: * Apply patch * Run gulp po:update --lang <language-code> * Compare strings changed in the patch, with strings appearing in <language-code>-staff-prog.po * Translate the strings and remove "fuzzy" line * In k-t-d, run: sudo koha-translate --install <language-code> --dev <instance> * Verify that now the translated version of the template contains your translated strings * Verify the translated page works correctly, no errors Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using koha-testing-docker): 1. Replicate the issue: 1.1 Install another language: sudo koha-translate --install <language-code> --dev <instance> (sudo koha-translate --install fr-CA --dev kohadev) 1.2 Enable the language in the staff interface: Administration > System preferences > I18N/L10N > language > select the language you installed (for example: Français (fr-CA)) > Save all I18N/L10N... 1.3 Check the <language-code>-staff-prog.po file for these phrases (in misc/translator/po directory) - they are not found: - Please select a pickup location for the item - Please select a pickup location for this hold - Please make sure all selected titles have a pickup location set - Please select at least one title 1.4 Change the staff interface to the language you have installed 1.5 Perform actions that generate the messages and note that they are in English: - Please make sure all selected titles have a pickup location set: . Perform a search that returns multiple results . Select several of the results and then click the 'Place hold' button . Enter a patron and for the hold screen make sure the pickup location is empty, and click 'Place hold' . Pop up message is not translated and is still in English - Not sure how to generate the other ones 2. Apply the patch. 3. Update the translations: gulp po:update --lang <language-code> (gulp po:update --lang fr-CA) 4. Compare the strings changed in the patch (see step 1.3), with strings appearing in <language-code>-staff-prog.po - they should all now be found in the file. 5. Add a translation for the strings and remove the "fuzzy" line. 6. Update the language: sudo koha-translate --update <language-code> --dev <instance> (sudo koha-translate --install fr-CA --dev kohadev) 7. Repeat step 1.5 - verify that the translated content is now used. 8. Verify that the translated page works correctly, and that there are no errors.
Created attachment 161312 [details] [review] Bug 35769: Fix untranslatable strings in request.tt This fixes some strings in the JavaScript part of the template that were missing from the po files. This is one way to test: * Apply patch * Run gulp po:update --lang <language-code> * Compare strings changed in the patch, with strings appearing in <language-code>-staff-prog.po * Translate the strings and remove "fuzzy" line * In k-t-d, run: sudo koha-translate --install <language-code> --dev <instance> * Verify that now the translated version of the template contains your translated strings * Verify the translated page works correctly, no errors Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(In reply to Jonathan Druart from comment #3) > I think you have extra parenthesis: > > msg = (_("- Please select a pickup location for the item") + "\n"); > > should be > > msg = _("- Please select a pickup location for the item") + "\n"; At first I thought the same, but they don't appear to cause a problem in reality.. it's weird.. but it works. I'm passing QA, but I'd love to understand better why that's the case.
(In reply to Martin Renvoize from comment #8) > (In reply to Jonathan Druart from comment #3) > > I think you have extra parenthesis: > > > > msg = (_("- Please select a pickup location for the item") + "\n"); > > > > should be > > > > msg = _("- Please select a pickup location for the item") + "\n"; > > At first I thought the same, but they don't appear to cause a problem in > reality.. it's weird.. but it works. > > I'm passing QA, but I'd love to understand better why that's the case. I have to admit, I found this through trial and error and would like to understand better as well.
Created attachment 161346 [details] [review] Bug 35769: Remove extra parenthesis
(In reply to Katrin Fischer from comment #4) > I know, but the strings weren't picked up for translation before I added > them. > I copied from another place in the file where it worked. > > Do you see why else this did not work before? This is working for me. Please try again.
Looks like this is still under consideration. Changing status.
Bumping back into the QA queue.. hoping someone with a little more translation structure knowledge can pick it off.
Sending to Katrin's. We were waiting for her.
Sorry missing the time :( If someone has a moment before me, happy to turn this over.
Sometimes it's good to come back a bit later, I see what I missed before now. Thanks Jonathan!
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.06