From 7c82fe1a670892b07f426f356c67bc3cd60a37f3 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 8 Sep 2013 01:03:35 +0200 Subject: [PATCH] Bug 10841: Make edit/delete item context links in cataloguing translatable HTML created with Javascript is not translatable the way HTML is normally translated. _() syntax has to be used to have strings translatable. To test: - Edit items for a record with multiple items - Click somewhere in the items table - Verify the links for editing and deleting items show up and work correctly - Apply patch - Verify the links still show the same behaviour Bonus: - Run 'perl translate update ' in misc/translator - Verify that Edit item and Delete item show up in the po file, translate them - Install updated po files running 'perl translate install ' - Verify links show up translated and work correctly Patch also fixes capitalization for a couple of error messages - only change there is: Deleted > deleted. Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart --- .../prog/en/modules/cataloguing/additem.tt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 8cc064b046..f5fecef134 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -27,7 +27,7 @@ $(document).ready(function(){ var rowid = $(this).parent().attr("id"); num_rowid = rowid.replace("row",""); $(".linktools").remove(); - $(this).append("Edit Item Delete Item"); + $(this).append("" + _("Edit item") + " " + _("Delete item") + ""); } }); }); @@ -114,10 +114,10 @@ $(document).ready(function() { [% IF ( barcode_not_unique ) %]
Error saving item: Barcode must be unique.
[% END %] [% IF ( no_next_barcode ) %]
Error saving items: Unable to automatically determine values for barcodes. No item has been inserted.
[% END %] -[% IF ( book_on_loan ) %]
Cannot Delete: item is checked out.
[% END %] -[% IF ( book_reserved ) %]
Cannot Delete: item has a waiting hold.
[% END %] -[% IF ( not_same_branch ) %]
Cannot Delete: The items do not belong to your library.
[% END %] -[% IF ( linked_analytics ) %]
Cannot Delete: item has linked analytics..
[% END %] +[% IF ( book_on_loan ) %]
Cannot delete: item is checked out.
[% END %] +[% IF ( book_reserved ) %]
Cannot delete: item has a waiting hold.
[% END %] +[% IF ( not_same_branch ) %]
Cannot delete: The items do not belong to your library.
[% END %] +[% IF ( linked_analytics ) %]
Cannot delete: item has linked analytics..
[% END %]
[% IF ( item_loop ) %] -- 2.39.5