From: Chris Date: Wed, 2 Apr 2014 10:43:20 +0000 (+0800) Subject: Pman.GoogleTranslate.js X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=5ed2a23f1d5606b4249c1af50d97f95e9fd2b338 Pman.GoogleTranslate.js --- diff --git a/Pman.GoogleTranslate.js b/Pman.GoogleTranslate.js index 4c750554..d8ca3cf6 100644 --- a/Pman.GoogleTranslate.js +++ b/Pman.GoogleTranslate.js @@ -145,12 +145,16 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) { if (!o.data) { return o; } + if(typeof(o.data.error) != 'undefined'){ + Roo.MessageBox.alert("Failure ", res.data.error.message); + return; + } // Roo.MessageBox.alert("Success", "We logged in OK") return o.data.translations[0].translatedText; }, failure: function (res) { Roo.log(res); - Roo.MessageBox.alert("Failure ", 'Got error'); + Roo.MessageBox.alert("Failure ", res.data.error.message); } }); //