anchor.diff:      color: red;
     }
       </style>
  -	<script type="text/javascript">
  -	onload = function (){
  -		$$("div.translation input, div.translation textarea").each(function (e){
  -			Event.observe(e,'focus', function (elm){
  -				this.up(".single-translation").down(".translation-text").addClassName("focus-text");
  -				this.up(".translation").addClassName("selected");
  -			});
  -			Event.observe(e,'blur', function (elm,e){
  -				this.up(".single-translation").down(".translation-text").removeClassName("focus-text");
  -				this.up(".translation").removeClassName("selected");
  -			});
  -		});
  -
  -		checkErrors()
  -	}
  -	</script>
  +  <script type="text/javascript">
  +  onload = function (){
  +    $$("div.translation input, div.translation textarea").each(function (e){
  +      Event.observe(e,'focus', function (elm){
  +        this.up(".single-translation").down(".translation-text").addClassName("focus-text");
  +        this.up(".translation").addClassName("selected");
  +      });
  +      Event.observe(e,'blur', function (elm,e){
  +        this.up(".single-translation").down(".translation-text").removeClassName("focus-text");
  +        this.up(".translation").removeClassName("selected");
  +      });
  +    });
  +
  +    checkErrors()
  +  }
  +  </script>
     </head>
     <body>
  -		<div id="container">
  -			<% if @page_title -%><h1><%=h @page_title %></h1><% end -%>
  -			  <% [:notice, :error].each do |message| %>
  -    		  <%if flash[message] %>
  -      		<div id="<%= message %>">
  -        			<span><%= h(flash[message]) if flash[message] %></span>
  -      		</div>
  -      		<% end %>
  -    		<% end %>
  -		<%= yield %>
  +    <div id="container">
  +      <% if @page_title -%><h1><%=h @page_title %></h1><% end -%>
  +        <% [:notice, :error].each do |message| %>
  +          <%if flash[message] %>
  +          <div id="<%= message %>">
  +              <span><%= h(flash[message]) if flash[message] %></span>
  +          </div>
  +          <% end %>
  +        <% end %>
  +    <%= yield %>
       </div>
     </body>
   </html>
  
positive.code: 
      function checkErrors()
      {  
      	var errors = [] 	
      	$$('.translation-error').each(function(item) { 
      		item.removeClassName("translation-error") 
      		item.select('.error-text')[0].innerHTML = ""
      	});
  
      	$$('.single-translation').each(function(item) {
              var val =  item.select('.edit-field')[0].value 
              if( !val.blank() )
              {
              	var patt1=/\{[^\{\}]*\}/g;
  	            var val_subs = val.match(patt1)
  	            var key = item.select('.translation-text')[0].innerHTML 
                  var key_subs = key.match(patt1)
  	            if( val_subs == null ){ val_subs = [] }
  	            if( key_subs == null ){ key_subs = [] }
  	            if( val_subs.sort().join('') != key_subs.sort().join('') )
  	            {
                     item.addClassName("translation-error");
                     errors.push( item )
                     item.select('.error-text')[0].innerHTML = "Mismatched {} substitution strings."
  	            }
  	        }
           });
      	return errors
     }
  
      function testAndSave()
      {  
      	var errors = checkErrors()
       	
      	if( errors.length == 0 || confirm( "Some transtalations have errors, save anyway?"))
          {
          	document.forms["translate_form"].submit();
          }   	  
      }
  
      /*
  
negative.code: 
      <%= translate_javascript_includes %>
  <script type="text/javascript">
  
  // Return elements which are in A but not in arg0 through argn
  Array.prototype.diff =
    function() {
      var a1 = this;
      var a = a2 = null;
      var n = 0;
      while(n < arguments.length) {
        a = [];
        a2 = arguments[n];
        var l = a1.length;
        var l2 = a2.length;
        var diff = true;
        for(var i=0; i<l; i++) {
          for(var j=0; j<l2; j++) {
            if (a1[i] === a2[j]) {
              diff = false;
              break;
            }
          }
          diff ? a.push(a1[i]) : diff = true;
        }
        a1 = a;
        n++;
      }
      return a.unique();
    };
  
  // Return new array with duplicate values removed
  Array.prototype.unique =
    function() {
      var a = [];
      var l = this.length;
      for(var i=0; i<l; i++) {
        for(var j=i+1; j<l; j++) {
          // If this[i] is found later in the array
          if (this[i] === this[j])
            j = ++i;
        }
        a.push(this[i]);
      }
      return a;
    };
  
  
      var source_ids = [];
  
      function googleCallback(response) {
  