Bug 9780: (follow-up) suppress line feeds in javascript
authorMathieu Saby <mathieu.saby@univ-rennes2.fr>
Mon, 21 Oct 2013 17:24:34 +0000 (19:24 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 1 Nov 2013 00:00:28 +0000 (00:00 +0000)
This patch suppress \n in javascript, in order to keep Pootle quiet.

String patch, no need to test I think.
But if you want to test, replay the test plan of main patch, and check
the messages in javascript alert are displaying the right way.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc

index 2c6f350..63b22a4 100644 (file)
          }
         else if (countorders > 0){
             [% IF ( CAN_user_acquisition_order_manage ) %]
-                is_confirmed = confirm( _("Warning: This record is used in")+" "+ countorders + " " +_("order(s). Deleting it could cause serious issues on acquisition module.\nAre you sure you want to delete this record?") );
+                is_confirmed = confirm( _("Warning: This record is used in")+" "+ countorders + " " +_("order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?") );
             [% ELSE %]
-                is_confirmed = alert( countorders + " " +_("order(s) are using this record.\nYou need order managing permissions to delete this record.") );
+                is_confirmed = alert( countorders + " " +_("order(s) are using this record. You need order managing permissions to delete this record.") );
             [% END %]
         }
         else if (countdeletedorders > 0){
              [% IF ( CAN_user_acquisition_order_manage ) %]
-                 is_confirmed = confirm( countdeletedorders + " " +_("deleted order(s) are using this record.\nAre you sure you want to delete this record?") );
+                 is_confirmed = confirm( countdeletedorders + " " +_("deleted order(s) are using this record. Are you sure you want to delete this record?") );
              [% ELSE %]
-                 is_confirmed = alert( countdeletedorders + " " +_("deleted order(s) are using this record.\nYou need order managing permissions to delete this record.") );
+                 is_confirmed = alert( countdeletedorders + " " +_("deleted order(s) are using this record. You need order managing permissions to delete this record.") );
              [% END %]
         }
         else if ( holdcount > 0 ) {
-            is_confirmed = confirm( holdcount + " " + _("holds(s) for this record.\nAre you sure you want to delete this record?"));
+            is_confirmed = confirm( holdcount + " " + _("holds(s) for this record. Are you sure you want to delete this record?"));
         } else {
             is_confirmed = confirm(_("Are you sure you want to delete this record?"));
         }