From dd5c6f4225f1615ba6ff88fe0fdf462a8327e1da Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Apr 2013 15:44:45 -0400 Subject: [PATCH] Bug 10002 - Don't include line breaks in strings that are translated Several JS alert messages contain "\n" which is problematic for translation. This patch removes those instances (a line break is not strictly necessary anyway). Also corrected: two instances of "holds(s)" To test, place a hold on a title with items. From the biblio detail page choose Edit -> Delete all items and Edit -> Delete record. In each case you should see error messages with no line breaks and no misspellings. Delete all items attached to the record with holds from the item edit page. Go back to the detail page and choose Edit -> Delete record. You should see an error message about existing hold(s) with no line breaks or misspellings. Signed-off-by: Chris Cormack Harmless change, fixes misspellings and makes translations easier Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov (cherry picked from commit 24d9d9c1712526cb0fe0a000fe255bfd8dbf1d22) Signed-off-by: Jared Camins-Esakov --- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 2dde5ad894..f669d2ce8f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -34,9 +34,9 @@ var is_confirmed; if (count > 0){ - is_confirmed = alert( count + " " +_("item(s) are attached to this record.\nYou must delete all items before deleting this record.") ); + is_confirmed = alert( count + " " +_("item(s) are attached to this record. You must delete all items before deleting this record.") ); } else if ( holdcount > 0 ) { - is_confirmed = confirm( holdcount + " " + _("holds(s) for this record \n Are you sure you want to delete this record?.")); + is_confirmed = confirm( holdcount + " " + _("hold(s) on this record. Are you sure you want to delete this record?.")); } else { is_confirmed = confirm(_("Are you sure you want to delete this record?")); } @@ -59,7 +59,7 @@ var holdcount = [% holdcount %]; if ( holdcount > 0 ) { - alert( holdcount + " " + _("holds(s) for this record \n You must delete all holds before deleting all items.") ); + alert( holdcount + " " + _("hold(s) on this record. You must delete all holds before deleting all items.") ); } else if ( count > 0 ) { if( confirm( _("Are you sure you want to delete the") + " " + count + " " + _("attached items?") ) ) { window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]"; -- 2.39.2