Bug 18264 added the following line to the .pl file: +my $inumber = $itemnumber ? "(blank) (itemnumber:$itemnumber)" : ""; This blank is untranslatable.
Created attachment 62065 [details] [review] Bug 18367 - Fix untranslatable string from Bug 18264 Restore display of message when no barcode found To test: 1 - Go to course reserves 2 - Add an item to a course 3 - Try adding an invalid barcode - should get an alert 4 - Try force adding an item with itemnumber: http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546 5 - Should recieve an error
I think this isn't the right way to format the string. As it is now, the po file for this string looks like this: "No item found with barcode %s" After this patch, it looks like this: "No item found %swith barcode %s%s" I think the latter is going to be more confusing to translators. It's more verbose, but I wonder if this would be better: [% IF ERROR_ITEM_NOT_FOUND %] [% IF UNKNOWN_BARCODE %] <div class="dialog alert">No item found with barcode [% UNKNOWN_BARCODE %]</div> [% ELSE %] <div class="dialog alert">No item found</div> [% END %] [% END %]
Yep, it would be better. Grammar works differently in different languages, so always better not to assume every language can 'glue' sentences together like in English.
Created attachment 64907 [details] [review] Bug 18367 - Fix untranslatable string from Bug 18264 Restore display of message when no barcode found To test: 1 - Go to course reserves 2 - Add an item to a course 3 - Try adding an invalid barcode - should get an alert 4 - Try force adding an item with itemnumber: http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546 5 - Should recieve an error
Created attachment 64933 [details] [review] Bug 18367 - Fix untranslatable string from Bug 18264 Restore display of message when no barcode found To test: 1 - Go to course reserves 2 - Add an item to a course 3 - Try adding an invalid barcode - should get an alert 4 - Try force adding an item with itemnumber: http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546 5 - Should recieve an error Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Created attachment 65026 [details] [review] Bug 18367 - Fix untranslatable string from Bug 18264 Restore display of message when no barcode found To test: 1 - Go to course reserves 2 - Add an item to a course 3 - Try adding an invalid barcode - should get an alert 4 - Try force adding an item with itemnumber: http://localhost:8081/cgi-bin/koha/course_reserves/add_items.pl?op=lookpup&course_id=11&itemnumber=1234523546 5 - Should recieve an error Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.11, thanks to everybody involved!
I check for 17.05.x. There is a problem : When clicking "Add reserves" on a course, you directly get "No item found" warning. This does not happen without patch.
Created attachment 65311 [details] [review] Bug 18367 - (QA Followup) Only warn if doing a lookup and not having an item
Last patch pushed to master for 17.11
Pushed to 17.05.x, will be in 17.05.03.
These patches have been pushed to 16.11.x and will be in 16.11.11.