fix german variable translations

This commit is contained in:
fbruc03 2022-11-09 17:05:51 +01:00
parent 506ddef7e9
commit a31195f71e
4 changed files with 14 additions and 8 deletions

View File

@ -9,10 +9,10 @@ Blockly.Blocks["variables_set_dynamic"] = {
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
this.appendValueInput("VALUE")
.appendField("set", "set")
.appendField("", "type")
.appendField(Blockly.Msg.variables_set, Blockly.Msg.variables_set)
// .appendField("", "type")
.appendField(new Blockly.FieldVariable("VAR"), "VAR")
.appendField("to");
.appendField(Blockly.Msg.variables_to);
},
onchange: function (e) {
let variableID = this.getFieldValue("VAR");

View File

@ -19,10 +19,12 @@ export const UI = {
variable_DECIMAL: "Kommazahl (float)",
variables_TEXT: "Text (string)",
variables_ARRAY: "Array (array)",
variables_CHARACTER: "char (char)",
variables_CHARACTER: "Buchstabe (char)",
variables_BOOLEAN: "Boolean (boolean)",
variables_NULL: "void (void)",
variables_UNDEF: "undefined",
variables_set: "Schreibe",
variables_to: "",
/**
* Tooltips
@ -150,6 +152,7 @@ export const UI = {
button_next: "nächster Schritt",
button_tutorial_overview: "Tutorial Übersicht",
button_login: "Anmelden",
button_createVariable: "Typisierte Variable erstellen",
/**
*

View File

@ -15,14 +15,16 @@ export const UI = {
toolbox_motors: "Motors",
variable_NUMBER: "Number (int)",
variable_SHORT_NUMBER: "char",
variable_LONG: " Zahl (long)",
variable_LONG: "Big number (long)",
variable_DECIMAL: "Decimal (float)",
variables_TEXT: "Text (string)",
variables_ARRAY: "Array (array)",
variables_CHARACTER: "char (char)",
variables_CHARACTER: "Character (char)",
variables_BOOLEAN: "Boolean (boolean)",
variables_NULL: "void (void)",
variables_UNDEF: "undefined",
variables_set: "set",
variables_to: "to",
/**
* Tooltips
@ -145,6 +147,7 @@ export const UI = {
button_next: "Next step",
button_tutorial_overview: "Tutorial overview",
button_login: "Login",
button_createVariable: "Create Typed Variable",
/**
*

View File

@ -16,7 +16,6 @@ class Toolbox extends React.Component {
this.props.workspace,
"callbackName",
[
[`${Blockly.Msg.variable_SHORT_NUMBER}`, "char"],
[`${Blockly.Msg.variable_NUMBER}`, "int"],
[`${Blockly.Msg.variable_LONG}`, "long"],
[`${Blockly.Msg.variable_DECIMAL}`, "float"],
@ -33,7 +32,7 @@ class Toolbox extends React.Component {
// Add your button and give it a callback name.
const button = document.createElement("button");
button.setAttribute("text", "Create Typed Variable");
button.setAttribute("text", Blockly.Msg.button_createVariable);
button.setAttribute("callbackKey", "callbackName");
xmlList.push(button);
@ -41,6 +40,7 @@ class Toolbox extends React.Component {
// This gets all the variables that the user creates and adds them to the
// flyout.
const blockList = Blockly.VariablesDynamic.flyoutCategoryBlocks(workspace);
console.log(blockList);
xmlList = xmlList.concat(blockList);
return xmlList;
}