r90291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90290‎ | r90291 | r90292 >
Date:16:35, 17 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r90290
Modified paths:
  • /trunk/extensions/LiveTranslate/includes/ext.lt.ms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/includes/ext.lt.ms.js
@@ -108,27 +108,16 @@
109109 }
110110 };
111111
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+ );
133122 }
134123
135124 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90290added idleness detection to complete when a json request failedjeroendedauw16:29, 17 June 2011

Status & tagging log