projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0323913
)
Pman.GoogleTranslate.js
author
Chris
<chris@roojs.com>
Wed, 2 Apr 2014 12:14:35 +0000
(20:14 +0800)
committer
Chris
<chris@roojs.com>
Wed, 2 Apr 2014 12:14:35 +0000
(20:14 +0800)
Pman.GoogleTranslate.js
patch
|
blob
|
history
diff --git
a/Pman.GoogleTranslate.js
b/Pman.GoogleTranslate.js
index
e10f291
..
bdd59d0
100644
(file)
--- a/
Pman.GoogleTranslate.js
+++ b/
Pman.GoogleTranslate.js
@@
-129,7
+129,9
@@
Pman.GoogleTranslate = function(str, src, dest, cb, force) {
// google does not recognize HK...
if (src == 'zh-HK') src = 'zh-TW';
if (dest == 'zh-HK') dest = 'zh-TW';
// google does not recognize HK...
if (src == 'zh-HK') src = 'zh-TW';
if (dest == 'zh-HK') dest = 'zh-TW';
-
+
+ var ret = '';
+
new Pman.Request({
url : baseURL + '/Core/GoogleTranslate.php',
method :'POST',
new Pman.Request({
url : baseURL + '/Core/GoogleTranslate.php',
method :'POST',
@@
-151,13
+153,16
@@
Pman.GoogleTranslate = function(str, src, dest, cb, force) {
return;
}
// Roo.MessageBox.alert("Success", "We logged in OK")
return;
}
// Roo.MessageBox.alert("Success", "We logged in OK")
-
return
o.data.data.translations[0].translatedText;
+
str =
o.data.data.translations[0].translatedText;
},
failure: function (res) {
Roo.log(res);
Roo.MessageBox.alert("Failure ", res.data.error.message);
}
});
},
failure: function (res) {
Roo.log(res);
Roo.MessageBox.alert("Failure ", res.data.error.message);
}
});
+
+ return ret;
+
//
// x.load(
// {
//
// x.load(
// {