[Koha-patches] [PATCH] Bug 10002 - Don't include line breaks in strings that are translated

Owen Leonard oleonard at myacpl.org
Tue Apr 9 21:54:15 CEST 2013


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.
---
 .../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 2dde5ad..f669d2c 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 %]";
-- 
1.7.9.5


More information about the Koha-patches mailing list