Clarifications and consistency

*  removed all the generated files (<locale>.json, <locale>.js) except for ‘en’ versions and added them to git ignore.
* updated cleanup.sh to use our messages.
* added validation check to fail if any translations include newlines
* skip generating js files other than ‘en’ as we don’t use them
* Revised messages.js to use _single_ quoted strings instead of double (consistent with Blockly - if we need to import more strings), and switch the validations to check for single not double quotes.
* additional small changes for simplicity and ergonomics

Not handling category menu at this time as it’s managed differently in scratch-gui.
This commit is contained in:
chrisgarrity 2018-06-12 12:36:04 -04:00
parent 3ec20a5a60
commit 5cb1651e56
12 changed files with 333 additions and 317 deletions

View file

@ -81,7 +81,11 @@ keep_ours=".github/ISSUE_TEMPLATE.md \
.github/PULL_REQUEST_TEMPLATE.md \
.gitignore \
.travis.yml \
core/block_animations.js"
core/block_animations.js \
msg/messages.js \
msg/js/en.js \
msg/json/en.json"
for filename in $keep_ours
do

View file

@ -53,6 +53,7 @@ goog.require('Blockly.FieldVerticalSeparator');
goog.require('Blockly.Generator');
goog.require('Blockly.Msg');
goog.require('Blockly.Procedures');
goog.require('Blockly.ScratchMsgs');
goog.require('Blockly.Toolbox');
goog.require('Blockly.Touch');
goog.require('Blockly.WidgetDiv');
@ -62,7 +63,6 @@ goog.require('Blockly.inject');
goog.require('Blockly.utils');
goog.require('goog.color');
goog.require('Blockly.ScratchMsgs');
// Turn off debugging when compiled.
/* eslint-disable no-unused-vars */

View file

@ -265,8 +265,8 @@ Blockly.Flyout.prototype.dragAngleRange_ = 70;
Blockly.Flyout.prototype.scrollAnimationFraction = 0.3;
/**
* Whether to recycle blocks when refreshing the flyout. Nothing can be
* recycled when the locale changes.
* Whether to recycle blocks when refreshing the flyout. When false, do not allow
* anything to be recycled. The default is to recycle.
* @type {boolean}
* @private
*/

View file

@ -29,6 +29,7 @@
* Msg gets populated in the message files.
*/
goog.provide('Blockly.ScratchMsgs');
goog.require('Blockly.Msg');
/**
@ -40,5 +41,8 @@ goog.require('Blockly.Msg');
Blockly.ScratchMsgs.setLocale = function(locale) {
if (Object.keys(Blockly.ScratchMsgs.locales).includes(locale)) {
Blockly.Msg = Blockly.ScratchMsgs.locales[locale];
} else {
// keep current locale
console.warn('Ignoring unrecognized locale: ' + locale);
}
};

View file

@ -12,15 +12,16 @@ en = JSON.parse(en);
const enKeys = Object.keys(en).sort().toString();
// Check that translation is valid:
// elt: array [key, translation] from <locale>.json
// entry: array [key, translation] corresponding to a single string from <locale>.json
// - messages with placeholders have the same number of placeholders
const validatePlaceholders = function (elt) {
// - messages must not have newlines embedded
const validateEntry = function (entry) {
const re = /(%\d)/g;
const [key, translation] = elt;
const placeholdersCount = en[key].match(re) ? en[key].match(re).length : 0;
const [key, translation] = entry;
const enMatch = en[key].match(re);
const placeholdersCount = enMatch ? enMatch.length : 0;
if (placeholdersCount > 0) {
const tMatch = translation.match(re);
const enMatch = en[key].match(re);
assert.notStrictEqual(tMatch, null, `${key} is missing a placeholder: ${translation}`);
assert.strictEqual(
tMatch.sort().toString(),
@ -28,22 +29,23 @@ const validatePlaceholders = function (elt) {
`${key} is missing or has duplicate placeholders: ${translation}`
);
}
assert.strictEqual(translation.match(/[\n]/), null, `${key} contains a newline character ${translation}`);
};
const validate = function (json, name) {
// this is a little stricter than we need - it would be harmless if the translation had extra keys
assert.strictEqual(Object.keys(json).sort().toString(), enKeys, `${name}: Locale json keys do not match en.json`);
Object.entries(json).forEach(validatePlaceholders);
Object.entries(json).forEach(validateEntry);
};
let file = '';
file += '// This file was automatically generated. Do not modify.\n';
file += '\n';
file += '\'use strict\';\n';
file += '\n';
file += `goog.provide(\'Blockly.ScratchMsgs.locales\');\n`;
file += `goog.require(\'Blockly.ScratchMsgs\');\n`;
file += '\n';
let file = `// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.ScratchMsgs.locales');
goog.require('Blockly.ScratchMsgs');
`;
let files = glob.sync(PATH_INPUT);
files.forEach(function (uri) {

View file

@ -13,8 +13,8 @@ const PATH_OUTPUT = path.resolve(__dirname, '../msg/json/en.json');
// Match function
const match = function (str) {
if (str.indexOf('Blockly.Msg.') !== 0) return false;
assert.notStrictEqual(str.indexOf("';"), str.length - 2, `[${str}] uses single quoted string, should use double quotes.`);
if (str.indexOf('";') !== str.length - 2) return false;
assert.notStrictEqual(str.indexOf('";'), str.length - 2, `[${str}] uses double quoted string, should use single quotes.`);
if (str.indexOf("';") !== str.length - 2) return false;
return true;
}
@ -26,7 +26,8 @@ const extract = function (str) {
value: str
.splice(2, str.length)
.join(' ')
.replace(/[;"]/g, '')
.slice(1, -2) // strip off initial ', and ending ';
.replace(/\\'/g, "'")
};
};

View file

@ -4,7 +4,10 @@ const path = require('path');
const glob = require('glob');
// Globals
const PATH_INPUT = path.resolve(__dirname, '../msg/json/*.json');
const PATH_INPUT = path.resolve(__dirname, '../msg/json/en.json');
// If you want to generate js files for other languages, comment out the line above,
// and use the one below instead.
// const PATH_INPUT = path.resolve(__dirname, '../msg/json/*.json');
const PATH_OUTPUT = path.resolve(__dirname, '../msg/js');
const CONCURRENCY_LIMIT = 4;
@ -29,7 +32,7 @@ const work = function (uri, callback) {
// Iterate over object and build up file
for (let i in body) {
file += `Blockly.Msg["${i}"] = "${body[i]}";\n`
file += `Blockly.Msg["${i}"] = "${body[i].replace(/"/g, '\\"')}";\n`
}
// Write file to disk

View file

@ -246,23 +246,23 @@ Blockly.Msg["COLOUR_SATURATION_LABEL"] = "Saturation";
Blockly.Msg["COLOUR_BRIGHTNESS_LABEL"] = "Brightness";
Blockly.Msg["CHANGE_VALUE_TITLE"] = "Change value:";
Blockly.Msg["RENAME_VARIABLE"] = "Rename variable";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Rename all '%1' variables to:";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Rename all \"%1\" variables to:";
Blockly.Msg["RENAME_VARIABLE_MODAL_TITLE"] = "Rename Variable";
Blockly.Msg["NEW_VARIABLE"] = "Make a Variable";
Blockly.Msg["NEW_VARIABLE_TITLE"] = "New variable name:";
Blockly.Msg["VARIABLE_MODAL_TITLE"] = "New Variable";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another variable of type '%2'.";
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'";
Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named \"%1\" already exists.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named \"%1\" already exists for another variable of type \"%2\".";
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the \"%2\" variable?";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable \"%1\" because it's part of the definition of the function \"%2\"";
Blockly.Msg["DELETE_VARIABLE"] = "Delete the \"%1\" variable";
Blockly.Msg["NEW_PROCEDURE"] = "Make a Block";
Blockly.Msg["PROCEDURE_ALREADY_EXISTS"] = "A procedure named '%1' already exists.";
Blockly.Msg["PROCEDURE_ALREADY_EXISTS"] = "A procedure named \"%1\" already exists.";
Blockly.Msg["NEW_LIST"] = "Make a List";
Blockly.Msg["NEW_LIST_TITLE"] = "New list name:";
Blockly.Msg["LIST_MODAL_TITLE"] = "New List";
Blockly.Msg["LIST_ALREADY_EXISTS"] = "A list named '%1' already exists.";
Blockly.Msg["RENAME_LIST_TITLE"] = "Rename all '%1' lists to:";
Blockly.Msg["LIST_ALREADY_EXISTS"] = "A list named \"%1\" already exists.";
Blockly.Msg["RENAME_LIST_TITLE"] = "Rename all \"%1\" lists to:";
Blockly.Msg["RENAME_LIST_MODAL_TITLE"] = "Rename List";
Blockly.Msg["NEW_BROADCAST_MESSAGE"] = "New message";
Blockly.Msg["NEW_BROADCAST_MESSAGE_TITLE"] = "New message name:";

View file

@ -240,23 +240,23 @@
"COLOUR_BRIGHTNESS_LABEL": "Brightness",
"CHANGE_VALUE_TITLE": "Change value:",
"RENAME_VARIABLE": "Rename variable",
"RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:",
"RENAME_VARIABLE_TITLE": "Rename all \"%1\" variables to:",
"RENAME_VARIABLE_MODAL_TITLE": "Rename Variable",
"NEW_VARIABLE": "Make a Variable",
"NEW_VARIABLE_TITLE": "New variable name:",
"VARIABLE_MODAL_TITLE": "New Variable",
"VARIABLE_ALREADY_EXISTS": "A variable named '%1' already exists.",
"VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "A variable named '%1' already exists for another variable of type '%2'.",
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the '%2' variable?",
"CANNOT_DELETE_VARIABLE_PROCEDURE": "Can't delete the variable '%1' because it's part of the definition of the function '%2'",
"DELETE_VARIABLE": "Delete the '%1' variable",
"VARIABLE_ALREADY_EXISTS": "A variable named \"%1\" already exists.",
"VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "A variable named \"%1\" already exists for another variable of type \"%2\".",
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the \"%2\" variable?",
"CANNOT_DELETE_VARIABLE_PROCEDURE": "Can't delete the variable \"%1\" because it's part of the definition of the function \"%2\"",
"DELETE_VARIABLE": "Delete the \"%1\" variable",
"NEW_PROCEDURE": "Make a Block",
"PROCEDURE_ALREADY_EXISTS": "A procedure named '%1' already exists.",
"PROCEDURE_ALREADY_EXISTS": "A procedure named \"%1\" already exists.",
"NEW_LIST": "Make a List",
"NEW_LIST_TITLE": "New list name:",
"LIST_MODAL_TITLE": "New List",
"LIST_ALREADY_EXISTS": "A list named '%1' already exists.",
"RENAME_LIST_TITLE": "Rename all '%1' lists to:",
"LIST_ALREADY_EXISTS": "A list named \"%1\" already exists.",
"RENAME_LIST_TITLE": "Rename all \"%1\" lists to:",
"RENAME_LIST_MODAL_TITLE": "Rename List",
"NEW_BROADCAST_MESSAGE": "New message",
"NEW_BROADCAST_MESSAGE_TITLE": "New message name:",

View file

@ -25,308 +25,309 @@
* After modifying this file, run `npm run translate` from the root directory
* to regenerate `./msg/json/en.json`.
* IMPORTANT:
* All message strings must use double quotes for the scripts to work properly
* All message strings must use single quotes for the scripts to work properly
*/
'use strict';
goog.provide('Blockly.Msg.en');
goog.require('Blockly.Msg');
// Control blocks
Blockly.Msg.CONTROL_FOREVER = "forever";
Blockly.Msg.CONTROL_REPEAT = "repeat %1";
Blockly.Msg.CONTROL_IF = "if %1 then";
Blockly.Msg.CONTROL_ELSE = "else";
Blockly.Msg.CONTROL_STOP = "stop";
Blockly.Msg.CONTROL_STOP_ALL = "all";
Blockly.Msg.CONTROL_STOP_THIS = "this script";
Blockly.Msg.CONTROL_STOP_OTHER = "other scripts in sprite";
Blockly.Msg.CONTROL_WAIT = "wait %1 seconds";
Blockly.Msg.CONTROL_WAITUNTIL = "wait until %1";
Blockly.Msg.CONTROL_REPEATUNTIL = "repeat until %1";
Blockly.Msg.CONTROL_WHILE = "while %1";
Blockly.Msg.CONTROL_FOREACH = "for each %1 in %2";
Blockly.Msg.CONTROL_STARTASCLONE = "when I start as a clone";
Blockly.Msg.CONTROL_CREATECLONEOF = "create clone of %1";
Blockly.Msg.CONTROL_CREATECLONEOF_MYSELF = "myself";
Blockly.Msg.CONTROL_DELETETHISCLONE = "delete this clone";
Blockly.Msg.CONTROL_COUNTER = "counter";
Blockly.Msg.CONTROL_INCRCOUNTER = "increment counter";
Blockly.Msg.CONTROL_CLEARCOUNTER = "clear counter";
Blockly.Msg.CONTROL_ALLATONCE = "all at once";
Blockly.Msg.CONTROL_FOREVER = 'forever';
Blockly.Msg.CONTROL_REPEAT = 'repeat %1';
Blockly.Msg.CONTROL_IF = 'if %1 then';
Blockly.Msg.CONTROL_ELSE = 'else';
Blockly.Msg.CONTROL_STOP = 'stop';
Blockly.Msg.CONTROL_STOP_ALL = 'all';
Blockly.Msg.CONTROL_STOP_THIS = 'this script';
Blockly.Msg.CONTROL_STOP_OTHER = 'other scripts in sprite';
Blockly.Msg.CONTROL_WAIT = 'wait %1 seconds';
Blockly.Msg.CONTROL_WAITUNTIL = 'wait until %1';
Blockly.Msg.CONTROL_REPEATUNTIL = 'repeat until %1';
Blockly.Msg.CONTROL_WHILE = 'while %1';
Blockly.Msg.CONTROL_FOREACH = 'for each %1 in %2';
Blockly.Msg.CONTROL_STARTASCLONE = 'when I start as a clone';
Blockly.Msg.CONTROL_CREATECLONEOF = 'create clone of %1';
Blockly.Msg.CONTROL_CREATECLONEOF_MYSELF = 'myself';
Blockly.Msg.CONTROL_DELETETHISCLONE = 'delete this clone';
Blockly.Msg.CONTROL_COUNTER = 'counter';
Blockly.Msg.CONTROL_INCRCOUNTER = 'increment counter';
Blockly.Msg.CONTROL_CLEARCOUNTER = 'clear counter';
Blockly.Msg.CONTROL_ALLATONCE = 'all at once';
// Data blocks
Blockly.Msg.DATA_SETVARIABLETO = "set %1 to %2";
Blockly.Msg.DATA_CHANGEVARIABLEBY = "change %1 by %2";
Blockly.Msg.DATA_SHOWVARIABLE = "show variable %1";
Blockly.Msg.DATA_HIDEVARIABLE = "hide variable %1";
Blockly.Msg.DATA_ADDTOLIST = "add %1 to %2";
Blockly.Msg.DATA_DELETEOFLIST = "delete %1 of %2";
Blockly.Msg.DATA_INSERTATLIST = "insert %1 at %2 of %3";
Blockly.Msg.DATA_REPLACEITEMOFLIST = "replace item %1 of %2 with %3";
Blockly.Msg.DATA_ITEMOFLIST = "item %1 of %2";
Blockly.Msg.DATA_LENGTHOFLIST = "length of %1";
Blockly.Msg.DATA_LISTCONTAINSITEM = "%1 contains %2?";
Blockly.Msg.DATA_SHOWLIST = "show list %1";
Blockly.Msg.DATA_HIDELIST = "hide list %1";
Blockly.Msg.DATA_INDEX_ALL = "all";
Blockly.Msg.DATA_INDEX_LAST = "last";
Blockly.Msg.DATA_INDEX_RANDOM = "random";
Blockly.Msg.DATA_SETVARIABLETO = 'set %1 to %2';
Blockly.Msg.DATA_CHANGEVARIABLEBY = 'change %1 by %2';
Blockly.Msg.DATA_SHOWVARIABLE = 'show variable %1';
Blockly.Msg.DATA_HIDEVARIABLE = 'hide variable %1';
Blockly.Msg.DATA_ADDTOLIST = 'add %1 to %2';
Blockly.Msg.DATA_DELETEOFLIST = 'delete %1 of %2';
Blockly.Msg.DATA_INSERTATLIST = 'insert %1 at %2 of %3';
Blockly.Msg.DATA_REPLACEITEMOFLIST = 'replace item %1 of %2 with %3';
Blockly.Msg.DATA_ITEMOFLIST = 'item %1 of %2';
Blockly.Msg.DATA_LENGTHOFLIST = 'length of %1';
Blockly.Msg.DATA_LISTCONTAINSITEM = '%1 contains %2?';
Blockly.Msg.DATA_SHOWLIST = 'show list %1';
Blockly.Msg.DATA_HIDELIST = 'hide list %1';
Blockly.Msg.DATA_INDEX_ALL = 'all';
Blockly.Msg.DATA_INDEX_LAST = 'last';
Blockly.Msg.DATA_INDEX_RANDOM = 'random';
// Event blocks
Blockly.Msg.EVENT_WHENFLAGCLICKED = "when %1 clicked";
Blockly.Msg.EVENT_WHENTHISSPRITECLICKED = "when this sprite clicked";
Blockly.Msg.EVENT_WHENSTAGECLICKED = "when stage clicked";
Blockly.Msg.EVENT_WHENTOUCHINGOBJECT = "when this sprite touches %1";
Blockly.Msg.EVENT_WHENBROADCASTRECEIVED = "when I receive %1";
Blockly.Msg.EVENT_WHENBACKDROPSWITCHESTO = "when backdrop switches to %1";
Blockly.Msg.EVENT_WHENGREATERTHAN = "when %1 > %2";
Blockly.Msg.EVENT_WHENGREATERTHAN_TIMER = "timer";
Blockly.Msg.EVENT_BROADCAST = "broadcast %1";
Blockly.Msg.EVENT_BROADCASTANDWAIT = "broadcast %1 and wait";
Blockly.Msg.EVENT_WHENKEYPRESSED = "when %1 key pressed";
Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE = "space";
Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT = "left arrow";
Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT = "right arrow";
Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN = "down arrow";
Blockly.Msg.EVENT_WHENKEYPRESSED_UP = "up arrow";
Blockly.Msg.EVENT_WHENKEYPRESSED_ANY = "any";
Blockly.Msg.EVENT_WHENFLAGCLICKED = 'when %1 clicked';
Blockly.Msg.EVENT_WHENTHISSPRITECLICKED = 'when this sprite clicked';
Blockly.Msg.EVENT_WHENSTAGECLICKED = 'when stage clicked';
Blockly.Msg.EVENT_WHENTOUCHINGOBJECT = 'when this sprite touches %1';
Blockly.Msg.EVENT_WHENBROADCASTRECEIVED = 'when I receive %1';
Blockly.Msg.EVENT_WHENBACKDROPSWITCHESTO = 'when backdrop switches to %1';
Blockly.Msg.EVENT_WHENGREATERTHAN = 'when %1 > %2';
Blockly.Msg.EVENT_WHENGREATERTHAN_TIMER = 'timer';
Blockly.Msg.EVENT_BROADCAST = 'broadcast %1';
Blockly.Msg.EVENT_BROADCASTANDWAIT = 'broadcast %1 and wait';
Blockly.Msg.EVENT_WHENKEYPRESSED = 'when %1 key pressed';
Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE = 'space';
Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT = 'left arrow';
Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT = 'right arrow';
Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN = 'down arrow';
Blockly.Msg.EVENT_WHENKEYPRESSED_UP = 'up arrow';
Blockly.Msg.EVENT_WHENKEYPRESSED_ANY = 'any';
// Looks blocks
Blockly.Msg.LOOKS_SAYFORSECS = "say %1 for %2 seconds";
Blockly.Msg.LOOKS_SAY = "say %1";
Blockly.Msg.LOOKS_THINKFORSECS = "think %1 for %2 seconds";
Blockly.Msg.LOOKS_THINK = "think %1";
Blockly.Msg.LOOKS_SHOW = "show";
Blockly.Msg.LOOKS_HIDE = "hide";
Blockly.Msg.LOOKS_HIDEALLSPRITES = "hide all sprites";
Blockly.Msg.LOOKS_EFFECT_COLOR = "color";
Blockly.Msg.LOOKS_EFFECT_FISHEYE = "fisheye";
Blockly.Msg.LOOKS_EFFECT_WHIRL = "whirl";
Blockly.Msg.LOOKS_EFFECT_PIXELATE = "pixelate";
Blockly.Msg.LOOKS_EFFECT_MOSAIC = "mosaic";
Blockly.Msg.LOOKS_EFFECT_BRIGHTNESS = "brightness";
Blockly.Msg.LOOKS_EFFECT_GHOST = "ghost";
Blockly.Msg.LOOKS_CHANGEEFFECTBY = "change %1 effect by %2";
Blockly.Msg.LOOKS_SETEFFECTTO = "set %1 effect to %2";
Blockly.Msg.LOOKS_CLEARGRAPHICEFFECTS = "clear graphic effects";
Blockly.Msg.LOOKS_CHANGESIZEBY = "change size by %1";
Blockly.Msg.LOOKS_SETSIZETO = "set size to %1 %";
Blockly.Msg.LOOKS_SIZE = "size";
Blockly.Msg.LOOKS_CHANGESTRETCHBY = "change stretch by %1";
Blockly.Msg.LOOKS_SETSTRETCHTO = "set stretch to %1 %";
Blockly.Msg.LOOKS_SWITCHCOSTUMETO = "switch costume to %1";
Blockly.Msg.LOOKS_NEXTCOSTUME = "next costume";
Blockly.Msg.LOOKS_SWITCHBACKDROPTO = "switch backdrop to %1";
Blockly.Msg.LOOKS_GOTOFRONTBACK = "go to %1 layer";
Blockly.Msg.LOOKS_GOTOFRONTBACK_FRONT = "front";
Blockly.Msg.LOOKS_GOTOFRONTBACK_BACK = "back";
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS = "go %1 %2 layers";
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_FORWARD = "forward";
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_BACKWARD = "backward";
Blockly.Msg.LOOKS_BACKDROPNUMBERNAME = "backdrop %1";
Blockly.Msg.LOOKS_COSTUMENUMBERNAME = "costume %1";
Blockly.Msg.LOOKS_NUMBERNAME_NUMBER = "number";
Blockly.Msg.LOOKS_NUMBERNAME_NAME = "name";
Blockly.Msg.LOOKS_SWITCHBACKDROPTOANDWAIT = "switch backdrop to %1 and wait";
Blockly.Msg.LOOKS_NEXTBACKDROP = "next backdrop";
Blockly.Msg.LOOKS_PREVIOUSBACKDROP = "previous backdrop";
Blockly.Msg.LOOKS_SAYFORSECS = 'say %1 for %2 seconds';
Blockly.Msg.LOOKS_SAY = 'say %1';
Blockly.Msg.LOOKS_THINKFORSECS = 'think %1 for %2 seconds';
Blockly.Msg.LOOKS_THINK = 'think %1';
Blockly.Msg.LOOKS_SHOW = 'show';
Blockly.Msg.LOOKS_HIDE = 'hide';
Blockly.Msg.LOOKS_HIDEALLSPRITES = 'hide all sprites';
Blockly.Msg.LOOKS_EFFECT_COLOR = 'color';
Blockly.Msg.LOOKS_EFFECT_FISHEYE = 'fisheye';
Blockly.Msg.LOOKS_EFFECT_WHIRL = 'whirl';
Blockly.Msg.LOOKS_EFFECT_PIXELATE = 'pixelate';
Blockly.Msg.LOOKS_EFFECT_MOSAIC = 'mosaic';
Blockly.Msg.LOOKS_EFFECT_BRIGHTNESS = 'brightness';
Blockly.Msg.LOOKS_EFFECT_GHOST = 'ghost';
Blockly.Msg.LOOKS_CHANGEEFFECTBY = 'change %1 effect by %2';
Blockly.Msg.LOOKS_SETEFFECTTO = 'set %1 effect to %2';
Blockly.Msg.LOOKS_CLEARGRAPHICEFFECTS = 'clear graphic effects';
Blockly.Msg.LOOKS_CHANGESIZEBY = 'change size by %1';
Blockly.Msg.LOOKS_SETSIZETO = 'set size to %1 %';
Blockly.Msg.LOOKS_SIZE = 'size';
Blockly.Msg.LOOKS_CHANGESTRETCHBY = 'change stretch by %1';
Blockly.Msg.LOOKS_SETSTRETCHTO = 'set stretch to %1 %';
Blockly.Msg.LOOKS_SWITCHCOSTUMETO = 'switch costume to %1';
Blockly.Msg.LOOKS_NEXTCOSTUME = 'next costume';
Blockly.Msg.LOOKS_SWITCHBACKDROPTO = 'switch backdrop to %1';
Blockly.Msg.LOOKS_GOTOFRONTBACK = 'go to %1 layer';
Blockly.Msg.LOOKS_GOTOFRONTBACK_FRONT = 'front';
Blockly.Msg.LOOKS_GOTOFRONTBACK_BACK = 'back';
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS = 'go %1 %2 layers';
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_FORWARD = 'forward';
Blockly.Msg.LOOKS_GOFORWARDBACKWARDLAYERS_BACKWARD = 'backward';
Blockly.Msg.LOOKS_BACKDROPNUMBERNAME = 'backdrop %1';
Blockly.Msg.LOOKS_COSTUMENUMBERNAME = 'costume %1';
Blockly.Msg.LOOKS_NUMBERNAME_NUMBER = 'number';
Blockly.Msg.LOOKS_NUMBERNAME_NAME = 'name';
Blockly.Msg.LOOKS_SWITCHBACKDROPTOANDWAIT = 'switch backdrop to %1 and wait';
Blockly.Msg.LOOKS_NEXTBACKDROP = 'next backdrop';
Blockly.Msg.LOOKS_PREVIOUSBACKDROP = 'previous backdrop';
// Motion blocks
Blockly.Msg.MOTION_MOVESTEPS = "move %1 steps";
Blockly.Msg.MOTION_TURNLEFT = "turn %1 %2 degrees";
Blockly.Msg.MOTION_TURNRIGHT = "turn %1 %2 degrees";
Blockly.Msg.MOTION_POINTINDIRECTION = "point in direction %1";
Blockly.Msg.MOTION_POINTTOWARDS = "point towards %1";
Blockly.Msg.MOTION_POINTTOWARDS_POINTER = "mouse-pointer";
Blockly.Msg.MOTION_GOTO = "go to %1";
Blockly.Msg.MOTION_GOTO_POINTER = "mouse-pointer";
Blockly.Msg.MOTION_GOTO_RANDOM = "random position";
Blockly.Msg.MOTION_GOTOXY = "go to x: %1 y: %2";
Blockly.Msg.MOTION_GLIDESECSTOXY = "glide %1 secs to x: %2 y: %3";
Blockly.Msg.MOTION_GLIDETO = "glide %1 secs to %2";
Blockly.Msg.MOTION_GLIDETO_POINTER = "mouse-pointer";
Blockly.Msg.MOTION_GLIDETO_RANDOM = "random position";
Blockly.Msg.MOTION_CHANGEXBY = "change x by %1";
Blockly.Msg.MOTION_SETX = "set x to %1";
Blockly.Msg.MOTION_CHANGEYBY = "change y by %1";
Blockly.Msg.MOTION_SETY = "set y to %1";
Blockly.Msg.MOTION_IFONEDGEBOUNCE = "if on edge, bounce";
Blockly.Msg.MOTION_SETROTATIONSTYLE = "set rotation style %1";
Blockly.Msg.MOTION_SETROTATIONSTYLE_LEFTRIGHT = "left-right";
Blockly.Msg.MOTION_SETROTATIONSTYLE_DONTROTATE = "don't rotate";
Blockly.Msg.MOTION_SETROTATIONSTYLE_ALLAROUND = "all around";
Blockly.Msg.MOTION_XPOSITION = "x position";
Blockly.Msg.MOTION_YPOSITION = "y position";
Blockly.Msg.MOTION_DIRECTION = "direction";
Blockly.Msg.MOTION_SCROLLRIGHT = "scroll right %1";
Blockly.Msg.MOTION_SCROLLUP = "scroll up %1";
Blockly.Msg.MOTION_ALIGNSCENE = "align scene %1";
Blockly.Msg.MOTION_ALIGNSCENE_BOTTOMLEFT = "bottom-left";
Blockly.Msg.MOTION_ALIGNSCENE_BOTTOMRIGHT = "bottom-right";
Blockly.Msg.MOTION_ALIGNSCENE_MIDDLE = "middle";
Blockly.Msg.MOTION_ALIGNSCENE_TOPLEFT = "top-left";
Blockly.Msg.MOTION_ALIGNSCENE_TOPRIGHT = "top-right";
Blockly.Msg.MOTION_XSCROLL = "x scroll";
Blockly.Msg.MOTION_YSCROLL = "y scroll";
Blockly.Msg.MOTION_MOVESTEPS = 'move %1 steps';
Blockly.Msg.MOTION_TURNLEFT = 'turn %1 %2 degrees';
Blockly.Msg.MOTION_TURNRIGHT = 'turn %1 %2 degrees';
Blockly.Msg.MOTION_POINTINDIRECTION = 'point in direction %1';
Blockly.Msg.MOTION_POINTTOWARDS = 'point towards %1';
Blockly.Msg.MOTION_POINTTOWARDS_POINTER = 'mouse-pointer';
Blockly.Msg.MOTION_GOTO = 'go to %1';
Blockly.Msg.MOTION_GOTO_POINTER = 'mouse-pointer';
Blockly.Msg.MOTION_GOTO_RANDOM = 'random position';
Blockly.Msg.MOTION_GOTOXY = 'go to x: %1 y: %2';
Blockly.Msg.MOTION_GLIDESECSTOXY = 'glide %1 secs to x: %2 y: %3';
Blockly.Msg.MOTION_GLIDETO = 'glide %1 secs to %2';
Blockly.Msg.MOTION_GLIDETO_POINTER = 'mouse-pointer';
Blockly.Msg.MOTION_GLIDETO_RANDOM = 'random position';
Blockly.Msg.MOTION_CHANGEXBY = 'change x by %1';
Blockly.Msg.MOTION_SETX = 'set x to %1';
Blockly.Msg.MOTION_CHANGEYBY = 'change y by %1';
Blockly.Msg.MOTION_SETY = 'set y to %1';
Blockly.Msg.MOTION_IFONEDGEBOUNCE = 'if on edge, bounce';
Blockly.Msg.MOTION_SETROTATIONSTYLE = 'set rotation style %1';
Blockly.Msg.MOTION_SETROTATIONSTYLE_LEFTRIGHT = 'left-right';
Blockly.Msg.MOTION_SETROTATIONSTYLE_DONTROTATE = 'don\'t rotate';
Blockly.Msg.MOTION_SETROTATIONSTYLE_ALLAROUND = 'all around';
Blockly.Msg.MOTION_XPOSITION = 'x position';
Blockly.Msg.MOTION_YPOSITION = 'y position';
Blockly.Msg.MOTION_DIRECTION = 'direction';
Blockly.Msg.MOTION_SCROLLRIGHT = 'scroll right %1';
Blockly.Msg.MOTION_SCROLLUP = 'scroll up %1';
Blockly.Msg.MOTION_ALIGNSCENE = 'align scene %1';
Blockly.Msg.MOTION_ALIGNSCENE_BOTTOMLEFT = 'bottom-left';
Blockly.Msg.MOTION_ALIGNSCENE_BOTTOMRIGHT = 'bottom-right';
Blockly.Msg.MOTION_ALIGNSCENE_MIDDLE = 'middle';
Blockly.Msg.MOTION_ALIGNSCENE_TOPLEFT = 'top-left';
Blockly.Msg.MOTION_ALIGNSCENE_TOPRIGHT = 'top-right';
Blockly.Msg.MOTION_XSCROLL = 'x scroll';
Blockly.Msg.MOTION_YSCROLL = 'y scroll';
// Operators blocks
Blockly.Msg.OPERATORS_ADD = "%1 + %2";
Blockly.Msg.OPERATORS_SUBTRACT = "%1 - %2";
Blockly.Msg.OPERATORS_MULTIPLY = "%1 * %2";
Blockly.Msg.OPERATORS_DIVIDE = "%1 / %2";
Blockly.Msg.OPERATORS_RANDOM = "pick random %1 to %2";
Blockly.Msg.OPERATORS_GT = "%1 > %2";
Blockly.Msg.OPERATORS_LT = "%1 < %2";
Blockly.Msg.OPERATORS_EQUALS = "%1 = %2";
Blockly.Msg.OPERATORS_AND = "%1 and %2";
Blockly.Msg.OPERATORS_OR = "%1 or %2";
Blockly.Msg.OPERATORS_NOT = "not %1";
Blockly.Msg.OPERATORS_JOIN = "join %1 %2";
Blockly.Msg.OPERATORS_LETTEROF = "letter %1 of %2";
Blockly.Msg.OPERATORS_LENGTH = "length of %1";
Blockly.Msg.OPERATORS_CONTAINS = "%1 contains %2?";
Blockly.Msg.OPERATORS_MOD = "%1 mod %2";
Blockly.Msg.OPERATORS_ROUND = "round %1";
Blockly.Msg.OPERATORS_MATHOP = "%1 of %2";
Blockly.Msg.OPERATORS_MATHOP_ABS = "abs";
Blockly.Msg.OPERATORS_MATHOP_FLOOR = "floor";
Blockly.Msg.OPERATORS_MATHOP_CEILING = "ceiling";
Blockly.Msg.OPERATORS_MATHOP_SQRT = "sqrt";
Blockly.Msg.OPERATORS_MATHOP_SIN = "sin";
Blockly.Msg.OPERATORS_MATHOP_COS = "cos";
Blockly.Msg.OPERATORS_MATHOP_TAN = "tan";
Blockly.Msg.OPERATORS_MATHOP_ASIN = "asin";
Blockly.Msg.OPERATORS_MATHOP_ACOS = "acos";
Blockly.Msg.OPERATORS_MATHOP_ATAN = "atan";
Blockly.Msg.OPERATORS_MATHOP_LN = "ln";
Blockly.Msg.OPERATORS_MATHOP_LOG = "log";
Blockly.Msg.OPERATORS_MATHOP_EEXP = "e ^";
Blockly.Msg.OPERATORS_MATHOP_10EXP = "10 ^";
Blockly.Msg.OPERATORS_ADD = '%1 + %2';
Blockly.Msg.OPERATORS_SUBTRACT = '%1 - %2';
Blockly.Msg.OPERATORS_MULTIPLY = '%1 * %2';
Blockly.Msg.OPERATORS_DIVIDE = '%1 / %2';
Blockly.Msg.OPERATORS_RANDOM = 'pick random %1 to %2';
Blockly.Msg.OPERATORS_GT = '%1 > %2';
Blockly.Msg.OPERATORS_LT = '%1 < %2';
Blockly.Msg.OPERATORS_EQUALS = '%1 = %2';
Blockly.Msg.OPERATORS_AND = '%1 and %2';
Blockly.Msg.OPERATORS_OR = '%1 or %2';
Blockly.Msg.OPERATORS_NOT = 'not %1';
Blockly.Msg.OPERATORS_JOIN = 'join %1 %2';
Blockly.Msg.OPERATORS_LETTEROF = 'letter %1 of %2';
Blockly.Msg.OPERATORS_LENGTH = 'length of %1';
Blockly.Msg.OPERATORS_CONTAINS = '%1 contains %2?';
Blockly.Msg.OPERATORS_MOD = '%1 mod %2';
Blockly.Msg.OPERATORS_ROUND = 'round %1';
Blockly.Msg.OPERATORS_MATHOP = '%1 of %2';
Blockly.Msg.OPERATORS_MATHOP_ABS = 'abs';
Blockly.Msg.OPERATORS_MATHOP_FLOOR = 'floor';
Blockly.Msg.OPERATORS_MATHOP_CEILING = 'ceiling';
Blockly.Msg.OPERATORS_MATHOP_SQRT = 'sqrt';
Blockly.Msg.OPERATORS_MATHOP_SIN = 'sin';
Blockly.Msg.OPERATORS_MATHOP_COS = 'cos';
Blockly.Msg.OPERATORS_MATHOP_TAN = 'tan';
Blockly.Msg.OPERATORS_MATHOP_ASIN = 'asin';
Blockly.Msg.OPERATORS_MATHOP_ACOS = 'acos';
Blockly.Msg.OPERATORS_MATHOP_ATAN = 'atan';
Blockly.Msg.OPERATORS_MATHOP_LN = 'ln';
Blockly.Msg.OPERATORS_MATHOP_LOG = 'log';
Blockly.Msg.OPERATORS_MATHOP_EEXP = 'e ^';
Blockly.Msg.OPERATORS_MATHOP_10EXP = '10 ^';
// Procedures blocks
Blockly.Msg.PROCEDURES_DEFINITION = "define %1";
Blockly.Msg.PROCEDURES_DEFINITION = 'define %1';
// Sensing blocks
Blockly.Msg.SENSING_TOUCHINGOBJECT = "touching %1?";
Blockly.Msg.SENSING_TOUCHINGOBJECT_POINTER = "mouse-pointer";
Blockly.Msg.SENSING_TOUCHINGOBJECT_EDGE = "edge";
Blockly.Msg.SENSING_TOUCHINGCOLOR = "touching color %1?";
Blockly.Msg.SENSING_COLORISTOUCHINGCOLOR = "color %1 is touching %2?";
Blockly.Msg.SENSING_DISTANCETO = "distance to %1";
Blockly.Msg.SENSING_DISTANCETO_POINTER = "mouse-pointer";
Blockly.Msg.SENSING_ASKANDWAIT = "ask %1 and wait";
Blockly.Msg.SENSING_ANSWER = "answer";
Blockly.Msg.SENSING_KEYPRESSED = "key %1 pressed?";
Blockly.Msg.SENSING_MOUSEDOWN = "mouse down?";
Blockly.Msg.SENSING_MOUSEX = "mouse x";
Blockly.Msg.SENSING_MOUSEY = "mouse y";
Blockly.Msg.SENSING_SETDRAGMODE = "set drag mode %1";
Blockly.Msg.SENSING_SETDRAGMODE_DRAGGABLE = "draggable";
Blockly.Msg.SENSING_SETDRAGMODE_NOTDRAGGABLE = "not draggable";
Blockly.Msg.SENSING_LOUDNESS = "loudness";
Blockly.Msg.SENSING_LOUD = "loud?";
Blockly.Msg.SENSING_TIMER = "timer";
Blockly.Msg.SENSING_RESETTIMER = "reset timer";
Blockly.Msg.SENSING_OF = "%1 of %2";
Blockly.Msg.SENSING_OF_XPOSITION = "x position";
Blockly.Msg.SENSING_OF_YPOSITION = "y position";
Blockly.Msg.SENSING_OF_DIRECTION = "direction";
Blockly.Msg.SENSING_OF_COSTUMENUMBER = "costume #";
Blockly.Msg.SENSING_OF_COSTUMENAME = "costume name";
Blockly.Msg.SENSING_OF_SIZE = "size";
Blockly.Msg.SENSING_OF_VOLUME = "volume";
Blockly.Msg.SENSING_OF_BACKDROPNUMBER = "backdrop #";
Blockly.Msg.SENSING_OF_BACKDROPNAME = "backdrop name";
Blockly.Msg.SENSING_CURRENT = "current %1";
Blockly.Msg.SENSING_CURRENT_YEAR = "year";
Blockly.Msg.SENSING_CURRENT_MONTH = "month";
Blockly.Msg.SENSING_CURRENT_DATE = "date";
Blockly.Msg.SENSING_CURRENT_DAYOFWEEK = "day of week";
Blockly.Msg.SENSING_CURRENT_HOUR = "hour";
Blockly.Msg.SENSING_CURRENT_MINUTE = "minute";
Blockly.Msg.SENSING_CURRENT_SECOND = "second";
Blockly.Msg.SENSING_DAYSSINCE2000 = "days since 2000";
Blockly.Msg.SENSING_USERNAME = "username";
Blockly.Msg.SENSING_USERID = "user id";
Blockly.Msg.SENSING_TOUCHINGOBJECT = 'touching %1?';
Blockly.Msg.SENSING_TOUCHINGOBJECT_POINTER = 'mouse-pointer';
Blockly.Msg.SENSING_TOUCHINGOBJECT_EDGE = 'edge';
Blockly.Msg.SENSING_TOUCHINGCOLOR = 'touching color %1?';
Blockly.Msg.SENSING_COLORISTOUCHINGCOLOR = 'color %1 is touching %2?';
Blockly.Msg.SENSING_DISTANCETO = 'distance to %1';
Blockly.Msg.SENSING_DISTANCETO_POINTER = 'mouse-pointer';
Blockly.Msg.SENSING_ASKANDWAIT = 'ask %1 and wait';
Blockly.Msg.SENSING_ANSWER = 'answer';
Blockly.Msg.SENSING_KEYPRESSED = 'key %1 pressed?';
Blockly.Msg.SENSING_MOUSEDOWN = 'mouse down?';
Blockly.Msg.SENSING_MOUSEX = 'mouse x';
Blockly.Msg.SENSING_MOUSEY = 'mouse y';
Blockly.Msg.SENSING_SETDRAGMODE = 'set drag mode %1';
Blockly.Msg.SENSING_SETDRAGMODE_DRAGGABLE = 'draggable';
Blockly.Msg.SENSING_SETDRAGMODE_NOTDRAGGABLE = 'not draggable';
Blockly.Msg.SENSING_LOUDNESS = 'loudness';
Blockly.Msg.SENSING_LOUD = 'loud?';
Blockly.Msg.SENSING_TIMER = 'timer';
Blockly.Msg.SENSING_RESETTIMER = 'reset timer';
Blockly.Msg.SENSING_OF = '%1 of %2';
Blockly.Msg.SENSING_OF_XPOSITION = 'x position';
Blockly.Msg.SENSING_OF_YPOSITION = 'y position';
Blockly.Msg.SENSING_OF_DIRECTION = 'direction';
Blockly.Msg.SENSING_OF_COSTUMENUMBER = 'costume #';
Blockly.Msg.SENSING_OF_COSTUMENAME = 'costume name';
Blockly.Msg.SENSING_OF_SIZE = 'size';
Blockly.Msg.SENSING_OF_VOLUME = 'volume';
Blockly.Msg.SENSING_OF_BACKDROPNUMBER = 'backdrop #';
Blockly.Msg.SENSING_OF_BACKDROPNAME = 'backdrop name';
Blockly.Msg.SENSING_CURRENT = 'current %1';
Blockly.Msg.SENSING_CURRENT_YEAR = 'year';
Blockly.Msg.SENSING_CURRENT_MONTH = 'month';
Blockly.Msg.SENSING_CURRENT_DATE = 'date';
Blockly.Msg.SENSING_CURRENT_DAYOFWEEK = 'day of week';
Blockly.Msg.SENSING_CURRENT_HOUR = 'hour';
Blockly.Msg.SENSING_CURRENT_MINUTE = 'minute';
Blockly.Msg.SENSING_CURRENT_SECOND = 'second';
Blockly.Msg.SENSING_DAYSSINCE2000 = 'days since 2000';
Blockly.Msg.SENSING_USERNAME = 'username';
Blockly.Msg.SENSING_USERID = 'user id';
// Sound blocks
Blockly.Msg.SOUND_PLAY = "start sound %1";
Blockly.Msg.SOUND_PLAYUNTILDONE = "play sound %1 until done";
Blockly.Msg.SOUND_STOPALLSOUNDS = "stop all sounds";
Blockly.Msg.SOUND_SETEFFECTO = "set %1 effect to %2";
Blockly.Msg.SOUND_CHANGEEFFECTBY = "change %1 effect by %2";
Blockly.Msg.SOUND_CLEAREFFECTS = "clear sound effects";
Blockly.Msg.SOUND_EFFECTS_PITCH = "pitch";
Blockly.Msg.SOUND_EFFECTS_PAN = "pan left/right";
Blockly.Msg.SOUND_CHANGEVOLUMEBY = "change volume by %1";
Blockly.Msg.SOUND_SETVOLUMETO = "set volume to %1%";
Blockly.Msg.SOUND_VOLUME = "volume";
Blockly.Msg.SOUND_PLAY = 'start sound %1';
Blockly.Msg.SOUND_PLAYUNTILDONE = 'play sound %1 until done';
Blockly.Msg.SOUND_STOPALLSOUNDS = 'stop all sounds';
Blockly.Msg.SOUND_SETEFFECTO = 'set %1 effect to %2';
Blockly.Msg.SOUND_CHANGEEFFECTBY = 'change %1 effect by %2';
Blockly.Msg.SOUND_CLEAREFFECTS = 'clear sound effects';
Blockly.Msg.SOUND_EFFECTS_PITCH = 'pitch';
Blockly.Msg.SOUND_EFFECTS_PAN = 'pan left/right';
Blockly.Msg.SOUND_CHANGEVOLUMEBY = 'change volume by %1';
Blockly.Msg.SOUND_SETVOLUMETO = 'set volume to %1%';
Blockly.Msg.SOUND_VOLUME = 'volume';
// Category labels
Blockly.Msg.CATEGORY_MOTION = "Motion";
Blockly.Msg.CATEGORY_LOOKS = "Looks";
Blockly.Msg.CATEGORY_SOUND = "Sound";
Blockly.Msg.CATEGORY_EVENTS = "Events";
Blockly.Msg.CATEGORY_CONTROL = "Control";
Blockly.Msg.CATEGORY_SENSING = "Sensing";
Blockly.Msg.CATEGORY_OPERATORS = "Operators";
Blockly.Msg.CATEGORY_VARIABLES = "Variables";
Blockly.Msg.CATEGORY_MYBLOCKS = "My Blocks";
Blockly.Msg.CATEGORY_MOTION = 'Motion';
Blockly.Msg.CATEGORY_LOOKS = 'Looks';
Blockly.Msg.CATEGORY_SOUND = 'Sound';
Blockly.Msg.CATEGORY_EVENTS = 'Events';
Blockly.Msg.CATEGORY_CONTROL = 'Control';
Blockly.Msg.CATEGORY_SENSING = 'Sensing';
Blockly.Msg.CATEGORY_OPERATORS = 'Operators';
Blockly.Msg.CATEGORY_VARIABLES = 'Variables';
Blockly.Msg.CATEGORY_MYBLOCKS = 'My Blocks';
// Context menus
Blockly.Msg.DUPLICATE = "Duplicate";
Blockly.Msg.DELETE = "Delete";
Blockly.Msg.ADD_COMMENT = "Add Comment";
Blockly.Msg.REMOVE_COMMENT = "Remove Comment";
Blockly.Msg.DELETE_BLOCK = "Delete Block";
Blockly.Msg.DELETE_X_BLOCKS = "Delete %1 Blocks";
Blockly.Msg.DELETE_ALL_BLOCKS = "Delete all %1 blocks?";
Blockly.Msg.CLEAN_UP = "Clean up Blocks";
Blockly.Msg.HELP = "Help";
Blockly.Msg.UNDO = "Undo";
Blockly.Msg.REDO = "Redo";
Blockly.Msg.EDIT_PROCEDURE = "Edit";
Blockly.Msg.SHOW_PROCEDURE_DEFINITION = "Go to definition";
Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT = "Say something...";
Blockly.Msg.DUPLICATE = 'Duplicate';
Blockly.Msg.DELETE = 'Delete';
Blockly.Msg.ADD_COMMENT = 'Add Comment';
Blockly.Msg.REMOVE_COMMENT = 'Remove Comment';
Blockly.Msg.DELETE_BLOCK = 'Delete Block';
Blockly.Msg.DELETE_X_BLOCKS = 'Delete %1 Blocks';
Blockly.Msg.DELETE_ALL_BLOCKS = 'Delete all %1 blocks?';
Blockly.Msg.CLEAN_UP = 'Clean up Blocks';
Blockly.Msg.HELP = 'Help';
Blockly.Msg.UNDO = 'Undo';
Blockly.Msg.REDO = 'Redo';
Blockly.Msg.EDIT_PROCEDURE = 'Edit';
Blockly.Msg.SHOW_PROCEDURE_DEFINITION = 'Go to definition';
Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT = 'Say something...';
// Color
Blockly.Msg.COLOUR_HUE_LABEL = "Color";
Blockly.Msg.COLOUR_SATURATION_LABEL = "Saturation";
Blockly.Msg.COLOUR_BRIGHTNESS_LABEL = "Brightness";
Blockly.Msg.COLOUR_HUE_LABEL = 'Color';
Blockly.Msg.COLOUR_SATURATION_LABEL = 'Saturation';
Blockly.Msg.COLOUR_BRIGHTNESS_LABEL = 'Brightness';
// Variables
// @todo Remove these once fully managed by Scratch VM / Scratch GUI
Blockly.Msg.CHANGE_VALUE_TITLE = "Change value:";
Blockly.Msg.RENAME_VARIABLE = "Rename variable";
Blockly.Msg.RENAME_VARIABLE_TITLE = "Rename all '%1' variables to:";
Blockly.Msg.RENAME_VARIABLE_MODAL_TITLE = "Rename Variable";
Blockly.Msg.NEW_VARIABLE = "Make a Variable";
Blockly.Msg.NEW_VARIABLE_TITLE = "New variable name:";
Blockly.Msg.VARIABLE_MODAL_TITLE = "New Variable";
Blockly.Msg.VARIABLE_ALREADY_EXISTS = "A variable named '%1' already exists.";
Blockly.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE = "A variable named '%1' already exists for another variable of type '%2'.";
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "Delete %1 uses of the '%2' variable?";
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'";
Blockly.Msg.DELETE_VARIABLE = "Delete the '%1' variable";
Blockly.Msg.CHANGE_VALUE_TITLE = 'Change value:';
Blockly.Msg.RENAME_VARIABLE = 'Rename variable';
Blockly.Msg.RENAME_VARIABLE_TITLE = 'Rename all "%1" variables to:';
Blockly.Msg.RENAME_VARIABLE_MODAL_TITLE = 'Rename Variable';
Blockly.Msg.NEW_VARIABLE = 'Make a Variable';
Blockly.Msg.NEW_VARIABLE_TITLE = 'New variable name:';
Blockly.Msg.VARIABLE_MODAL_TITLE = 'New Variable';
Blockly.Msg.VARIABLE_ALREADY_EXISTS = 'A variable named "%1" already exists.';
Blockly.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE = 'A variable named "%1" already exists for another variable of type "%2".';
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = 'Delete %1 uses of the "%2" variable?';
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = 'Can\'t delete the variable "%1" because it\'s part of the definition of the function "%2"';
Blockly.Msg.DELETE_VARIABLE = 'Delete the "%1" variable';
// Custom Procedures
// @todo Remove these once fully managed by Scratch VM / Scratch GUI
Blockly.Msg.NEW_PROCEDURE = "Make a Block";
Blockly.Msg.PROCEDURE_ALREADY_EXISTS = "A procedure named '%1' already exists.";
Blockly.Msg.NEW_PROCEDURE = 'Make a Block';
Blockly.Msg.PROCEDURE_ALREADY_EXISTS = 'A procedure named "%1" already exists.';
// Lists
// @todo Remove these once fully managed by Scratch VM / Scratch GUI
Blockly.Msg.NEW_LIST = "Make a List";
Blockly.Msg.NEW_LIST_TITLE = "New list name:";
Blockly.Msg.LIST_MODAL_TITLE = "New List";
Blockly.Msg.LIST_ALREADY_EXISTS = "A list named '%1' already exists.";
Blockly.Msg.RENAME_LIST_TITLE = "Rename all '%1' lists to:";
Blockly.Msg.RENAME_LIST_MODAL_TITLE = "Rename List";
Blockly.Msg.NEW_LIST = 'Make a List';
Blockly.Msg.NEW_LIST_TITLE = 'New list name:';
Blockly.Msg.LIST_MODAL_TITLE = 'New List';
Blockly.Msg.LIST_ALREADY_EXISTS = 'A list named "%1" already exists.';
Blockly.Msg.RENAME_LIST_TITLE = 'Rename all "%1" lists to:';
Blockly.Msg.RENAME_LIST_MODAL_TITLE = 'Rename List';
// Broadcast Messages
// @todo Remove these once fully managed by Scratch VM / Scratch GUI
Blockly.Msg.NEW_BROADCAST_MESSAGE = "New message";
Blockly.Msg.NEW_BROADCAST_MESSAGE_TITLE = "New message name:";
Blockly.Msg.BROADCAST_MODAL_TITLE = "New Message";
Blockly.Msg.DEFAULT_BROADCAST_MESSAGE_NAME = "message1";
Blockly.Msg.NEW_BROADCAST_MESSAGE = 'New message';
Blockly.Msg.NEW_BROADCAST_MESSAGE_TITLE = 'New message name:';
Blockly.Msg.BROADCAST_MODAL_TITLE = 'New Message';
Blockly.Msg.DEFAULT_BROADCAST_MESSAGE_NAME = 'message1';

View file

@ -3,6 +3,7 @@
'use strict';
goog.provide('Blockly.ScratchMsgs.locales');
goog.require('Blockly.ScratchMsgs');
@ -1851,23 +1852,23 @@ Blockly.ScratchMsgs.locales["en"] =
"COLOUR_BRIGHTNESS_LABEL": "Brightness",
"CHANGE_VALUE_TITLE": "Change value:",
"RENAME_VARIABLE": "Rename variable",
"RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:",
"RENAME_VARIABLE_TITLE": "Rename all \"%1\" variables to:",
"RENAME_VARIABLE_MODAL_TITLE": "Rename Variable",
"NEW_VARIABLE": "Make a Variable",
"NEW_VARIABLE_TITLE": "New variable name:",
"VARIABLE_MODAL_TITLE": "New Variable",
"VARIABLE_ALREADY_EXISTS": "A variable named '%1' already exists.",
"VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "A variable named '%1' already exists for another variable of type '%2'.",
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the '%2' variable?",
"CANNOT_DELETE_VARIABLE_PROCEDURE": "Can't delete the variable '%1' because it's part of the definition of the function '%2'",
"DELETE_VARIABLE": "Delete the '%1' variable",
"VARIABLE_ALREADY_EXISTS": "A variable named \"%1\" already exists.",
"VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "A variable named \"%1\" already exists for another variable of type \"%2\".",
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the \"%2\" variable?",
"CANNOT_DELETE_VARIABLE_PROCEDURE": "Can't delete the variable \"%1\" because it's part of the definition of the function \"%2\"",
"DELETE_VARIABLE": "Delete the \"%1\" variable",
"NEW_PROCEDURE": "Make a Block",
"PROCEDURE_ALREADY_EXISTS": "A procedure named '%1' already exists.",
"PROCEDURE_ALREADY_EXISTS": "A procedure named \"%1\" already exists.",
"NEW_LIST": "Make a List",
"NEW_LIST_TITLE": "New list name:",
"LIST_MODAL_TITLE": "New List",
"LIST_ALREADY_EXISTS": "A list named '%1' already exists.",
"RENAME_LIST_TITLE": "Rename all '%1' lists to:",
"LIST_ALREADY_EXISTS": "A list named \"%1\" already exists.",
"RENAME_LIST_TITLE": "Rename all \"%1\" lists to:",
"RENAME_LIST_MODAL_TITLE": "Rename List",
"NEW_BROADCAST_MESSAGE": "New message",
"NEW_BROADCAST_MESSAGE_TITLE": "New message name:",
@ -2004,7 +2005,7 @@ Blockly.ScratchMsgs.locales["es-419"] =
"MOTION_ALIGNSCENE_TOPLEFT": "arriba-izquierda",
"MOTION_ALIGNSCENE_TOPRIGHT": "arriba-derecha",
"MOTION_XSCROLL": "desplazar x",
"MOTION_YSCROLL": "desplazar y\n",
"MOTION_YSCROLL": "desplazar y",
"OPERATORS_ADD": "%1 + %2",
"OPERATORS_SUBTRACT": "%1 - %2",
"OPERATORS_MULTIPLY": "%1 * %2",

View file

@ -17,7 +17,7 @@
"test:setup": "tests/scripts/test_setup.sh",
"test:unit": "node tests/jsunit/test_runner.js",
"test:lint": "eslint .",
"test": "npm run test:lint && npm run test:setup && npm run test:unit && npm run translate",
"test": "npm run test:lint && npm run translate && npm run test:setup && npm run test:unit",
"version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\"",
"translate": "node i18n/js_to_json.js && node i18n/json_to_js.js && node i18n/create_scratch_msgs.js"
},