When you delete an entry from the news tool, the confirmation message is not translatable.
Created attachment 20971 [details] [review] Bug 10871: Make confirmation message for deleting news translatable To test: - Create a news entry in tools > news - Delete the news entry or multiple entries by selecting them using the checkboxes to the left and the delete button at the bottom of the page. Verify confirmation message shows up correctly with patch applied. Bonus: - Update one of the po files and make sure the new strings shows up there.
This doesn't work for me, and I think we've seen this before. If you have the _() function inside an onclick attribute it doesn't work. One solution is to define a variable to pass to the function. Example in virtualshelves/shelves.tt (line 618): <input type="submit" class="deleteshelf" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);" value="Delete" /> The other solution would be to move everything into a <script> block and define the onsubmit behavior there.
Sorry--to be specific: This doesn't work for me because the string is not picked up by the translator. Functionally the JavaScript works, but after running translate update I don't find the string in the po file.
My fault, sorry Owen! I will try to fix.
Created attachment 20997 [details] [review] Bug 10871: Make confirmation message for deleting news translatable To test: - Create a news entry in tools > news - Delete the news entry or multiple entries by selecting them using the checkboxes to the left and the delete button at the bottom of the page. Verify confirmation message shows up correctly with patch applied. Bonus: - Update one of the po files and make sure the new strings shows up there. Thx Owen!
Created attachment 21126 [details] [review] [SIGNED-OFF] Bug 10871: Make confirmation message for deleting news translatable To test: - Create a news entry in tools > news - Delete the news entry or multiple entries by selecting them using the checkboxes to the left and the delete button at the bottom of the page. Verify confirmation message shows up correctly with patch applied. Bonus: - Update one of the po files and make sure the new strings shows up there. Thx Owen! Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 21228 [details] [review] Bug 10871: Make confirmation message for deleting news translatable To test: - Create a news entry in tools > news - Delete the news entry or multiple entries by selecting them using the checkboxes to the left and the delete button at the bottom of the page. Verify confirmation message shows up correctly with patch applied. Bonus: - Update one of the po files and make sure the new strings shows up there. Thx Owen! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Owen!
Er, rather, thanks Katrin!
This patch has been pushed to 3.12.x, will be in 3.12.7. Thanks Katrina!