diff --git a/src/components/Blockly/BlocklyWindow.js b/src/components/Blockly/BlocklyWindow.js index 15ec6d1..d68e272 100644 --- a/src/components/Blockly/BlocklyWindow.js +++ b/src/components/Blockly/BlocklyWindow.js @@ -2,7 +2,8 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { onChangeWorkspace, clearStats } from '../../actions/workspaceActions'; -import * as De from './msg/de'; +// import * as De from 'blockly/msg/de'; +import {De} from './msg/de'; import BlocklyComponent from './BlocklyComponent'; import BlocklySvg from './BlocklySvg'; import * as Blockly from 'blockly/core'; diff --git a/src/components/Blockly/msg/de.js b/src/components/Blockly/msg/de.js index cf6db85..202084e 100644 --- a/src/components/Blockly/msg/de.js +++ b/src/components/Blockly/msg/de.js @@ -1,5 +1,9 @@ +// import * as Blockly from 'blockly/core'; -import * as Blockly from 'blockly/core'; +// https://developers.google.com/blockly/guides/configure/web/translations + +const Blockly = {}; +Blockly.Msg = {}; Blockly.Msg.ADD_COMMENT = "Kommentar hinzufügen"; Blockly.Msg.AUTH = "Bitte autorisiere diese App zum Aktivieren der Speicherung deiner Arbeit und zum Teilen."; @@ -770,3 +774,4 @@ Blockly.Msg.senseBox_telegram_send = "Sende Nachricht" Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; +export const De = Blockly.Msg; diff --git a/src/components/Blockly/msg/en.js b/src/components/Blockly/msg/en.js index e32e321..856ef7c 100644 --- a/src/components/Blockly/msg/en.js +++ b/src/components/Blockly/msg/en.js @@ -1,5 +1,9 @@ +// import * as Blockly from 'blockly/core'; -import * as Blockly from 'blockly/core'; +// https://developers.google.com/blockly/guides/configure/web/translations + +const Blockly = {}; +Blockly.Msg = {}; Blockly.Msg.ADD_COMMENT = "Add Comment"; Blockly.Msg.AUTH = "Please authorize this app to enable your work to be saved and to allow it to be shared by you."; @@ -750,4 +754,6 @@ Blockly.Msg.sensebox_sd_filename = "data"; Blockly.Msg.sensebox_soil_smt50 = "Soil Moisture and Temperature (SMT50)"; Blockly.Msg.sensebox_web_readHTML_filename = "File:"; -Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; \ No newline at end of file +Blockly.Msg.senseBox_scd30 = "CO2 Sensor (Sensirion SCD30)"; + +export const En = Blockly.Msg; diff --git a/src/components/Blockly/toolbox/Toolbox.js b/src/components/Blockly/toolbox/Toolbox.js index 3cfae6e..ec5711e 100644 --- a/src/components/Blockly/toolbox/Toolbox.js +++ b/src/components/Blockly/toolbox/Toolbox.js @@ -183,7 +183,7 @@ class Toolbox extends React.Component { - + @@ -202,7 +202,7 @@ class Toolbox extends React.Component { - + @@ -211,7 +211,7 @@ class Toolbox extends React.Component { - + @@ -250,7 +250,7 @@ class Toolbox extends React.Component { - + @@ -270,7 +270,7 @@ class Toolbox extends React.Component { - + @@ -325,7 +325,7 @@ class Toolbox extends React.Component { ; - +