BUG 4883: Staff - remove \n from strings for translation
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Thu, 17 Jun 2010 19:51:22 +0000 (21:51 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Sat, 19 Jun 2010 12:09:09 +0000 (08:09 -0400)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl

index 93ca290..957a81c 100644 (file)
         // var actTotal ="";
 
         if (!(isNotNull(f.budget_code,1))) {
-            _alertString += _("- Budget code cannot be blank\n");
+            _alertString += _("- Budget code cannot be blank") + "\n";
         }
 
         if (!(isNotNull(f.budget_name,1))) {
-            _alertString += _("- Budget name cannot be blank\n");
+            _alertString += _("- Budget name cannot be blank") + "\n";
         }
 
         if (!(isNotNull(f.budget_amount,1))) {
-            _alertString += _("- Budget amount cannot be blank\n");
+            _alertString += _("- Budget amount cannot be blank") + "\n";
         }
 
         var budgetId;
@@ -52,7 +52,7 @@
             if   (budgetId  > 0)  {  ; //its a mod ...
                 // if parent eq curent-budget, fail...
                 if ( newBudgetParent  ==  budgetId     ) {
-                        _alertString += _("- Budget parent is current budget\n");
+                        _alertString += _("- Budget parent is current budget") + "\n";
                 }
 
                 else if (newBudgetParent) {
@@ -74,8 +74,8 @@
         if (_alertString.length==0) {
             document.Aform.submit();
         } else {
-            alertString2 = _("Form not submitted because of the following problem(s)\n");
-            alertString2 += "------------------------------------------------------------------------------------\n\n";
+            alertString2 = _("Form not submitted because of the following problem(s)");
+            alertString2 += "\n------------------------------------------------------------------------------------\n\n";
             alertString2 += _alertString;
             alert(alertString2);
         }
index 95e8c6b..bb8c234 100644 (file)
 // to check if the data are correctly entered.
 function Check(ff) {
     var ok=0;
-    var _alertString=_("Form not submitted because of the following problem(s)\n");
-    _alertString +="-------------------------------------------------------------------\n\n";
+    var _alertString=_("Form not submitted because of the following problem(s)");
+    _alertString +="\n-------------------------------------------------------------------\n\n";
     if (!(isNotNull(ff.contractname,0))){
         ok=1;
-        _alertString += _("- Name missing\n");
+        _alertString += _("- Name missing") + "\n";
     }
     var startDate = Date_from_syspref($("#contractstartdate").val());
     var endDate   = Date_from_syspref($("#contractenddate").val());
     if (!parseInt(startDate.getTime())) {
         ok=1;
-        _alertString += _("- Start date missing or invalid.\n");
+        _alertString += _("- Start date missing or invalid.") + "\n";
     }
     if (!parseInt(endDate.getTime())) {
         ok=1;
-        _alertString += _("- End date missing or invalid.\n");
+        _alertString += _("- End date missing or invalid.") + "\n";
     }
     
     if (startDate > endDate) {
         ok=1;
-        _alertString += _("Wrong date! start date cannot be after end date.\n");
+        _alertString += _("Wrong date! start date cannot be after end date.") + "\n";
     }
     if (endDate < (new Date)) {
         ok=1;
-        _alertString += _("End date before today, Invalid end date!\n");
+        _alertString += _("End date before today, Invalid end date!") + "\n";
     }
     if (ok) { // if there is a problem
         alert(_alertString);
index 72b132f..3304403 100644 (file)
@@ -91,14 +91,14 @@ function AreMandatoriesNotOk(){
        
        if(isempty){
                flag = 1;
-               StrAlert += "\t* Field " + arr[0] + " is mandatory, at least one of its subfields must be filled\n";
+                       StrAlert += "\t* Field " + arr[0] + _(" is mandatory, at least one of its subfields must be filled") + "\n";
        }
        
     }
     
     
     if(StrAlert){
-        return _("Can't save this record because the following field aren't filled :\n\n") + StrAlert;
+        return _("Can't save this record because the following field aren't filled :") + "\n\n" + StrAlert;
     }
     return false;
 }
index 0f06ec8..5e81e1f 100644 (file)
@@ -47,14 +47,14 @@ function check() {
     }
 
     if (count_reserv == "0"){
-               msg += (_("- Please select an item to place a hold\n"));
+               msg += (_("- Please select an item to place a hold") + "\n");
     }
     if (count_reserv >= "2"){
-               msg += (_("- You may only place a hold on one item at a time\n"));
+               msg += (_("- You may only place a hold on one item at a time") + "\n");
     }
 
     if (alreadyreserved > "0"){
-               msg += (_("- This patron had already placed a hold on this item\n Please cancel the previous hold first \n"));
+               msg += (_("- This patron had already placed a hold on this item") + "\n" + _("Please cancel the previous hold first") + "\n");
     }
 
        if (msg == "") return(true);
index 39e6793..b335fb2 100644 (file)
@@ -96,14 +96,14 @@ function placeHold () {
                var alertString2;
 
            if(f.addshelf.value.length ==0){
-                       _alertString += _("- You must enter a List Name\n");
+                       _alertString += _("- You must enter a List Name") + "\n";
                }
 
                if (_alertString.length==0) {
                        document.Aform.submit();
                } else {
-                       alertString2 = _("Form not submitted because of the following problem(s)\n");
-                       alertString2 += "------------------------------------------------------------------------------------\n\n";
+                       alertString2 = _("Form not submitted because of the following problem(s)");
+                       alertString2 += "\n------------------------------------------------------------------------------------\n\n";
                        alertString2 += _alertString;
                        alert(alertString2);
                }