mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Localize custom block used alert
This commit is contained in:
parent
a35ce79b82
commit
bd4d913056
3 changed files with 3 additions and 4 deletions
|
@ -176,8 +176,7 @@ Blockly.ScratchBlocks.VerticalExtensions.PROCEDURE_DEF_CONTEXTMENU = {
|
|||
var didDelete = Blockly.Procedures.deleteProcedureDefCallback(
|
||||
procCode, rootBlock);
|
||||
if (!didDelete) {
|
||||
// TODO:(#1151)
|
||||
alert('To delete a block definition, first remove all uses of the block');
|
||||
alert(Blockly.Msg.PROCEDURE_USED);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -281,8 +281,7 @@ Blockly.BlockDragger.prototype.endBlockDrag = function(e, currentDragDeltaXY) {
|
|||
var procCode = block.getProcCode();
|
||||
// Check for call blocks with no associated define block.
|
||||
if (!Blockly.Procedures.getDefineBlock(procCode, ws)) {
|
||||
// TODO:(#1151)
|
||||
alert('To delete a block definition, first remove all uses of the block');
|
||||
alert(Blockly.Msg.PROCEDURE_USED);
|
||||
ws.undo();
|
||||
return; // There can only be one define deletion at a time.
|
||||
}
|
||||
|
|
|
@ -331,6 +331,7 @@ Blockly.Msg.DELETE_VARIABLE = 'Delete the "%1" variable';
|
|||
Blockly.Msg.NEW_PROCEDURE = 'Make a Block';
|
||||
Blockly.Msg.PROCEDURE_ALREADY_EXISTS = 'A procedure named "%1" already exists.';
|
||||
Blockly.Msg.PROCEDURE_DEFAULT_NAME = 'block name';
|
||||
Blockly.Msg.PROCEDURE_USED = 'To delete a block definition, first remove all uses of the block';
|
||||
|
||||
// Lists
|
||||
// @todo Remove these once fully managed by Scratch VM / Scratch GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue