MT3204 : Fix unstranslatable strings in JavaScript
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 7 Apr 2010 13:01:20 +0000 (15:01 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 7 Apr 2010 15:07:19 +0000 (11:07 -0400)
For an explanation, see:

http://wiki.koha.org/doku.php?id=en:development:codingguidelines#translatable_text

This bug blocks entirely serials module. It isn't possible
to create/edit a subscription. Brocken JavaScript prevents
Search for a vendor and Search for Biblio dialog box
to pop-up.

Problem with new strings and new html tags inside the strings
this patch removes them

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl

index a10cefa..dd8f069 100644 (file)
@@ -407,7 +407,7 @@ function moreoptions_daily_check(x) {
     var errortext='';
     if(periodicity == 1){ // i.e. daily
         document.getElementById("irregularity").innerHTML = '';
-        errortext =_("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
+        errortext =_("Please indicate which days of the week you DO NOT expect to receive issues.")+"<br \/>";
         for(var j=0;j<irregular_issues.daynames.length;j++){
             errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+irregular_issues.daynames[j]+" &nbsp; ";
         }
@@ -539,7 +539,7 @@ function irregularity_check(){
     var error='';
     var toobig;
     var expected; 
-    var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
+    var errortext = "<b>"+_("Warning irregularity detected")+"</b><br \/>";
     switch(periodicity){
     case "12":
         if(rollover < 730) expected =730;
@@ -626,9 +626,9 @@ function irregularity_check(){
                        // FIXME:  We interpret irregularity as which days per week for periodicity==1.
                        //  We need two cases: one in which we're published n days/week, in which case irregularity should be per week,
                        //  and a regular daily pub, where irregularity should be per year.
-            errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
+            errortext += _("Please indicate which days of the week you DO NOT expect to receive issues.")+"<br \/>";
         } else {
-            errortext +=expected+_(" issues expected, ")+rollover+_(" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>");
+            errortext +=expected+_(" issues expected, ")+rollover+_(" were entered.")+"<br \/>"+_("Please indicate which date(s) an issue is not expected")+"<br \/>";
             irregular_issues.numskipped = expected - rollover;
                }
         errortext +="<select multiple id=\"irregularity_select\" name=\"irregularity_select\" onchange=\"irregular_issues.update();\">\n";
@@ -637,7 +637,7 @@ function irregularity_check(){
         error=errortext;
     }
     if(toobig){
-        errortext +=expectedover+_(" issues expected, ")+rollover+_(" were entered.<p class=\"warning\"> You seem to have indicated more issues per year than expected.<\/p>");
+        errortext +=expectedover+_(" issues expected, ")+rollover+_(" were entered")+"<p class=\"warning\">"+_("You seem to have indicated more issues per year than expected.<\/p>");
         error=errortext;
     }
     if(error.length ==0){