Change tooltip on text/list indexOf blocks to be 0/1 index aware. All languages.

Delete ta:TEXT_INDEXOF_TOOLTIP since that text does not appear to make
sense.
This commit is contained in:
Neil Fraser
2016-07-08 18:58:28 -07:00
parent b51547826d
commit b324efaa86
119 changed files with 244 additions and 233 deletions

View File

@@ -300,7 +300,9 @@ Blockly.Blocks['lists_indexOf'] = {
this.appendValueInput('FIND')
.appendField(new Blockly.FieldDropdown(OPERATORS), 'END');
this.setInputsInline(true);
this.setTooltip(Blockly.Msg.LISTS_INDEX_OF_TOOLTIP);
var tooltip = Blockly.Msg.LISTS_INDEX_OF_TOOLTIP
.replace('%1', Blockly.Blocks.ONE_BASED_INDEXING ? '0' : '-1');
this.setTooltip(tooltip);
}
};

View File

@@ -322,7 +322,9 @@ Blockly.Blocks['text_indexOf'] = {
this.appendDummyInput().appendField(Blockly.Msg.TEXT_INDEXOF_TAIL);
}
this.setInputsInline(true);
this.setTooltip(Blockly.Msg.TEXT_INDEXOF_TOOLTIP);
var tooltip = Blockly.Msg.TEXT_INDEXOF_TOOLTIP
.replace('%1', Blockly.Blocks.ONE_BASED_INDEXING ? '0' : '-1');
this.setTooltip(tooltip);
}
};