From 6598738ed22a36fbb178fd3c3947d4f6080552ff Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Wed, 16 May 2018 17:25:45 -0400 Subject: [PATCH] wip --- package.json | 14 +++++++------- src/extensions/scratch3_translate/index.js | 5 ++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index afabb26e1..c94ca4499 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,11 @@ }, "devDependencies": { "adm-zip": "0.4.7", - "arraybuffer-loader": "^1.0.3", + "arraybuffer-loader": "^1.0.4", "babel-core": "^6.24.1", "babel-eslint": "^8.0.1", "babel-loader": "^7.0.0", - "babel-preset-env": "^1.6.1", + "babel-preset-env": "^1.7.0", "canvas-toBlob": "1.0.0", "copy-webpack-plugin": "^4.5.1", "decode-html": "2.0.0", @@ -56,18 +56,18 @@ "nets": "3.2.0", "pngjs": "^3.3.2", "promise": "8.0.1", - "scratch-audio": "latest", - "scratch-blocks": "latest", + "scratch-audio": "0.1.0-prerelease.1525799078", + "scratch-blocks": "0.1.0-prerelease.1526482649", "scratch-parser": "4.1.1", - "scratch-render": "latest", + "scratch-render": "0.1.0-prerelease.20180514172756", "scratch-storage": "^0.4.0", "script-loader": "0.7.2", "socket.io-client": "2.0.4", "stats.js": "^0.17.0", - "tap": "^11.0.1", + "tap": "^11.1.5", "text-encoding": "0.6.4", "tiny-worker": "^2.1.1", - "webpack": "^4.8.0", + "webpack": "^4.8.3", "webpack-cli": "^2.0.15", "webpack-dev-server": "^3.1.3", "worker-loader": "^1.1.1" diff --git a/src/extensions/scratch3_translate/index.js b/src/extensions/scratch3_translate/index.js index 685082be3..cbd459c4a 100644 --- a/src/extensions/scratch3_translate/index.js +++ b/src/extensions/scratch3_translate/index.js @@ -2,6 +2,7 @@ const ArgumentType = require('../../extension-support/argument-type'); const BlockType = require('../../extension-support/block-type'); const log = require('../../util/log'); const nets = require('nets'); +const languageNames = require('scratch-translate-extension-languages'); // TODO: Change these to the correct icons. const blockIconURI = 'https://www.gstatic.com/images/icons/material/system/1x/translate_white_24dp.png'; @@ -25,6 +26,8 @@ const serverTimeoutMs = 10000; // 10 seconds (chosen arbitrarily). */ class Scratch3TranslateBlocks { constructor () { + + console.log(languageNames); /** * List of supported language name and language code pairs. * @type {Array.>} @@ -153,7 +156,7 @@ class Scratch3TranslateBlocks { } }; } - + /** * Translates the text in the translate block to the language specified in the menu. * @param {object} args - the block arguments.