Permalink
Browse files

don't overwrite existing translations with google translate on click

  • Loading branch information...
1 parent 79b8dbd commit e32021e1e15cef8f7ed896feae0bf604e902df75 Simon Tokumine committed Jul 18, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/tolk/application.js
@@ -8,8 +8,8 @@ Event.observe(window, 'load', function() {
var phrase = this.up('tr').down('span.to_translate');
var textarea = this;
var target_language = $('target_language').innerHTML;
-
- if (phrase && textarea && $F(textarea).blank){
+
+ if (phrase && textarea && $F(textarea).blank()){
//translate it using google translate, autodetect source language
var to_trans = phrase.innerHTML;
google.language.translate(to_trans, "", target_language, function(result) {

0 comments on commit e32021e

Please sign in to comment.