r90528 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90527‎ | r90528 | r90529 >
Date:14:48, 21 June 2011
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
fixed IE breakage
Modified paths:
  • /trunk/extensions/LiveTranslate/includes/ext.lt.ms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/includes/ext.lt.ms.js
@@ -15,6 +15,7 @@
1616 this.runningJobs = 0;
1717 this.checkingForIdle = false;
1818 this.lastCompletion;
 19+// window.fooz = 0;
1920
2021 /**
2122 * Determines a chunk to translate of an DOM elements contents and calls the Microsoft Translate API.
@@ -114,7 +115,7 @@
115116 'appId': window.ltMsAppId,
116117 'from': sourceLang,
117118 'to': targetLang,
118 - 'text': jQuery.trim( chunk ) // Trim, so the result does not contain preceding or tailing spaces.
 119+ 'text': $.trim( chunk ) // Trim, so the result does not contain preceding or tailing spaces.
119120 },
120121 chunckTranslationDone
121122 );
@@ -142,8 +143,20 @@
143144 ltdebug( 'MS: Found content node' );
144145
145146 self.runningJobs++;
 147+
 148+// if ( window.fooz < 7 ) {
 149+// window.fooz++;
 150+// if ( window.fooz > 6 ) {
 151+// alert( this.data + "\n---------------" );
 152+// var partz = this.data.split( new RegExp( "[.!?](?=\\s+|$)", "gi" ) );
 153+// for ( i in partz ) {
 154+// alert( partz[i] );
 155+// }
 156+// }
 157+// }
 158+
146159 self.translateChunk(
147 - this.data.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ),
 160+ this.data.split( new RegExp( "[.!?](?=\\s+|$)", "gi" ) ), // "(\\S.+?[.!?])(?=\\s+|$)"
148161 [],
149162 maxChunkLength,
150163 sourceLang,

Follow-up revisions

RevisionCommit summaryAuthorDate
r90529follow up to r90528jeroendedauw15:01, 21 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   17:59, 21 June 2011

Debugging code left in??

#Comment by Jeroen De Dauw (talk | contribs)   18:15, 21 June 2011

Will remove once the issue has been fully fixed.

Status & tagging log