mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Modifications to avoid matching %{key} notation.
This commit is contained in:
committed by
GitHub
parent
187c2c85dc
commit
ef14f0f306
@@ -392,8 +392,10 @@ Code.init = function() {
|
||||
}
|
||||
}
|
||||
|
||||
// Construct the toolbox XML.
|
||||
// Construct the toolbox XML, replacing translated variable names.
|
||||
var toolboxText = document.getElementById('toolbox').outerHTML;
|
||||
toolboxText = toolboxText.replace(/(^|[^%]){(\w+)}/g,
|
||||
function(m, p1, p2) {return p1 + MSG[p2];});
|
||||
var toolboxXml = Blockly.Xml.textToDom(toolboxText);
|
||||
|
||||
Code.workspace = Blockly.inject('content_blocks',
|
||||
|
||||
Reference in New Issue
Block a user