Bug 10871 - Confirmation message for deleting news entries is not translatable
Summary: Confirmation message for deleting news entries is not translatable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 19:09 UTC by Katrin Fischer
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10871: Make confirmation message for deleting news translatable (1.59 KB, patch)
2013-09-10 19:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 10871: Make confirmation message for deleting news translatable (1.90 KB, patch)
2013-09-12 05:28 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10871: Make confirmation message for deleting news translatable (2.01 KB, patch)
2013-09-16 18:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10871: Make confirmation message for deleting news translatable (2.02 KB, patch)
2013-09-19 10:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-09-10 19:09:07 UTC
When you delete an entry from the news tool, the confirmation message is not translatable.
Comment 1 Katrin Fischer 2013-09-10 19:12:20 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-09-11 14:56:10 UTC
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.
Comment 3 Owen Leonard 2013-09-11 14:57:07 UTC
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.
Comment 4 Katrin Fischer 2013-09-11 14:57:39 UTC
My fault, sorry Owen! I will try to fix.
Comment 5 Katrin Fischer 2013-09-12 05:28:59 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2013-09-16 18:48:50 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2013-09-19 10:12:24 UTC
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>
Comment 8 Galen Charlton 2013-09-21 17:35:25 UTC
Pushed to master.  Thanks, Owen!
Comment 9 Galen Charlton 2013-09-21 17:35:58 UTC
Er, rather, thanks Katrin!
Comment 10 Tomás Cohen Arazi 2013-11-11 15:15:25 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Katrina!