[Koha-patches] [PATCH] MT3204 : Fix unstranslatable strings in JavaScript

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Apr 7 15:01:20 CEST 2010


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 at biblibre.com>
---
 .../prog/en/modules/serials/subscription-add.tmpl  |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
index a10cefa..dd8f069 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl
@@ -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){
-- 
1.6.3.3




More information about the Koha-patches mailing list