DataObjects/Core_notify.php
[Pman.Core] / Pman.GoogleTranslate.js
index f4d1b31..a8c27b4 100644 (file)
@@ -31,8 +31,7 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
             return Roo.util.Format.htmlDecode( output);
         }
         
-        
-        
+         
         function transbits()
         {
             while (true) {
@@ -63,8 +62,9 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
         }
         
         // chunk up long strings..
+        // we should roo.encode to test lenght..
         if (!force && str.length > 200) {
-            var bits = str.split(/(\s+|[0-9]+)/);
+            var bits = str.split(/(\s+|[0-9\u3002\uff0c\u3001\u201c\u201d]+)/);
             sbits[0]  = '';
             for (var i =0; i < bits.length; i++) {
                 if (sbits[cur].length + bits[i].length > 190) {
@@ -86,11 +86,7 @@ Pman.GoogleTranslate = function(str, src, dest, cb, force) {
                 
                 
                 
-                
-        
-        
-        
-        
+          
         var x = new Roo.data.ScriptTagProxy({ 
             url:  'http://ajax.googleapis.com/ajax/services/language/translate', 
             callbackParam : 'callback'