From d14d6550af7cd6027d69b479300a33df95e42840 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sun, 5 Sep 2021 12:15:25 -0500 Subject: [PATCH] no-op translate blocks until the API is fixed it's likely we will have to do some proxying+caching of the API in the future for now, we just want these blocks to not stall for 10 seconds --- src/extensions/scratch3_translate/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extensions/scratch3_translate/index.js b/src/extensions/scratch3_translate/index.js index 871ca326..34471d55 100644 --- a/src/extensions/scratch3_translate/index.js +++ b/src/extensions/scratch3_translate/index.js @@ -247,6 +247,9 @@ class Scratch3TranslateBlocks { * @return {Promise} - a promise that resolves after the response from the translate server. */ getTranslate (args) { + // tw: Temporary hack until translate API is fixed + return Promise.resolve(args.WORDS); + // If the text contains only digits 0-9 and nothing else, return it without // making a request. if (/^\d+$/.test(args.WORDS)) return Promise.resolve(args.WORDS);