mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Expand %{..} references in toolbox <button> and <label>
This commit is contained in:
committed by
GitHub
parent
f7e62262cc
commit
100d9f1a1c
@@ -161,7 +161,7 @@ Blockly.FlyoutButton.prototype.createDom = function() {
|
||||
'text-anchor': 'middle'
|
||||
},
|
||||
this.svgGroup_);
|
||||
svgText.textContent = this.text_;
|
||||
svgText.textContent = Blockly.utils.replaceMessageReferences(this.text_);
|
||||
|
||||
this.width = Blockly.Field.getCachedWidth(svgText);
|
||||
this.height = 20; // Can't compute it :(
|
||||
|
||||
@@ -129,7 +129,7 @@ Blockly.Variables.allDeveloperVariables = function(workspace) {
|
||||
Blockly.Variables.flyoutCategory = function(workspace) {
|
||||
var xmlList = [];
|
||||
var button = goog.dom.createDom('button');
|
||||
button.setAttribute('text', Blockly.Msg['NEW_VARIABLE']);
|
||||
button.setAttribute('text', '%{BKY_NEW_VARIABLE}');
|
||||
button.setAttribute('callbackKey', 'CREATE_VARIABLE');
|
||||
|
||||
workspace.registerButtonCallback('CREATE_VARIABLE', function(button) {
|
||||
|
||||
Reference in New Issue
Block a user