Pman.GoogleTranslate.js
authorChris <chris@roojs.com>
Wed, 2 Apr 2014 13:49:00 +0000 (21:49 +0800)
committerChris <chris@roojs.com>
Wed, 2 Apr 2014 13:49:00 +0000 (21:49 +0800)
Pman.GoogleTranslate.js

index 40d628d..8905870 100644 (file)
@@ -155,7 +155,10 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
                     return;
                 }
 //                Roo.log('in3?');
-                cb(o.data.translatedText);
+                if(typeof(o.data.translations[0].translatedText) == 'undefined'){
+                    Roo.MessageBox.alert("Failure ", "Does not found the translated text.");
+                }
+                cb(o.data.translations[0].translatedText);
 //                ret = o.data.translatedText;
             },
             failure: function (res) {