Index: trunk/extensions/LiveTranslate/includes/ext.lt.ms.js |
— | — | @@ -108,27 +108,16 @@ |
109 | 109 | } |
110 | 110 | }; |
111 | 111 | |
112 | | - // Trim, so the result does not contain preceding or tailing spaces. |
113 | | - var trimmedChunk = jQuery.trim( chunk ); |
114 | | - |
115 | | -// if ( trimmedChunk.length < 50 ) { |
116 | | -// self.handleTranslationCompletion( targetLang ); |
117 | | -// //chunckTranslationDone( trimmedChunk ); |
118 | | -// } |
119 | | -// else { |
120 | | - $.getJSON( |
121 | | - 'http://api.microsofttranslator.com/V2/Ajax.svc/Translate?oncomplete=?', |
122 | | - { |
123 | | - 'appId': window.ltMsAppId, |
124 | | - 'from': sourceLang, |
125 | | - 'to': targetLang, |
126 | | - 'text': trimmedChunk |
127 | | - }, |
128 | | - chunckTranslationDone |
129 | | - ); |
130 | | -// } |
131 | | - |
132 | | - |
| 112 | + $.getJSON( |
| 113 | + 'http://api.microsofttranslator.com/V2/Ajax.svc/Translate?oncomplete=?', |
| 114 | + { |
| 115 | + 'appId': window.ltMsAppId, |
| 116 | + 'from': sourceLang, |
| 117 | + 'to': targetLang, |
| 118 | + 'text': jQuery.trim( chunk ) // Trim, so the result does not contain preceding or tailing spaces. |
| 119 | + }, |
| 120 | + chunckTranslationDone |
| 121 | + ); |
133 | 122 | } |
134 | 123 | |
135 | 124 | /** |