Index: trunk/extensions/LiveTranslate/includes/ext.livetranslate.js |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | 'action': 'query', |
59 | 59 | 'format': 'json', |
60 | 60 | 'list': 'livetranslate', |
61 | | - 'ltlanguage': currentLang, |
| 61 | + 'ltlanguage': currentLang |
62 | 62 | }, |
63 | 63 | function( data ) { |
64 | 64 | if ( data.words ) { |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | 'format': 'json', |
107 | 107 | 'from': currentLang, |
108 | 108 | 'to': newLang, |
109 | | - 'words': words.join( '|' ), |
| 109 | + 'words': words.join( '|' ) |
110 | 110 | }, |
111 | 111 | function( data ) { |
112 | 112 | if ( data.translations ) { |
— | — | @@ -209,7 +209,7 @@ |
210 | 210 | |
211 | 211 | element.contents().each( function() { |
212 | 212 | // If it's a text node, then translate it. |
213 | | - if ( this.nodeType == 3 && this.data != undefined && this.data.trim().length > 0 ) { |
| 213 | + if ( this.nodeType == 3 && this.data != undefined && jQuery.trim( this.data ).length > 0 ) { |
214 | 214 | runningJobs++; |
215 | 215 | translateChunk( |
216 | 216 | this.data.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ), |