File tree Expand file tree Collapse file tree
src/QuickTranslateBundle/Resources/public/js/quick-translate-btn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,8 +248,8 @@ pimcore.document.editables.areablock = Class.create(pimcore.document.editables.a
248248 "Content-Type" : "application/json"
249249 } ,
250250 success : function ( response ) {
251-
252- translatedParts . push ( response . translations [ 0 ] . text ) ;
251+ var responseText = Ext . decode ( response . responseText ) ;
252+ translatedParts . push ( responseText . translations [ 0 ] . text ) ;
253253 progressBar [ 0 ] . updateProgress ( translatedParts . length / partsToTranslate . length , "Translating: " + translatedParts . length + " of " + partsToTranslate . length ) ;
254254 } ,
255255 failure : function ( response ) {
@@ -380,9 +380,9 @@ pimcore.document.editables.areablock = Class.create(pimcore.document.editables.a
380380 "Content-Type" : "application/json"
381381 } ,
382382 success : function ( response ) {
383- var response = Ext . decode ( response . responseText ) ;
383+ var responseText = Ext . decode ( response . responseText ) ;
384384
385- elems = xmlToJson ( response . translations [ 0 ] . text , srcSet , true ) ;
385+ elems = xmlToJson ( responseText . translations [ 0 ] . text , srcSet , true ) ;
386386
387387 translatingWindow . destroy ( ) ;
388388
You can’t perform that action at this time.
0 commit comments