import ReactDOMServer from 'react-dom/server'; import * as Blockly from 'blockly/core'; import 'blockly/blocks'; import 'blockly/python'; import 'blockly/javascript'; import 'blockly/php'; import * as zhHans from 'blockly/msg/zh-hans'; import * as zhHant from 'blockly/msg/zh-hant'; import * as ko from 'blockly/msg/ko'; import * as en from 'blockly/msg/en'; const locales = { zh: zhHans, zh_CN: zhHans, zh_TW: zhHant, ko, ko_KR: ko, en, en_US: en, }; Blockly.setLocale(locales[UserContext.viewLang] || locales.en); export default Blockly; export const toolbox = ReactDOMServer.renderToString( 10 i 1 10 1 123 1 100 1 100 5 randomize x 1 list 1 y 1 list temp GET FROM_START y list y list GET FROM_START x list x list temp 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogroves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!" );