r79775 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79774‎ | r79775 | r79776 >
Date:23:43, 6 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r79761
Modified paths:
  • /trunk/extensions/LiveTranslate/includes/ext.livetranslate.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/includes/ext.livetranslate.js
@@ -57,7 +57,7 @@
5858 'action': 'query',
5959 'format': 'json',
6060 'list': 'livetranslate',
61 - 'ltlanguage': currentLang,
 61+ 'ltlanguage': currentLang
6262 },
6363 function( data ) {
6464 if ( data.words ) {
@@ -105,7 +105,7 @@
106106 'format': 'json',
107107 'from': currentLang,
108108 'to': newLang,
109 - 'words': words.join( '|' ),
 109+ 'words': words.join( '|' )
110110 },
111111 function( data ) {
112112 if ( data.translations ) {
@@ -209,7 +209,7 @@
210210
211211 element.contents().each( function() {
212212 // 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 ) {
214214 runningJobs++;
215215 translateChunk(
216216 this.data.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79761Use data instead of wholeText for IE compatibilityjeroendedauw21:36, 6 January 2011

Status & tagging log