mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Merge branch 'develop'
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,7 @@ goog.addDependency("base_module_test.js", [], []);
|
||||
goog.addDependency("base_test.js", ['goog.baseTest', 'ns', 'goog.test.name.space', 'goog.test', 'goog.test.name', 'goog.xy', 'goog.xy.z', 'goog.explicit', 'goog.implicit.explicit', 'an.existing.path', 'dup.base', 'testDep.bar', 'far.out'], ['goog.Promise', 'goog.Timer', 'goog.dom.TagName', 'goog.functions', 'goog.test_module', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit', 'goog.testing.recordFunction', 'goog.userAgent']);
|
||||
goog.addDependency("defineclass_test.js", ['goog.defineClassTest'], ['goog.testing.jsunit']);
|
||||
goog.addDependency("deps.js", [], []);
|
||||
goog.addDependency("test_module.js", [], ['goog.test_module_dep']);
|
||||
goog.addDependency("test_module.js", [], []);
|
||||
goog.addDependency("test_module_dep.js", [], []);
|
||||
goog.addDependency("a11y/aria/announcer.js", ['goog.a11y.aria.Announcer'], ['goog.Disposable', 'goog.Timer', 'goog.a11y.aria', 'goog.a11y.aria.LivePriority', 'goog.a11y.aria.State', 'goog.dom', 'goog.dom.TagName', 'goog.object']);
|
||||
goog.addDependency("a11y/aria/announcer_test.js", ['goog.a11y.aria.AnnouncerTest'], ['goog.a11y.aria', 'goog.a11y.aria.Announcer', 'goog.a11y.aria.LivePriority', 'goog.a11y.aria.State', 'goog.array', 'goog.dom', 'goog.dom.TagName', 'goog.dom.iframe', 'goog.testing.MockClock', 'goog.testing.jsunit']);
|
||||
@@ -696,18 +696,16 @@ goog.addDependency("labs/net/webchannel/webchanneldebug.js", ['goog.labs.net.web
|
||||
goog.addDependency("labs/net/webchannel/wire.js", ['goog.labs.net.webChannel.Wire'], []);
|
||||
goog.addDependency("labs/net/webchannel/wirev8.js", ['goog.labs.net.webChannel.WireV8'], ['goog.asserts', 'goog.json', 'goog.json.NativeJsonProcessor', 'goog.structs']);
|
||||
goog.addDependency("labs/net/webchannel/wirev8_test.js", ['goog.labs.net.webChannel.WireV8Test'], ['goog.labs.net.webChannel.WireV8', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/object/object.js", ['goog.labs.object'], []);
|
||||
goog.addDependency("labs/object/object_test.js", ['goog.labs.objectTest'], ['goog.labs.object', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/promise/promise.js", [], []);
|
||||
goog.addDependency("labs/promise/promise_test.js", [], ['goog.testing.jsunit']);
|
||||
goog.addDependency("labs/pubsub/broadcastpubsub.js", ['goog.labs.pubsub.BroadcastPubSub'], ['goog.Disposable', 'goog.Timer', 'goog.array', 'goog.async.run', 'goog.events.EventHandler', 'goog.events.EventType', 'goog.json', 'goog.log', 'goog.math', 'goog.pubsub.PubSub', 'goog.storage.Storage', 'goog.storage.mechanism.HTML5LocalStorage', 'goog.string', 'goog.userAgent']);
|
||||
goog.addDependency("labs/pubsub/broadcastpubsub_test.js", ['goog.labs.pubsub.BroadcastPubSubTest'], ['goog.array', 'goog.debug.Logger', 'goog.json', 'goog.labs.pubsub.BroadcastPubSub', 'goog.storage.Storage', 'goog.structs.Map', 'goog.testing.MockClock', 'goog.testing.MockControl', 'goog.testing.events', 'goog.testing.events.Event', 'goog.testing.jsunit', 'goog.testing.mockmatchers', 'goog.testing.mockmatchers.ArgumentMatcher', 'goog.testing.recordFunction', 'goog.userAgent']);
|
||||
goog.addDependency("labs/storage/boundedcollectablestorage.js", ['goog.labs.storage.BoundedCollectableStorage'], ['goog.array', 'goog.asserts', 'goog.iter', 'goog.storage.CollectableStorage', 'goog.storage.ErrorCode', 'goog.storage.ExpiringStorage']);
|
||||
goog.addDependency("labs/storage/boundedcollectablestorage_test.js", ['goog.labs.storage.BoundedCollectableStorageTest'], ['goog.labs.storage.BoundedCollectableStorage', 'goog.storage.collectableStorageTester', 'goog.storage.storage_test', 'goog.testing.MockClock', 'goog.testing.jsunit', 'goog.testing.storage.FakeMechanism']);
|
||||
goog.addDependency("labs/structs/map.js", ['goog.labs.structs.Map'], ['goog.array', 'goog.asserts', 'goog.labs.object', 'goog.object']);
|
||||
goog.addDependency("labs/structs/map.js", ['goog.labs.structs.Map'], ['goog.array', 'goog.asserts', 'goog.object']);
|
||||
goog.addDependency("labs/structs/map_perf.js", ['goog.labs.structs.MapPerf'], ['goog.asserts', 'goog.dom', 'goog.dom.TagName', 'goog.labs.structs.Map', 'goog.structs.Map', 'goog.testing.PerformanceTable', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/structs/map_test.js", ['goog.labs.structs.MapTest'], ['goog.labs.structs.Map', 'goog.testing.PropertyReplacer', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/structs/multimap.js", ['goog.labs.structs.Multimap'], ['goog.array', 'goog.labs.object', 'goog.labs.structs.Map']);
|
||||
goog.addDependency("labs/structs/multimap.js", ['goog.labs.structs.Multimap'], ['goog.array', 'goog.labs.structs.Map', 'goog.object']);
|
||||
goog.addDependency("labs/structs/multimap_test.js", ['goog.labs.structs.MultimapTest'], ['goog.labs.structs.Map', 'goog.labs.structs.Multimap', 'goog.testing.jsunit']);
|
||||
goog.addDependency("labs/style/pixeldensitymonitor.js", ['goog.labs.style.PixelDensityMonitor', 'goog.labs.style.PixelDensityMonitor.Density', 'goog.labs.style.PixelDensityMonitor.EventType'], ['goog.events', 'goog.events.EventTarget']);
|
||||
goog.addDependency("labs/style/pixeldensitymonitor_test.js", ['goog.labs.style.PixelDensityMonitorTest'], ['goog.array', 'goog.dom.DomHelper', 'goog.events', 'goog.labs.style.PixelDensityMonitor', 'goog.testing.MockControl', 'goog.testing.jsunit', 'goog.testing.recordFunction']);
|
||||
@@ -1132,7 +1130,7 @@ goog.addDependency("testing/mockclock_test.js", ['goog.testing.MockClockTest'],
|
||||
goog.addDependency("testing/mockcontrol.js", ['goog.testing.MockControl'], ['goog.array', 'goog.testing', 'goog.testing.LooseMock', 'goog.testing.StrictMock']);
|
||||
goog.addDependency("testing/mockcontrol_test.js", ['goog.testing.MockControlTest'], ['goog.testing.Mock', 'goog.testing.MockControl', 'goog.testing.jsunit']);
|
||||
goog.addDependency("testing/mockinterface.js", ['goog.testing.MockInterface'], []);
|
||||
goog.addDependency("testing/mockmatchers.js", ['goog.testing.mockmatchers', 'goog.testing.mockmatchers.ArgumentMatcher', 'goog.testing.mockmatchers.IgnoreArgument', 'goog.testing.mockmatchers.InstanceOf', 'goog.testing.mockmatchers.ObjectEquals', 'goog.testing.mockmatchers.RegexpMatch', 'goog.testing.mockmatchers.SaveArgument', 'goog.testing.mockmatchers.TypeOf'], ['goog.array', 'goog.dom', 'goog.testing.TestCase', 'goog.testing.asserts']);
|
||||
goog.addDependency("testing/mockmatchers.js", ['goog.testing.mockmatchers', 'goog.testing.mockmatchers.ArgumentMatcher', 'goog.testing.mockmatchers.IgnoreArgument', 'goog.testing.mockmatchers.InstanceOf', 'goog.testing.mockmatchers.ObjectEquals', 'goog.testing.mockmatchers.RegexpMatch', 'goog.testing.mockmatchers.SaveArgument', 'goog.testing.mockmatchers.TypeOf'], ['goog.array', 'goog.dom', 'goog.testing.asserts']);
|
||||
goog.addDependency("testing/mockmatchers_test.js", ['goog.testing.mockmatchersTest'], ['goog.dom', 'goog.dom.TagName', 'goog.testing.jsunit', 'goog.testing.mockmatchers', 'goog.testing.mockmatchers.ArgumentMatcher']);
|
||||
goog.addDependency("testing/mockrandom.js", ['goog.testing.MockRandom'], ['goog.Disposable']);
|
||||
goog.addDependency("testing/mockrandom_test.js", ['goog.testing.MockRandomTest'], ['goog.testing.MockRandom', 'goog.testing.jsunit']);
|
||||
@@ -1165,7 +1163,7 @@ goog.addDependency("testing/stacktrace_test.js", ['goog.testing.stacktraceTest']
|
||||
goog.addDependency("testing/strictmock.js", ['goog.testing.StrictMock'], ['goog.array', 'goog.testing.Mock']);
|
||||
goog.addDependency("testing/strictmock_test.js", ['goog.testing.StrictMockTest'], ['goog.testing.StrictMock', 'goog.testing.jsunit']);
|
||||
goog.addDependency("testing/testcase.js", ['goog.testing.TestCase', 'goog.testing.TestCase.Error', 'goog.testing.TestCase.Order', 'goog.testing.TestCase.Result', 'goog.testing.TestCase.Test'], ['goog.Promise', 'goog.Thenable', 'goog.array', 'goog.asserts', 'goog.dom.TagName', 'goog.object', 'goog.testing.JsUnitException', 'goog.testing.asserts', 'goog.testing.stacktrace']);
|
||||
goog.addDependency("testing/testcase_test.js", ['goog.testing.TestCaseTest'], ['goog.Promise', 'goog.functions', 'goog.string', 'goog.testing.ExpectedFailures', 'goog.testing.JsUnitException', 'goog.testing.MethodMock', 'goog.testing.MockRandom', 'goog.testing.PropertyReplacer', 'goog.testing.TestCase', 'goog.testing.jsunit', 'goog.testing.mockmatchers.ObjectEquals']);
|
||||
goog.addDependency("testing/testcase_test.js", ['goog.testing.TestCaseTest'], ['goog.Promise', 'goog.functions', 'goog.string', 'goog.testing.ExpectedFailures', 'goog.testing.JsUnitException', 'goog.testing.MethodMock', 'goog.testing.MockRandom', 'goog.testing.PropertyReplacer', 'goog.testing.TestCase', 'goog.testing.jsunit']);
|
||||
goog.addDependency("testing/testqueue.js", ['goog.testing.TestQueue'], []);
|
||||
goog.addDependency("testing/testrunner.js", ['goog.testing.TestRunner'], ['goog.dom.TagName', 'goog.testing.TestCase']);
|
||||
goog.addDependency("testing/testsuite.js", ['goog.testing.testSuite'], ['goog.labs.testing.Environment', 'goog.testing.TestCase']);
|
||||
|
||||
@@ -543,7 +543,9 @@ Blockly.Connection.prototype.disconnect = function() {
|
||||
} else {
|
||||
throw 'Child block does not have output or previous statement.';
|
||||
}
|
||||
blockShadow.initSvg();
|
||||
if (blockShadow.initSvg) {
|
||||
blockShadow.initSvg();
|
||||
}
|
||||
blockShadow.render(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,15 @@ Blockly.Events.filter = function(queueIn, forward) {
|
||||
event1.newValue = event2.newValue;
|
||||
queue.splice(j, 1);
|
||||
j--;
|
||||
} else if (event1.type == Blockly.Events.UI &&
|
||||
event2.element == 'click' &&
|
||||
(event1.element == 'commentOpen' ||
|
||||
event1.element == 'mutatorOpen' ||
|
||||
event1.element == 'warningOpen')) {
|
||||
// Merge change events.
|
||||
event1.newValue = event2.newValue;
|
||||
queue.splice(j, 1);
|
||||
j--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,6 +426,8 @@ Blockly.Flyout.prototype.show = function(xmlList) {
|
||||
// Create an invisible rectangle under the block to act as a button. Just
|
||||
// using the block as a button is poor, since blocks have holes in them.
|
||||
var rect = Blockly.createSvgElement('rect', {'fill-opacity': 0}, null);
|
||||
rect.tooltip = block;
|
||||
Blockly.Tooltip.bindMouseEvents(rect);
|
||||
// Add the rectangles under the blocks, so that the blocks' tooltips work.
|
||||
this.workspace_.getCanvas().insertBefore(rect, block.getSvgRoot());
|
||||
block.flyoutRect_ = rect;
|
||||
|
||||
@@ -63,6 +63,13 @@ Blockly.Generator.prototype.INFINITE_LOOP_TRAP = null;
|
||||
*/
|
||||
Blockly.Generator.prototype.STATEMENT_PREFIX = null;
|
||||
|
||||
/**
|
||||
* The method of indenting. Defaults to two spaces, but language generators
|
||||
* may override this to increase indent or change to tabs.
|
||||
* @type {string}
|
||||
*/
|
||||
Blockly.Generator.prototype.INDENT = ' ';
|
||||
|
||||
/**
|
||||
* Generate code for all blocks in the workspace to the specified language.
|
||||
* @param {Blockly.Workspace} workspace Workspace to generate code from.
|
||||
@@ -267,13 +274,6 @@ Blockly.Generator.prototype.addLoopTrap = function(branch, id) {
|
||||
return branch;
|
||||
};
|
||||
|
||||
/**
|
||||
* The method of indenting. Defaults to two spaces, but language generators
|
||||
* may override this to increase indent or change to tabs.
|
||||
* @type {string}
|
||||
*/
|
||||
Blockly.Generator.prototype.INDENT = ' ';
|
||||
|
||||
/**
|
||||
* Comma-separated list of reserved words.
|
||||
* @type {string}
|
||||
@@ -312,7 +312,7 @@ Blockly.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_ = '{leCUI8hutHZI4480Dc}';
|
||||
* The code gets output when Blockly.Generator.finish() is called.
|
||||
*
|
||||
* @param {string} desiredName The desired name of the function (e.g., isPrime).
|
||||
* @param {!Array.<string>} code A list of Python statements.
|
||||
* @param {!Array.<string>} code A list of statements. Use ' ' for indents.
|
||||
* @return {string} The actual name of the new function. This may differ
|
||||
* from desiredName if the former has already been taken by the user.
|
||||
* @private
|
||||
@@ -322,8 +322,15 @@ Blockly.Generator.prototype.provideFunction_ = function(desiredName, code) {
|
||||
var functionName =
|
||||
this.variableDB_.getDistinctName(desiredName, this.NAME_TYPE);
|
||||
this.functionNames_[desiredName] = functionName;
|
||||
this.definitions_[desiredName] = code.join('\n').replace(
|
||||
var codeText = code.join('\n').replace(
|
||||
this.FUNCTION_NAME_PLACEHOLDER_REGEXP_, functionName);
|
||||
// Change all ' ' indents into the desired indent.
|
||||
var oldCodeText;
|
||||
while (oldCodeText != codeText) {
|
||||
oldCodeText = codeText;
|
||||
codeText = codeText.replace(/^(( )*) /gm, '$1' + this.INDENT);
|
||||
}
|
||||
this.definitions_[desiredName] = codeText;
|
||||
}
|
||||
return this.functionNames_[desiredName];
|
||||
};
|
||||
|
||||
@@ -82,7 +82,6 @@ Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) {
|
||||
Blockly.WidgetDiv.DIV.style.top = xy.y + 'px';
|
||||
Blockly.WidgetDiv.DIV.style.direction = rtl ? 'rtl' : 'ltr';
|
||||
Blockly.WidgetDiv.DIV.style.display = 'block';
|
||||
Blockly.Events.setGroup(true);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -98,7 +97,6 @@ Blockly.WidgetDiv.hide = function() {
|
||||
Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_();
|
||||
Blockly.WidgetDiv.dispose_ = null;
|
||||
goog.dom.removeChildren(Blockly.WidgetDiv.DIV);
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1000,27 +1000,18 @@ Blockly.WorkspaceSvg.prototype.zoom = function(x, y, type) {
|
||||
} else if (newScale < this.options.zoomOptions.minScale) {
|
||||
scaleChange = this.options.zoomOptions.minScale / this.scale;
|
||||
}
|
||||
var matrix = canvas.getCTM()
|
||||
.translate(x * (1 - scaleChange), y * (1 - scaleChange))
|
||||
.scale(scaleChange);
|
||||
// newScale and matrix.a should be identical (within a rounding error).
|
||||
if (this.scale == matrix.a) {
|
||||
if (this.scale == newScale) {
|
||||
return; // No change in zoom.
|
||||
}
|
||||
this.scale = matrix.a;
|
||||
this.scrollX = matrix.e - metrics.absoluteLeft;
|
||||
this.scrollY = matrix.f - metrics.absoluteTop;
|
||||
this.updateGridPattern_();
|
||||
if (this.scrollbar) {
|
||||
this.scrollbar.resize();
|
||||
} else {
|
||||
this.translate(0, 0);
|
||||
}
|
||||
Blockly.hideChaff(false);
|
||||
if (this.flyout_) {
|
||||
// No toolbox, resize flyout.
|
||||
this.flyout_.reflow();
|
||||
var matrix = canvas.getCTM()
|
||||
.translate(x * (1 - scaleChange), y * (1 - scaleChange))
|
||||
.scale(scaleChange);
|
||||
// newScale and matrix.a should be identical (within a rounding error).
|
||||
this.scrollX = matrix.e - metrics.absoluteLeft;
|
||||
this.scrollY = matrix.f - metrics.absoluteTop;
|
||||
}
|
||||
this.setScale(newScale);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1038,40 +1029,27 @@ Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) {
|
||||
* Zoom the blocks to fit in the workspace if possible.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.zoomToFit = function() {
|
||||
var workspaceBBox = this.svgBackground_.getBBox();
|
||||
var blocksBBox = this.svgBlockCanvas_.getBBox();
|
||||
var workspaceWidth = workspaceBBox.width - this.toolbox_.width -
|
||||
Blockly.Scrollbar.scrollbarThickness;
|
||||
var workspaceHeight = workspaceBBox.height -
|
||||
Blockly.Scrollbar.scrollbarThickness;
|
||||
var blocksWidth = blocksBBox.width;
|
||||
var blocksHeight = blocksBBox.height;
|
||||
if (blocksWidth == 0) {
|
||||
var metrics = this.getMetrics();
|
||||
var blocksBox = this.getBlocksBoundingBox();
|
||||
var blocksWidth = blocksBox.width;
|
||||
var blocksHeight = blocksBox.height;
|
||||
if (!blocksWidth) {
|
||||
return; // Prevents zooming to infinity.
|
||||
}
|
||||
var workspaceWidth = metrics.viewWidth;
|
||||
var workspaceHeight = metrics.viewHeight;
|
||||
if (this.flyout_) {
|
||||
workspaceWidth -= this.flyout_.width_;
|
||||
}
|
||||
if (!this.scrollbar) {
|
||||
// Orgin point of 0,0 is fixed, blocks will not scroll to center.
|
||||
blocksWidth += metrics.contentLeft;
|
||||
blocksHeight += metrics.contentTop;
|
||||
}
|
||||
var ratioX = workspaceWidth / blocksWidth;
|
||||
var ratioY = workspaceHeight / blocksHeight;
|
||||
var ratio = Math.min(ratioX, ratioY);
|
||||
var speed = this.options.zoomOptions.scaleSpeed;
|
||||
var numZooms = Math.floor(Math.log(ratio) / Math.log(speed));
|
||||
var newScale = Math.pow(speed, numZooms);
|
||||
if (newScale > this.options.zoomOptions.maxScale) {
|
||||
newScale = this.options.zoomOptions.maxScale;
|
||||
} else if (newScale < this.options.zoomOptions.minScale) {
|
||||
newScale = this.options.zoomOptions.minScale;
|
||||
}
|
||||
this.scale = newScale;
|
||||
this.updateGridPattern_();
|
||||
this.scrollbar.resize();
|
||||
Blockly.hideChaff(false);
|
||||
if (this.flyout_) {
|
||||
// No toolbox, resize flyout.
|
||||
this.flyout_.reflow();
|
||||
}
|
||||
// Center the workspace.
|
||||
var metrics = this.getMetrics();
|
||||
this.scrollbar.set((metrics.contentWidth - metrics.viewWidth) / 2,
|
||||
(metrics.contentHeight - metrics.viewHeight) / 2);
|
||||
this.setScale(Math.min(ratioX, ratioY));
|
||||
this.scrollCenter_();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1079,27 +1057,57 @@ Blockly.WorkspaceSvg.prototype.zoomToFit = function() {
|
||||
* @param {!Event} e Mouse down event.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.zoomReset = function(e) {
|
||||
this.scale = 1;
|
||||
this.setScale(1);
|
||||
this.scrollCenter_();
|
||||
// This event has been handled. Don't start a workspace drag.
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Center the workspace.
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.scrollCenter_ = function() {
|
||||
if (!this.scrollbar) {
|
||||
// Can't center a non-scrolling workspace.
|
||||
return;
|
||||
}
|
||||
var metrics = this.getMetrics();
|
||||
var x = (metrics.contentWidth - metrics.viewWidth) / 2;
|
||||
if (this.flyout_) {
|
||||
x -= this.flyout_.width_ / 2;
|
||||
}
|
||||
var y = (metrics.contentHeight - metrics.viewHeight) / 2;
|
||||
this.scrollbar.set(x, y);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the workspace's zoom factor.
|
||||
* @param {number} newScale Zoom factor.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.setScale = function(newScale) {
|
||||
if (this.options.zoomOptions.maxScale &&
|
||||
newScale > this.options.zoomOptions.maxScale) {
|
||||
newScale = this.options.zoomOptions.maxScale;
|
||||
} else if (this.options.zoomOptions.minScale &&
|
||||
newScale < this.options.zoomOptions.minScale) {
|
||||
newScale = this.options.zoomOptions.minScale;
|
||||
}
|
||||
this.scale = newScale;
|
||||
this.updateGridPattern_();
|
||||
if (this.scrollbar) {
|
||||
this.scrollbar.resize();
|
||||
} else {
|
||||
this.translate(this.scrollX, this.scrollY);
|
||||
}
|
||||
Blockly.hideChaff(false);
|
||||
if (this.flyout_) {
|
||||
// No toolbox, resize flyout.
|
||||
this.flyout_.reflow();
|
||||
}
|
||||
// Zoom level has changed, update the scrollbars.
|
||||
if (this.scrollbar) {
|
||||
this.scrollbar.resize();
|
||||
}
|
||||
// Center the workspace.
|
||||
var metrics = this.getMetrics();
|
||||
if (this.scrollbar) {
|
||||
this.scrollbar.set((metrics.contentWidth - metrics.viewWidth) / 2,
|
||||
(metrics.contentHeight - metrics.viewHeight) / 2);
|
||||
} else {
|
||||
this.translate(0, 0);
|
||||
}
|
||||
// This event has been handled. Don't start a workspace drag.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,10 +166,12 @@ Blockly.ZoomControls.prototype.createDom = function() {
|
||||
Blockly.bindEvent_(zoominSvg, 'mousedown', null, function(e) {
|
||||
workspace.zoomCenter(1);
|
||||
e.stopPropagation(); // Don't start a workspace scroll.
|
||||
e.preventDefault();
|
||||
});
|
||||
Blockly.bindEvent_(zoomoutSvg, 'mousedown', null, function(e) {
|
||||
workspace.zoomCenter(-1);
|
||||
e.stopPropagation(); // Don't start a workspace scroll.
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
return this.svgGroup_;
|
||||
|
||||
@@ -160,8 +160,8 @@
|
||||
<option value="JavaScript">JavaScript</option>
|
||||
<option value="Python">Python</option>
|
||||
<option value="PHP">PHP</option>
|
||||
<option value="Dart">Dart</option>
|
||||
<option value="Lua">Lua</option>
|
||||
<option value="Dart">Dart</option>
|
||||
</select>
|
||||
</h3>
|
||||
</td>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<script src="../../javascript_compressed.js"></script>
|
||||
<script src="../../python_compressed.js"></script>
|
||||
<script src="../../php_compressed.js"></script>
|
||||
<script src="../../dart_compressed.js"></script>
|
||||
<script src="../../lua_compressed.js"></script>
|
||||
<script src="../../dart_compressed.js"></script>
|
||||
<script src="code.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -40,10 +40,10 @@
|
||||
<td class="tabmin"> </td>
|
||||
<td id="tab_php" class="taboff">PHP</td>
|
||||
<td class="tabmin"> </td>
|
||||
<td id="tab_dart" class="taboff">Dart</td>
|
||||
<td class="tabmin"> </td>
|
||||
<td id="tab_lua" class="taboff">Lua</td>
|
||||
<td class="tabmin"> </td>
|
||||
<td id="tab_dart" class="taboff">Dart</td>
|
||||
<td class="tabmin"> </td>
|
||||
<td id="tab_xml" class="taboff">XML</td>
|
||||
<td class="tabmax">
|
||||
<button id="trashButton" class="notext" title="...">
|
||||
@@ -67,10 +67,10 @@
|
||||
</table>
|
||||
<div id="content_blocks" class="content"></div>
|
||||
<pre id="content_javascript" class="content"></pre>
|
||||
<pre id="content_php" class="content"></pre>
|
||||
<pre id="content_python" class="content"></pre>
|
||||
<pre id="content_dart" class="content"></pre>
|
||||
<pre id="content_php" class="content"></pre>
|
||||
<pre id="content_lua" class="content"></pre>
|
||||
<pre id="content_dart" class="content"></pre>
|
||||
<textarea id="content_xml" class="content" wrap="off"></textarea>
|
||||
|
||||
<xml id="toolbox" style="display: none">
|
||||
|
||||
@@ -3,7 +3,7 @@ var MSG = {
|
||||
blocks: "Blok",
|
||||
linkTooltip: "Simpan dan pautkan kepada blok.",
|
||||
runTooltip: "Jalankan aturcara yang ditetapkan oleh blok-blok di dalam ruang kerja.",
|
||||
badCode: "Ralat atur cara:\n%1",
|
||||
badCode: "Ralat aturcara:\n%1",
|
||||
timeout: "Takat maksimum lelaran pelaksanaan dicecah.",
|
||||
trashTooltip: "Buang semua Blok.",
|
||||
catLogic: "Logik",
|
||||
@@ -20,5 +20,5 @@ var MSG = {
|
||||
linkAlert: "Kongsikan blok-blok anda dengan pautan ini:\n\n%1",
|
||||
hashError: "Maaf, '%1' tidak berpadanan dengan sebarang aturcara yang disimpan.",
|
||||
xmlError: "Fail simpanan anda tidak dapat dimuatkan. Jangan-jangan ia dicipta dengan versi Blockly yang berlainan?",
|
||||
badXml: "Ralat ketika menghuraian XML:\n%1\n\nPilih 'OK' untuk melucutkan suntingan anda atau 'Batal' untuk bersambung menyunting XML-nya."
|
||||
badXml: "Ralat ketika menghuraikan XML:\n%1\n\nPilih 'OK' untuk melucutkan suntingan anda atau 'Batal' untuk bersambung menyunting XML-nya."
|
||||
};
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div><a href="code/index.html">Code Editor</a></div>
|
||||
<div>Export a Blockly program into JavaScript, Python, PHP, Dart, Lua or XML.</div>
|
||||
<div>Export a Blockly program into JavaScript, Python, PHP, Lua, Dart, or XML.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ if (typeof planepage == 'undefined') { var planepage = {}; }
|
||||
|
||||
|
||||
planepage.messages = function(opt_data, opt_ignored, opt_ijData) {
|
||||
return '<div style="display: none"><span id="Plane_rows">Baris: %1</span><span id="Plane_getRows">baris (%1)</span><span id="Plane_rows1">Baris kelas pertama: %1</span><span id="Plane_getRows1">baris kelas pertama (%1)</span><span id="Plane_rows2">Baris kelas ke-2: %1</span><span id="Plane_getRows2">baris kelas ke-2 (%1)</span><span id="Plane_seats">Tempat duduk: %1</span><span id="Plane_placeholder">?</span><span id="Plane_setSeats">tempat duduk =</span></div>';
|
||||
return '<div style="display: none"><span id="Plane_rows">Baris: %1</span><span id="Plane_getRows">baris (%1)</span><span id="Plane_rows1">Baris kelas pertama: %1</span><span id="Plane_getRows1">baris kelas pertama (%1)</span><span id="Plane_rows2">Baris kelas kedua: %1</span><span id="Plane_getRows2">baris kelas kedua (%1)</span><span id="Plane_seats">Tempat duduk: %1</span><span id="Plane_placeholder">?</span><span id="Plane_setSeats">tempat duduk =</span></div>';
|
||||
};
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ planepage.start = function(opt_data, opt_ignored, opt_ijData) {
|
||||
output += 'Sebuah kapal terbang mempunyai sebilangan baris tempat duduk penumpang. Setiap baris mengandungi empat tempat duduk.';
|
||||
break;
|
||||
case 2:
|
||||
output += 'Sebuah kapal terbnag mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang. Setiap baris mengandungi empat tempat duduk.';
|
||||
output += 'Sebuah kapal terbang mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang. Setiap baris mengandungi empat tempat duduk.';
|
||||
break;
|
||||
case 3:
|
||||
output += 'Sebuah kapal terbnag mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang kelas pertama dan kelas kedua. Setiap baris kelas pertama mengandungi empat tempat duduk. Setiap baris kelas pertama mengandungi lima tempat duduk.';
|
||||
output += 'Sebuah kapal terbang mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang kelas pertama dan kelas kedua. Setiap baris kelas pertama mengandungi empat tempat duduk. Setiap baris kelas pertama mengandungi lima tempat duduk.';
|
||||
break;
|
||||
}
|
||||
output += '</p><p>Wujudkan formula (di bawah) yang mengira jumlah tempat duduk di dalam kapal terbang sedangkan baris-barisnya diubah (di atas).</p><script src="../../blockly_compressed.js"><\/script><script src="../../blocks_compressed.js"><\/script><script src="../../javascript_compressed.js"><\/script><script src="../../msg/js/' + soy.$$escapeHtml(opt_ijData.lang) + '.js"><\/script><script src="blocks.js"><\/script>' + planepage.toolbox(null, null, opt_ijData) + '<div id="blockly"></div>';
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="1327005465775917626" datatype="html">
|
||||
<source>An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of 1st class and 2nd class passenger seats. Each 1st class row contains four seats. Each 2nd class row contains five seats.</source>
|
||||
<target>Sebuah kapal terbnag mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang kelas pertama dan kelas kedua. Setiap baris kelas pertama mengandungi empat tempat duduk. Setiap baris kelas pertama mengandungi lima tempat duduk.</target>
|
||||
<target>Sebuah kapal terbang mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang kelas pertama dan kelas kedua. Setiap baris kelas pertama mengandungi empat tempat duduk. Setiap baris kelas pertama mengandungi lima tempat duduk.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="1649099567159388799" datatype="html">
|
||||
<source>?</source>
|
||||
@@ -24,7 +24,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="4755413400587385256" datatype="html">
|
||||
<source>An airplane has two seats in the flight deck (for the pilot and co-pilot), and a number of rows of passenger seats. Each row contains four seats.</source>
|
||||
<target>Sebuah kapal terbnag mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang. Setiap baris mengandungi empat tempat duduk.</target>
|
||||
<target>Sebuah kapal terbang mempunyai tempat duduk di kokpit (untuk juruterbang dan pembantunya) dan sebilangan baris tempat duduk penumpang. Setiap baris mengandungi empat tempat duduk.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="5622822520334788359" datatype="html">
|
||||
<source>1st class rows (%1)</source>
|
||||
@@ -32,7 +32,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="6523489254328705062" datatype="html">
|
||||
<source>2nd class rows: %1</source>
|
||||
<target>Baris kelas ke-2: %1</target>
|
||||
<target>Baris kelas kedua: %1</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="6636919311618748816" datatype="html">
|
||||
<source>Seats: %1</source>
|
||||
@@ -56,7 +56,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="8347578891541780742" datatype="html">
|
||||
<source>2nd class rows (%1)</source>
|
||||
<target>baris kelas ke-2 (%1)</target>
|
||||
<target>baris kelas kedua (%1)</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
|
||||
@@ -79,16 +79,15 @@ Blockly.Python.ORDER_CONDITIONAL = 15; // if else
|
||||
Blockly.Python.ORDER_LAMBDA = 16; // lambda
|
||||
Blockly.Python.ORDER_NONE = 99; // (...)
|
||||
|
||||
/**
|
||||
* Empty loops or conditionals are not allowed in Python.
|
||||
*/
|
||||
Blockly.Python.PASS = ' pass\n';
|
||||
|
||||
/**
|
||||
* Initialise the database of variable names.
|
||||
* @param {!Blockly.Workspace} workspace Workspace to generate code from.
|
||||
*/
|
||||
Blockly.Python.init = function(workspace) {
|
||||
/**
|
||||
* Empty loops or conditionals are not allowed in Python.
|
||||
*/
|
||||
Blockly.Python.PASS = this.INDENT + 'pass\n';
|
||||
// Create a dictionary of definitions to be printed before the code.
|
||||
Blockly.Python.definitions_ = Object.create(null);
|
||||
// Create a dictionary mapping desired function names in definitions_
|
||||
|
||||
@@ -289,7 +289,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "نام ورودی:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "اضافه کردن ورودی به تابع.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ورودیها";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "افزودن، حذف یا دوباره مرتبکردن ورودی این تابع.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "واگردانی";
|
||||
Blockly.Msg.REMOVE_COMMENT = "حذف نظر";
|
||||
Blockly.Msg.RENAME_VARIABLE = "تغییر نام متغیر...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "تغییر نام همهٔ متغیرهای «%1» به:";
|
||||
@@ -355,7 +355,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "تراشیدن فاصلهها از ط
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "تراشیدن فاصلهها از طرف چپ";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "کپی از متن با فاصلههای حذفشده از یک یا هر دو پایان باز میگرداند.";
|
||||
Blockly.Msg.TODAY = "امروز";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "واگردانی";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "مورد";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "درستکردن «تنظیم %1»";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
@@ -289,7 +289,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "változó:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Bemenet hozzáadása a függvényhez.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "paraméterek";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bemenetek hozzáadása, eltávolítása vagy átrendezése ehhez a függvényhez.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "Újra";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Megjegyzés törlése";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Változó átnevezése...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Minden \"%1\" változó átnevezése erre:";
|
||||
@@ -355,7 +355,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "szóközök levágása az elejéről";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "szóközök levágása a végéről";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Levágja a megadott szöveg végeiről a szóközöket.";
|
||||
Blockly.Msg.TODAY = "Ma";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "Visszavonás";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "változó";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Készíts \"%1=\"";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
|
||||
@@ -289,7 +289,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "heiti inntaks:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Bæta inntaki við fallið.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inntök";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bæta við, fjarlægja eða umraða inntökum fyrir þetta fall.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "Endurtaka";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Fjarlægja skýringu";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Endurnefna breytu...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "Endurnefna allar '%1' breyturnar:";
|
||||
@@ -355,7 +355,7 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "eyða bilum vinstra megin við";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "eyða bilum hægra megin við";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Skila afriti af textanum þar sem möguleg bil við báða enda hafa verið fjarlægð.";
|
||||
Blockly.Msg.TODAY = "Í dag";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "Afturkalla";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "atriði";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Búa til 'stilla %1'";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get";
|
||||
|
||||
48
msg/js/lb.js
48
msg/js/lb.js
@@ -11,7 +11,7 @@ Blockly.Msg.AUTH = "Please authorize this app to enable your work to be saved an
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Wäert änneren:";
|
||||
Blockly.Msg.CHAT = "Mat ärem Mataarbechter chatten an deem Dir an dës Këscht tippt!";
|
||||
Blockly.Msg.CLEAN_UP = "Bléck opraumen";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Bléck zesummeklappen";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "Block zesummeklappen";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "Faarf 1";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "Faarf 2";
|
||||
@@ -20,7 +20,7 @@ Blockly.Msg.COLOUR_BLEND_RATIO = "ratio";
|
||||
Blockly.Msg.COLOUR_BLEND_TITLE = "mëschen";
|
||||
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blends two colours together with a given ratio (0.0 - 1.0)."; // untranslated
|
||||
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color"; // untranslated
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Wielt eng Faarf vun der Palette.";
|
||||
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Sicht eng Faarf an der Palette eraus.";
|
||||
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
|
||||
Blockly.Msg.COLOUR_RANDOM_TITLE = "zoufälleg Faarf";
|
||||
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Eng zoufälleg Faarf eraussichen.";
|
||||
@@ -40,7 +40,7 @@ Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/L
|
||||
Blockly.Msg.CONTROLS_FOREACH_TITLE = "fir all Element %1 an der Lëscht %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; // untranslated
|
||||
Blockly.Msg.CONTROLS_FOR_TITLE = "zielt mat %1 vun %2 bis %3 mat %4";
|
||||
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated
|
||||
@@ -54,19 +54,19 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "maachen";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 mol widderhuelen";
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "maach";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1-mol widderhuelen";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "widderhuele bis";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeat while"; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Widderhuel soulaang";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Féiert d'Uweisungen aus, soulaang wéi de Wäert falsch ass.";
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Féiert d'Uweisungen aus, soulaang wéi de Wäert richteg ass";
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "Delete all %1 blocks?"; // untranslated
|
||||
Blockly.Msg.DELETE_BLOCK = "Block läschen";
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "%1 Bléck läschen";
|
||||
Blockly.Msg.DISABLE_BLOCK = "Block desaktivéieren";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Duplizéieren";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "Eng Kopie maachen";
|
||||
Blockly.Msg.ENABLE_BLOCK = "Block aktivéieren";
|
||||
Blockly.Msg.EXPAND_ALL = "Bléck opklappen";
|
||||
Blockly.Msg.EXPAND_BLOCK = "Block opklappen";
|
||||
@@ -83,7 +83,7 @@ Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "En Element op d'Lëscht derbäisetzen.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "éischt";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# vum Schluss";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# vun hannen";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "get"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated
|
||||
@@ -136,13 +136,13 @@ Blockly.Msg.LISTS_SET_INDEX_SET = "set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Inserts the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Inserts the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Setzt d'Element um Ënn vun enger Lëscht derbäi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Setzt d'Element um Enn vun enger Lëscht derbäi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Setzt d'Element op eng zoufälleg Plaz an d'Lëscht derbäi.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt en zuofällegt Element an eng Lëscht.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt en zoufällegt Element an eng Lëscht.";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
@@ -171,14 +171,14 @@ Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Lo
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "oder";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "test";
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "Test";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wa falsch";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wa wouer";
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
|
||||
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Gëtt d'Zomme vun zwou Zuelen.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Den Total vun den zwou Zuelen zréckginn.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "D'Produkt vun den zwou Zuelen zréckginn.";
|
||||
@@ -195,7 +195,7 @@ Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated
|
||||
Blockly.Msg.MATH_IS_EVEN = "ass gerued";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "ass negativ";
|
||||
Blockly.Msg.MATH_IS_ODD = "ass net gerued";
|
||||
Blockly.Msg.MATH_IS_ODD = "ass ongerued";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "ass positiv";
|
||||
Blockly.Msg.MATH_IS_PRIME = "ass eng Primzuel";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
|
||||
@@ -207,7 +207,7 @@ Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "Eng Zuel.";
|
||||
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Duerchschnëtt vun der Lëscht";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Moyenne vun der Lëscht";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Maximum aus der Lëscht";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "min of list"; // untranslated
|
||||
@@ -232,10 +232,10 @@ Blockly.Msg.MATH_RANDOM_INT_TITLE = "zoufälleg ganz Zuel tëscht %1 a(n) %2";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "opronnen";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ofronnen";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "opronnen";
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Eng Zuel op- oder ofronnen.";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ofrënnen";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "oprënnen";
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Eng Zuel op- oder ofrënnen.";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://lb.wikipedia.org/wiki/Racine carrée";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ROOT = "Quadratwuerzel";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated
|
||||
@@ -290,7 +290,7 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; //
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
|
||||
Blockly.Msg.REDO = "Widderhuelen";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Bemierkunge ewechhuelen";
|
||||
Blockly.Msg.REMOVE_COMMENT = "Bemierkung ewechhuelen";
|
||||
Blockly.Msg.RENAME_VARIABLE = "Variabel ëmbenennen...";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "All '%1' Variabelen ëmbenennen op:";
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Text drunhänken";
|
||||
@@ -315,8 +315,8 @@ Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "En Element bei den Text derbäisetz
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis de Buschtaf #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "op de leschte Buschtaw";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis bei de Buschtaf #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "bis bei de leschte Buschtaw";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "am Text";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated
|
||||
@@ -344,7 +344,7 @@ Blockly.Msg.TEXT_PRINT_TITLE = "%1 drécken";
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Freet de Benotzer en Text.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Frot de Benotzer no engem Text.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
|
||||
@@ -65,7 +65,7 @@ Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "只要值为真,执行一些
|
||||
Blockly.Msg.DELETE_ALL_BLOCKS = "删除所有%1块吗?";
|
||||
Blockly.Msg.DELETE_BLOCK = "删除块";
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "删除 %1 块";
|
||||
Blockly.Msg.DISABLE_BLOCK = "禁用块";
|
||||
Blockly.Msg.DISABLE_BLOCK = "停用块";
|
||||
Blockly.Msg.DUPLICATE_BLOCK = "复制";
|
||||
Blockly.Msg.ENABLE_BLOCK = "启用块";
|
||||
Blockly.Msg.EXPAND_ALL = "展开块";
|
||||
@@ -149,9 +149,9 @@ Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "从列表拆出文本";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "加入文本列表至一个文本,由分隔符分隔。";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "拆分文本到文本列表,按每个分隔符拆分。";
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "用分隔符";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "错";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "假";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "同时返回真或假。";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "返回真或假。";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "真";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://zh.wikipedia.org/wiki/不等";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "如果两个输入结果相等,则返回真。";
|
||||
@@ -161,7 +161,7 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "如果第一个输入结果比第二个
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "如果第一个输入结果小于或等于第二个输入结果,则返回真。";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "如果两个输入结果不相等,则返回真。";
|
||||
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://zh.wikipedia.org/wiki/逻辑非";
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "并非%1";
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "非%1";
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "如果输入结果为假,则返回真;如果输入结果为真,则返回假。";
|
||||
Blockly.Msg.LOGIC_NULL = "空";
|
||||
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
|
||||
@@ -196,7 +196,7 @@ Blockly.Msg.MATH_IS_DIVISIBLE_BY = "可被整除";
|
||||
Blockly.Msg.MATH_IS_EVEN = "是偶数";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "为负";
|
||||
Blockly.Msg.MATH_IS_ODD = "是奇数";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "是正值";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "为正";
|
||||
Blockly.Msg.MATH_IS_PRIME = "是质数";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "如果数字是偶数、奇数、非负整数、正数、负数或如果它可被某数字整除,则返回真或假。";
|
||||
Blockly.Msg.MATH_IS_WHOLE = "为整数";
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
"LOGIC_NEGATE_TITLE": "block text - This is a unary operator that returns ''false'' when the input is ''true'', and ''true'' when the input is ''false''. \n\nParameters:\n* %1 - the input (which should be either the value 'true' or 'false')",
|
||||
"LOGIC_NEGATE_TOOLTIP": "tooltip - See [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation].",
|
||||
"LOGIC_BOOLEAN_HELPURL": "url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language.",
|
||||
"LOGIC_BOOLEAN_TRUE": "block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.",
|
||||
"LOGIC_BOOLEAN_TRUE": "block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.\n{{Identical|True}}",
|
||||
"LOGIC_BOOLEAN_FALSE": "block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.\n{{Identical|False}}",
|
||||
"LOGIC_BOOLEAN_TOOLTIP": "tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values].",
|
||||
"LOGIC_NULL_HELPURL": "url - Provide a link to the translation of [https://en.wikipedia.org/wiki/Nullable_type https://en.wikipedia.org/wiki/Nullable_type], if it exists in your language; otherwise, do not worry about translating this advanced concept.",
|
||||
|
||||
@@ -271,9 +271,9 @@ Blockly.Msg.LOGIC_NEGATE_TOOLTIP = 'Returns true if the input is false. Returns
|
||||
|
||||
/// url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language.
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = 'https://github.com/google/blockly/wiki/Logic#values';
|
||||
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.
|
||||
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.\n{{Identical|True}}
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = 'true';
|
||||
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.
|
||||
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.\n{{Identical|False}}
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = 'false';
|
||||
/// tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values].
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = 'Returns either true or false.';
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
// Copyright 2012 Google Inc. Apache License 2.0
|
||||
Blockly.Python=new Blockly.Generator("Python");Blockly.Python.addReservedWords("and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,not,or,pass,print,raise,return,try,while,with,yield,True,False,None,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern");
|
||||
Blockly.Python.ORDER_ATOMIC=0;Blockly.Python.ORDER_COLLECTION=1;Blockly.Python.ORDER_STRING_CONVERSION=1;Blockly.Python.ORDER_MEMBER=2;Blockly.Python.ORDER_FUNCTION_CALL=2;Blockly.Python.ORDER_EXPONENTIATION=3;Blockly.Python.ORDER_UNARY_SIGN=4;Blockly.Python.ORDER_BITWISE_NOT=4;Blockly.Python.ORDER_MULTIPLICATIVE=5;Blockly.Python.ORDER_ADDITIVE=6;Blockly.Python.ORDER_BITWISE_SHIFT=7;Blockly.Python.ORDER_BITWISE_AND=8;Blockly.Python.ORDER_BITWISE_XOR=9;Blockly.Python.ORDER_BITWISE_OR=10;
|
||||
Blockly.Python.ORDER_RELATIONAL=11;Blockly.Python.ORDER_LOGICAL_NOT=12;Blockly.Python.ORDER_LOGICAL_AND=13;Blockly.Python.ORDER_LOGICAL_OR=14;Blockly.Python.ORDER_CONDITIONAL=15;Blockly.Python.ORDER_LAMBDA=16;Blockly.Python.ORDER_NONE=99;Blockly.Python.PASS=" pass\n";
|
||||
Blockly.Python.init=function(a){Blockly.Python.definitions_=Object.create(null);Blockly.Python.functionNames_=Object.create(null);Blockly.Python.variableDB_?Blockly.Python.variableDB_.reset():Blockly.Python.variableDB_=new Blockly.Names(Blockly.Python.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;c<a.length;c++)b[c]=Blockly.Python.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE)+" = None";Blockly.Python.definitions_.variables=b.join("\n")};
|
||||
Blockly.Python.finish=function(a){var b=[],c=[],d;for(d in Blockly.Python.definitions_){var e=Blockly.Python.definitions_[d];e.match(/^(from\s+\S+\s+)?import\s+\S+/)?b.push(e):c.push(e)}delete Blockly.Python.definitions_;delete Blockly.Python.functionNames_;Blockly.Python.variableDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a};Blockly.Python.scrubNakedValue=function(a){return a+"\n"};
|
||||
Blockly.Python.ORDER_RELATIONAL=11;Blockly.Python.ORDER_LOGICAL_NOT=12;Blockly.Python.ORDER_LOGICAL_AND=13;Blockly.Python.ORDER_LOGICAL_OR=14;Blockly.Python.ORDER_CONDITIONAL=15;Blockly.Python.ORDER_LAMBDA=16;Blockly.Python.ORDER_NONE=99;
|
||||
Blockly.Python.init=function(a){Blockly.Python.PASS=this.INDENT+"pass\n";Blockly.Python.definitions_=Object.create(null);Blockly.Python.functionNames_=Object.create(null);Blockly.Python.variableDB_?Blockly.Python.variableDB_.reset():Blockly.Python.variableDB_=new Blockly.Names(Blockly.Python.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;c<a.length;c++)b[c]=Blockly.Python.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE)+" = None";Blockly.Python.definitions_.variables=
|
||||
b.join("\n")};Blockly.Python.finish=function(a){var b=[],c=[],d;for(d in Blockly.Python.definitions_){var e=Blockly.Python.definitions_[d];e.match(/^(from\s+\S+\s+)?import\s+\S+/)?b.push(e):c.push(e)}delete Blockly.Python.definitions_;delete Blockly.Python.functionNames_;Blockly.Python.variableDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a};Blockly.Python.scrubNakedValue=function(a){return a+"\n"};
|
||||
Blockly.Python.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\%/g,"\\%").replace(/'/g,"\\'");return"'"+a+"'"};
|
||||
Blockly.Python.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();d&&(c+=Blockly.Python.prefixLines(d,"# ")+"\n");for(var e=0;e<a.inputList.length;e++)a.inputList[e].type==Blockly.INPUT_VALUE&&(d=a.inputList[e].connection.targetBlock())&&(d=Blockly.Python.allNestedComments(d))&&(c+=Blockly.Python.prefixLines(d,"# "))}e=a.nextConnection&&a.nextConnection.targetBlock();e=Blockly.Python.blockToCode(e);return c+b+e};Blockly.Python.colour={};Blockly.Python.colour_picker=function(a){return["'"+a.getFieldValue("COLOUR")+"'",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.colour_random=function(a){Blockly.Python.definitions_.import_random="import random";return["'#%06x' % random.randint(0, 2**24 - 1)",Blockly.Python.ORDER_FUNCTION_CALL]};
|
||||
Blockly.Python.colour_rgb=function(a){var b=Blockly.Python.provideFunction_("colour_rgb",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b):"," r = round(min(100, max(0, r)) * 2.55)"," g = round(min(100, max(0, g)) * 2.55)"," b = round(min(100, max(0, b)) * 2.55)"," return '#%02x%02x%02x' % (r, g, b)"]),c=Blockly.Python.valueToCode(a,"RED",Blockly.Python.ORDER_NONE)||0,d=Blockly.Python.valueToCode(a,"GREEN",Blockly.Python.ORDER_NONE)||0;a=Blockly.Python.valueToCode(a,"BLUE",Blockly.Python.ORDER_NONE)||
|
||||
|
||||
@@ -38,17 +38,6 @@
|
||||
<script src="../../generators/php/variables.js"></script>
|
||||
<script src="../../generators/php/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/dart.js"></script>
|
||||
<script src="unittest_dart.js"></script>
|
||||
<script src="../../generators/dart/logic.js"></script>
|
||||
<script src="../../generators/dart/loops.js"></script>
|
||||
<script src="../../generators/dart/math.js"></script>
|
||||
<script src="../../generators/dart/text.js"></script>
|
||||
<script src="../../generators/dart/lists.js"></script>
|
||||
<script src="../../generators/dart/colour.js"></script>
|
||||
<script src="../../generators/dart/variables.js"></script>
|
||||
<script src="../../generators/dart/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/lua.js"></script>
|
||||
<script src="unittest_lua.js"></script>
|
||||
<script src="../../generators/lua/logic.js"></script>
|
||||
@@ -60,6 +49,16 @@
|
||||
<script src="../../generators/lua/variables.js"></script>
|
||||
<script src="../../generators/lua/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/dart.js"></script>
|
||||
<script src="unittest_dart.js"></script>
|
||||
<script src="../../generators/dart/logic.js"></script>
|
||||
<script src="../../generators/dart/loops.js"></script>
|
||||
<script src="../../generators/dart/math.js"></script>
|
||||
<script src="../../generators/dart/text.js"></script>
|
||||
<script src="../../generators/dart/lists.js"></script>
|
||||
<script src="../../generators/dart/colour.js"></script>
|
||||
<script src="../../generators/dart/variables.js"></script>
|
||||
<script src="../../generators/dart/procedures.js"></script>
|
||||
|
||||
<script src="unittest.js"></script>
|
||||
<script src="../../msg/messages.js"></script>
|
||||
@@ -78,7 +77,8 @@ var workspace = null;
|
||||
|
||||
function start() {
|
||||
workspace = Blockly.inject('blocklyDiv',
|
||||
{media: '../../media/', toolbox: document.getElementById('toolbox')});
|
||||
{media: '../../media/',
|
||||
toolbox: document.getElementById('toolbox')});
|
||||
}
|
||||
|
||||
function loadXml() {
|
||||
@@ -161,13 +161,13 @@ function toPhp() {
|
||||
setOutput(code);
|
||||
}
|
||||
|
||||
function toDart() {
|
||||
var code = Blockly.Dart.workspaceToCode(workspace);
|
||||
function toLua() {
|
||||
var code = Blockly.Lua.workspaceToCode(workspace);
|
||||
setOutput(code);
|
||||
}
|
||||
|
||||
function toLua() {
|
||||
var code = Blockly.Lua.workspaceToCode(workspace);
|
||||
function toDart() {
|
||||
var code = Blockly.Dart.workspaceToCode(workspace);
|
||||
setOutput(code);
|
||||
}
|
||||
</script>
|
||||
@@ -303,8 +303,8 @@ h1 {
|
||||
<input type="button" value="JavaScript" onclick="toJavaScript()">
|
||||
<input type="button" value="Python" onclick="toPython()">
|
||||
<input type="button" value="PHP" onclick="toPhp()">
|
||||
<input type="button" value="Dart" onclick="toDart()">
|
||||
<input type="button" value="Lua" onclick="toLua()">
|
||||
<input type="button" value="Dart" onclick="toDart()">
|
||||
</p>
|
||||
</td></tr><tr><td height="99%">
|
||||
<textarea id="importExport" readonly="readonly" wrap="off"></textarea>
|
||||
|
||||
@@ -13,15 +13,6 @@
|
||||
<script src="../generators/javascript/colour.js"></script>
|
||||
<script src="../generators/javascript/variables.js"></script>
|
||||
<script src="../generators/javascript/procedures.js"></script>
|
||||
<script src="../generators/php.js"></script>
|
||||
<script src="../generators/php/logic.js"></script>
|
||||
<script src="../generators/php/loops.js"></script>
|
||||
<script src="../generators/php/math.js"></script>
|
||||
<script src="../generators/php/text.js"></script>
|
||||
<script src="../generators/php/lists.js"></script>
|
||||
<script src="../generators/php/colour.js"></script>
|
||||
<script src="../generators/php/variables.js"></script>
|
||||
<script src="../generators/php/procedures.js"></script>
|
||||
<script src="../generators/python.js"></script>
|
||||
<script src="../generators/python/logic.js"></script>
|
||||
<script src="../generators/python/loops.js"></script>
|
||||
@@ -31,15 +22,15 @@
|
||||
<script src="../generators/python/colour.js"></script>
|
||||
<script src="../generators/python/variables.js"></script>
|
||||
<script src="../generators/python/procedures.js"></script>
|
||||
<script src="../generators/dart.js"></script>
|
||||
<script src="../generators/dart/logic.js"></script>
|
||||
<script src="../generators/dart/loops.js"></script>
|
||||
<script src="../generators/dart/math.js"></script>
|
||||
<script src="../generators/dart/text.js"></script>
|
||||
<script src="../generators/dart/lists.js"></script>
|
||||
<script src="../generators/dart/colour.js"></script>
|
||||
<script src="../generators/dart/variables.js"></script>
|
||||
<script src="../generators/dart/procedures.js"></script>
|
||||
<script src="../generators/php.js"></script>
|
||||
<script src="../generators/php/logic.js"></script>
|
||||
<script src="../generators/php/loops.js"></script>
|
||||
<script src="../generators/php/math.js"></script>
|
||||
<script src="../generators/php/text.js"></script>
|
||||
<script src="../generators/php/lists.js"></script>
|
||||
<script src="../generators/php/colour.js"></script>
|
||||
<script src="../generators/php/variables.js"></script>
|
||||
<script src="../generators/php/procedures.js"></script>
|
||||
<script src="../generators/lua.js"></script>
|
||||
<script src="../generators/lua/logic.js"></script>
|
||||
<script src="../generators/lua/loops.js"></script>
|
||||
@@ -49,6 +40,15 @@
|
||||
<script src="../generators/lua/colour.js"></script>
|
||||
<script src="../generators/lua/variables.js"></script>
|
||||
<script src="../generators/lua/procedures.js"></script>
|
||||
<script src="../generators/dart.js"></script>
|
||||
<script src="../generators/dart/logic.js"></script>
|
||||
<script src="../generators/dart/loops.js"></script>
|
||||
<script src="../generators/dart/math.js"></script>
|
||||
<script src="../generators/dart/text.js"></script>
|
||||
<script src="../generators/dart/lists.js"></script>
|
||||
<script src="../generators/dart/colour.js"></script>
|
||||
<script src="../generators/dart/variables.js"></script>
|
||||
<script src="../generators/dart/procedures.js"></script>
|
||||
<script src="../msg/messages.js"></script>
|
||||
<script src="../blocks/logic.js"></script>
|
||||
<script src="../blocks/loops.js"></script>
|
||||
@@ -578,9 +578,9 @@ h1 {
|
||||
|
||||
<input type="button" value="To PHP" onclick="toCode('PHP')">
|
||||
|
||||
<input type="button" value="To Dart" onclick="toCode('Dart')">
|
||||
|
||||
<input type="button" value="To Lua" onclick="toCode('Lua')">
|
||||
|
||||
<input type="button" value="To Dart" onclick="toCode('Dart')">
|
||||
<br>
|
||||
<textarea id="importExport" style="width: 26%; height: 12em"
|
||||
onchange="taChange();" onkeyup="taChange()"></textarea>
|
||||
|
||||
Reference in New Issue
Block a user