{ "HIGHLIGHTSTROKECOLORS": [ [ "external", "#000000" ] ], "ARGPLUGINS": [ [ "translate", "var apiURL = 'https://community-onehourtranslation.p.mashape.com/mt/';var key = 'TranslatedText';var text = logo.parseArg(logo, turtle, logo.blocks.blockList[blk].connections[1]);var targetLang = 'Spanish';var args = 'translate/text?public_key=' + translatePublicKey + '&secret_key=' + translateSecretKey + '&source_content=' + text + '&source_language=' + fromLang + '&target_language=' + toLang;var request = new XMLHttpRequest();request.open('GET', apiURL + args, false);request.setRequestHeader('X-Mashape-Authorization', translateMashapeKey);request.send(null);var value = JSON.parse(request.responseText)['results'][key];if (!value) { logo.errorMsg('Problem with the language setting.', blk); value = '';}logo.blocks.blockList[blk].value = value;" ], [ "detectlang", "var apiURL = 'https://community-onehourtranslation.p.mashape.com/mt/';var key = 'language';var text = logo.parseArg(logo, turtle, logo.blocks.blockList[blk].connections[1]);var args = 'detect/text?public_key=' + translatePublicKey + '&secret_key=' + translateSecretKey + '&source_content=' + text;var request = new XMLHttpRequest();request.open('GET', apiURL + args, false);request.setRequestHeader('X-Mashape-Authorization', translateMashapeKey);request.send(null);var value = JSON.parse(request.responseText)['results'][key];if (!value) { logo.errorMsg('Problem with the language setting.', blk); value = '';}logo.blocks.blockList[blk].value = value;" ] ], "GLOBALS": "translateMashapeKey = '3Rfxc7fwp2mshJxgtDxKSueYna8Ap1qZfAcjsn2hjpuWPuBCrI';translatePublicKey = 'nGhwbdV7TrtzC9qLp3DZ';translateSecretKey = '3b68e1d00446eed728cdda66280a8312';", "PALETTEHIGHLIGHTCOLORS": [ [ "external", "#9DC4FF" ] ], "FLOWPLUGINS": [ [ "setlang", "fromLang = logo.parseArg(logo, turtle, logo.blocks.blockList[blk].connections[1]);toLang = logo.parseArg(logo, turtle, logo.blocks.blockList[blk].connections[2]);" ] ], "PALETTEPLUGINS": [ [ "external", "" ] ], "BLOCKPLUGINS": [ [ "translate", "var translateBlock = new ProtoBlock('translate');translateBlock.palette = palettes.dict['external'];blocks.protoBlockDict['translate'] = translateBlock;translateBlock.staticLabels.push(_('translate'));translateBlock.adjustWidthToLabel();translateBlock.oneArgMathBlock();translateBlock.dockTypes[0] = 'textout';translateBlock.dockTypes[1] = 'textin';translateBlock.defaults.push(_('hello'));" ], [ "detectlang", "var detectLangBlock = new ProtoBlock('detectlang');detectLangBlock.palette = palettes.dict['external'];blocks.protoBlockDict['detectlang'] = detectLangBlock;detectLangBlock.staticLabels.push(_('detect lang'));detectLangBlock.adjustWidthToLabel();detectLangBlock.oneArgMathBlock();detectLangBlock.dockTypes[0] = 'textout';detectLangBlock.dockTypes[1] = 'anyin';detectLangBlock.defaults.push(_('hello'));" ], [ "setlang", "var setLangBlock = new ProtoBlock('setlang');setLangBlock.palette = palettes.dict['external'];blocks.protoBlockDict['setlang'] = setLangBlock;setLangBlock.staticLabels.push(_('set lang'), _('source'), _('target'));setLangBlock.adjustWidthToLabel();setLangBlock.twoArgBlock();setLangBlock.dockTypes[1] = 'anyin';setLangBlock.dockTypes[2] = 'anyin';setLangBlock.defaults.push('English', 'Spanish');" ] ], "PALETTEFILLCOLORS": [ [ "external", "#59f" ] ], "PALETTESTROKECOLORS": [ [ "external", "#3771c8" ] ] }