Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/blocks/mrc_call_python_function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,22 @@ const CALL_PYTHON_FUNCTION = {
}
case FunctionKind.EVENT: {
const eventName = this.getFieldValue(FIELD_EVENT_NAME);
tooltip = Blockly.Msg.CALL_INSTANCE_METHOD_WITHIN_TOOLTIP;
tooltip = Blockly.Msg.FIRE_EVENT_TOOLTIP;
tooltip = tooltip.replace('{{eventName}}', eventName);
break;
}
case FunctionKind.INSTANCE_COMPONENT: {
const className = this.mrcComponentClassName;
const functionName = this.getFieldValue(FIELD_FUNCTION_NAME);
if (this.mrcMechanismId) {
tooltip = Blockly.Msg.CALL_MECHANISM_COMPONENT_INSTANCE_METHOD;
tooltip = Blockly.Msg.CALL_MECHANISM_COMPONENT_INSTANCE_METHOD_TOOLTIP;
tooltip = tooltip
.replace('{{className}}', className)
.replace('{{functionName}}', functionName)
.replace('{{componentName}}', this.getFieldValue(FIELD_COMPONENT_NAME))
.replace('{{mechanismName}}', this.getFieldValue(FIELD_MECHANISM_NAME));
} else {
tooltip = Blockly.Msg.CALL_COMPONENT_INSTANCE_METHOD;
tooltip = Blockly.Msg.CALL_COMPONENT_INSTANCE_METHOD_TOOLTIP;
tooltip = tooltip
.replace('{{className}}', className)
.replace('{{functionName}}', functionName)
Expand All @@ -236,18 +236,18 @@ const CALL_PYTHON_FUNCTION = {
}
case FunctionKind.INSTANCE_ROBOT: {
const functionName = this.getFieldValue(FIELD_FUNCTION_NAME);
tooltip = Blockly.Msg.CALL_INSTANCE_METHOD_WITHIN_TOOLTIP;
tooltip = Blockly.Msg.CALL_ROBOT_INSTANCE_METHOD_TOOLTIP;
tooltip = tooltip.replace('{{functionName}}', functionName);
break;
}
case FunctionKind.INSTANCE_MECHANISM: {
const className = this.mrcMechanismClassName;
const functionName = this.getFieldValue(FIELD_FUNCTION_NAME);
tooltip = Blockly.Msg.CALL_MECHANISM_INSTANCE_METHOD;
tooltip = tooltip
.replace('{{className}}', className)
.replace('{{functionName}}', functionName)
.replace('{{mechanismName}}', this.getFieldValue(FIELD_MECHANISM_NAME));
tooltip = Blockly.Msg.CALL_MECHANISM_INSTANCE_METHOD_TOOLTIP;
tooltip = tooltip
.replace('{{className}}', className)
.replace('{{functionName}}', functionName)
.replace('{{mechanismName}}', this.getFieldValue(FIELD_MECHANISM_NAME));
break;
}
default:
Expand Down Expand Up @@ -436,7 +436,7 @@ const CALL_PYTHON_FUNCTION = {
case FunctionKind.INSTANCE_ROBOT: {
this.appendDummyInput(INPUT_TITLE)
.appendField(Blockly.Msg.CALL)
.appendField(createFieldNonEditableText(Blockly.Msg.ROBOT))
.appendField(createFieldNonEditableText(Blockly.Msg.ROBOT_LOWER_CASE))
.appendField('.')
.appendField(createFieldNonEditableText(''), FIELD_FUNCTION_NAME);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"PRINT": "print",
"NO_MECHANISM_CONTENTS": "No Mechanism Contents",
"CALL": "call",
"ROBOT": "robot",
"ROBOT_LOWER_CASE": "robot",
"CREATE": "create",
"FIRE": "fire",
"GET": "get",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"PRINT": "imprimir",
"NO_MECHANISM_CONTENTS": "Sin Contenido de Mecanismo",
"CALL": "llamar",
"ROBOT": "robot",
"ROBOT_LOWER_CASE": "robot",
"CREATE": "crear",
"FIRE": "disparar",
"GET": "obtener",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/he/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"PRINT": "הדפס",
"NO_MECHANISM_CONTENTS": "אין תוכן במנגנון",
"CALL": "קרא",
"ROBOT": "רובוט",
"ROBOT_LOWER_CASE": "רובוט",
"CREATE": "צור",
"FIRE": "הפעל",
"GET": "קבל",
Expand Down