Pman.GoogleTranslate.js
[Pman.Core] / Pman.GoogleTranslate.js
index c9ceb67..1ccedd8 100644 (file)
@@ -144,16 +144,19 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
             },
             success: function(o)
             {
-                if (!o) {
+                Roo.log('in?');
+                if (!o.data) {
                     return o;
                 }
+                Roo.log('in2?');
                 if(typeof(o.data.error) != 'undefined'){
                     Roo.get(document.body).unmask();
                     Roo.MessageBox.alert("Failure ", o.data.error.message);
                     return;
                 }
-//                Roo.MessageBox.alert("Success", "We logged in OK")
-                return o.translatedText;
+                Roo.log('in3?');
+                
+                ret = o.data.translatedText;
             },
             failure: function (res) {
                 Roo.log(res);
@@ -161,7 +164,7 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
             }
         });
         
-//        return ret;
+        return ret;
         
 //        
 //        x.load(