We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 187c2c8 commit ef14f0fCopy full SHA for ef14f0f
demos/code/code.js
@@ -392,8 +392,10 @@ Code.init = function() {
392
}
393
394
395
- // Construct the toolbox XML.
+ // Construct the toolbox XML, replacing translated variable names.
396
var toolboxText = document.getElementById('toolbox').outerHTML;
397
+ toolboxText = toolboxText.replace(/(^|[^%]){(\w+)}/g,
398
+ function(m, p1, p2) {return p1 + MSG[p2];});
399
var toolboxXml = Blockly.Xml.textToDom(toolboxText);
400
401
Code.workspace = Blockly.inject('content_blocks',
0 commit comments