From 0f7907c680644f471fde44aa9f2ac26331ca35d8 Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Wed, 17 Aug 2016 16:08:38 -0700 Subject: [PATCH] Update variable-related messages --- blockly_compressed.js | 29 +++++++++++++++-------------- msg/js/ar.js | 3 ++- msg/js/az.js | 3 ++- msg/js/ba.js | 3 ++- msg/js/bcc.js | 3 ++- msg/js/be-tarask.js | 3 ++- msg/js/bg.js | 3 ++- msg/js/bn.js | 3 ++- msg/js/br.js | 3 ++- msg/js/ca.js | 3 ++- msg/js/cs.js | 3 ++- msg/js/da.js | 3 ++- msg/js/de.js | 3 ++- msg/js/diq.js | 3 ++- msg/js/el.js | 3 ++- msg/js/en.js | 5 +++-- msg/js/es.js | 3 ++- msg/js/fa.js | 3 ++- msg/js/fi.js | 3 ++- msg/js/fr.js | 3 ++- msg/js/he.js | 3 ++- msg/js/hi.js | 3 ++- msg/js/hrx.js | 3 ++- msg/js/hu.js | 3 ++- msg/js/ia.js | 3 ++- msg/js/id.js | 3 ++- msg/js/is.js | 3 ++- msg/js/it.js | 3 ++- msg/js/ja.js | 3 ++- msg/js/ko.js | 3 ++- msg/js/lb.js | 3 ++- msg/js/lki.js | 3 ++- msg/js/lrc.js | 3 ++- msg/js/lt.js | 3 ++- msg/js/mk.js | 3 ++- msg/js/ms.js | 3 ++- msg/js/nb.js | 3 ++- msg/js/nl.js | 3 ++- msg/js/oc.js | 3 ++- msg/js/pl.js | 3 ++- msg/js/pms.js | 3 ++- msg/js/pt-br.js | 3 ++- msg/js/pt.js | 3 ++- msg/js/ro.js | 3 ++- msg/js/ru.js | 3 ++- msg/js/sc.js | 3 ++- msg/js/sd.js | 3 ++- msg/js/shn.js | 3 ++- msg/js/sk.js | 3 ++- msg/js/sl.js | 3 ++- msg/js/sq.js | 3 ++- msg/js/sr.js | 3 ++- msg/js/sv.js | 3 ++- msg/js/ta.js | 3 ++- msg/js/tcy.js | 3 ++- msg/js/th.js | 3 ++- msg/js/tl.js | 3 ++- msg/js/tlh.js | 3 ++- msg/js/tr.js | 3 ++- msg/js/uk.js | 3 ++- msg/js/vi.js | 3 ++- msg/js/zh-hans.js | 3 ++- msg/js/zh-hant.js | 3 ++- msg/json/en.json | 7 ++++--- msg/json/qqq.json | 5 +++-- msg/messages.js | 12 ++++++++---- 66 files changed, 155 insertions(+), 86 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index a900fe285..7000e8e6f 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -867,8 +867,10 @@ Blockly.Workspace.prototype.dispose=function(){this.listeners_.length=0;this.cle Blockly.Workspace.prototype.removeTopBlock=function(a){for(var b=!1,c,d=0;c=this.topBlocks_[d];d++)if(c==a){this.topBlocks_.splice(d,1);b=!0;break}if(!b)throw"Block not present in workspace's list of top-most blocks.";}; Blockly.Workspace.prototype.getTopBlocks=function(a){var b=[].concat(this.topBlocks_);if(a&&1this.MAX_UNDO&&this.undoStack_.unshift());for(var b=0,c;c=this.listeners_[b];b++)c(a)}; Blockly.Workspace.prototype.getBlockById=function(a){return this.blockDB_[a]||null};Blockly.Workspace.WorkspaceDB_=Object.create(null);Blockly.Workspace.getById=function(a){return Blockly.Workspace.WorkspaceDB_[a]||null};Blockly.Workspace.prototype.clear=Blockly.Workspace.prototype.clear;Blockly.Workspace.prototype.clearUndo=Blockly.Workspace.prototype.clearUndo;Blockly.Workspace.prototype.addChangeListener=Blockly.Workspace.prototype.addChangeListener; @@ -1027,7 +1029,7 @@ Blockly.WorkspaceSvg.prototype.createDom=function(a){this.svgGroup_=Blockly.crea this.svgGroup_,this);a=Blockly.Scrollbar.scrollbarThickness;this.options.hasTrashcan&&(a=this.addTrashcan_(a));this.options.zoomOptions&&this.options.zoomOptions.controls&&(a=this.addZoomControls_(a));if(!this.isFlyout){Blockly.bindEvent_(this.svgGroup_,"mousedown",this,this.onMouseDown_);var b=this;Blockly.bindEvent_(this.svgGroup_,"touchstart",null,function(a){Blockly.longStart_(a,b)});this.options.zoomOptions&&this.options.zoomOptions.wheel&&Blockly.bindEvent_(this.svgGroup_,"wheel",this,this.onMouseWheel_)}this.options.hasCategories? this.toolbox_=new Blockly.Toolbox(this):this.options.languageTree&&this.addFlyout_();this.updateGridPattern_();this.recordDeleteAreas();return this.svgGroup_}; Blockly.WorkspaceSvg.prototype.dispose=function(){this.rendered=!1;Blockly.WorkspaceSvg.superClass_.dispose.call(this);this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.svgBubbleCanvas_=this.svgBlockCanvas_=null;this.toolbox_&&(this.toolbox_.dispose(),this.toolbox_=null);this.flyout_&&(this.flyout_.dispose(),this.flyout_=null);this.trashcan&&(this.trashcan.dispose(),this.trashcan=null);this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null);this.zoomControls_&& -(this.zoomControls_.dispose(),this.zoomControls_=null);this.options.parentWorkspace||goog.dom.removeNode(this.getParentSvg());this.resizeHandlerWrapper_&&(Blockly.unbindEvent_(this.resizeHandlerWrapper_),this.resizeHandlerWrapper_=null)};Blockly.WorkspaceSvg.prototype.newBlock=function(a,b){return new Blockly.BlockSvg(this,a,b)}; +(this.zoomControls_.dispose(),this.zoomControls_=null);this.options.parentWorkspace||goog.dom.removeNode(this.getParentSvg().parentNode);this.resizeHandlerWrapper_&&(Blockly.unbindEvent_(this.resizeHandlerWrapper_),this.resizeHandlerWrapper_=null)};Blockly.WorkspaceSvg.prototype.newBlock=function(a,b){return new Blockly.BlockSvg(this,a,b)}; Blockly.WorkspaceSvg.prototype.addTrashcan_=function(a){this.trashcan=new Blockly.Trashcan(this);var b=this.trashcan.createDom();this.svgGroup_.insertBefore(b,this.svgBlockCanvas_);return this.trashcan.init(a)};Blockly.WorkspaceSvg.prototype.addZoomControls_=function(a){this.zoomControls_=new Blockly.ZoomControls(this);var b=this.zoomControls_.createDom();this.svgGroup_.appendChild(b);return this.zoomControls_.init(a)}; Blockly.WorkspaceSvg.prototype.addFlyout_=function(){this.flyout_=new Blockly.Flyout({disabledPatternId:this.options.disabledPatternId,parentWorkspace:this,RTL:this.RTL,horizontalLayout:this.horizontalLayout,toolboxPosition:this.options.toolboxPosition});this.flyout_.autoClose=!1;var a=this.flyout_.createDom();this.svgGroup_.insertBefore(a,this.svgBlockCanvas_)};Blockly.WorkspaceSvg.prototype.resizeContents=function(){this.scrollbar&&this.scrollbar.resize();this.updateInverseScreenCTM()}; Blockly.WorkspaceSvg.prototype.resize=function(){this.toolbox_&&this.toolbox_.position();this.flyout_&&this.flyout_.position();this.trashcan&&this.trashcan.position();this.zoomControls_&&this.zoomControls_.position();this.scrollbar&&this.scrollbar.resize();this.updateInverseScreenCTM();this.recordDeleteAreas()};Blockly.WorkspaceSvg.prototype.getCanvas=function(){return this.svgBlockCanvas_};Blockly.WorkspaceSvg.prototype.getBubbleCanvas=function(){return this.svgBubbleCanvas_}; @@ -1280,17 +1282,16 @@ Blockly.FieldImage.prototype.init=function(){if(!this.fieldGroup_){this.fieldGro var a=this.rectElement_||this.imageElement_;a.tooltip=this.sourceBlock_;Blockly.Tooltip.bindMouseEvents(a)}};Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_);this.rectElement_=this.imageElement_=this.fieldGroup_=null};Blockly.FieldImage.prototype.setTooltip=function(a){(this.rectElement_||this.imageElement_).tooltip=a};Blockly.FieldImage.prototype.getValue=function(){return this.src_}; Blockly.FieldImage.prototype.setValue=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldNumber=function(a,b,c,d,e){a=String(a);Blockly.FieldNumber.superClass_.constructor.call(this,a,e);this.setConstraints(b,c,d)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.prototype.setConstraints=function(a,b,c){c=parseFloat(c);this.precision_=isNaN(c)?0:c;a=parseFloat(a);this.min_=isNaN(a)?-Infinity:a;b=parseFloat(b);this.max_=isNaN(b)?Infinity:b;this.setValue(this.callValidator(this.getValue()))}; Blockly.FieldNumber.prototype.classValidator=function(a){if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=parseFloat(a||0);if(isNaN(a))return null;this.precision_&&Number.isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);a=goog.math.clamp(a,this.min_,this.max_);return String(a)};Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allUsedVariables=function(a){var b;if(a instanceof Blockly.Block)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;c", - "lastupdated": "2016-08-16 16:49:03.565208", + "lastupdated": "2016-08-17 16:08:04.888607", "locale": "en", "messagedocumentation" : "qqq" }, @@ -26,10 +26,11 @@ "UNDO": "Undo", "REDO": "Redo", "CHANGE_VALUE_TITLE": "Change value:", - "NEW_VARIABLE": "Create variable...", - "NEW_VARIABLE_TITLE": "New variable name:", "RENAME_VARIABLE": "Rename variable...", "RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:", + "NEW_VARIABLE": "Create variable...", + "NEW_VARIABLE_TITLE": "New variable name:", + "VARIABLE_ALREADY_EXISTS": "A variable named '%1' already exists.", "DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the '%2' variable?", "DELETE_VARIABLE": "Delete the '%1' variable", "COLOUR_PICKER_HELPURL": "https://en.wikipedia.org/wiki/Color", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index d548c5339..f7ac9f42e 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -20,10 +20,11 @@ "UNDO": "context menu - Undo the previous action.\n{{Identical|Undo}}", "REDO": "context menu - Undo the previous undo action.\n{{Identical|Redo}}", "CHANGE_VALUE_TITLE": "prompt - This message is only seen in the Opera browser. With most browsers, users can edit numeric values in blocks by just clicking and typing. Opera does not allows this, so we have to open a new window and prompt users with this message to chanage a value.", - "NEW_VARIABLE": "button text - Text on the button used to launch the variable creation dialogue.", - "NEW_VARIABLE_TITLE": "prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].", "RENAME_VARIABLE": "dropdown choice - When the user clicks on a variable block, this is one of the dropdown menu choices. It is used to rename the current variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].", "RENAME_VARIABLE_TITLE": "prompt - Prompts the user to enter the new name for the selected variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].\n\nParameters:\n* %1 - the name of the variable to be renamed.", + "NEW_VARIABLE": "button text - Text on the button used to launch the variable creation dialogue.", + "NEW_VARIABLE_TITLE": "prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].", + "VARIABLE_ALREADY_EXISTS": "alert - Tells the user that the name they entered is already in use.", "DELETE_VARIABLE_CONFIRMATION": "confirm - Ask the user to confirm their deletion of multiple uses of a variable.", "DELETE_VARIABLE": "alert - Tell the user that they can't delete a variable because it's part of the definition of a procedure. dropdown choice - Delete the currently selected variable.", "COLOUR_PICKER_HELPURL": "url - Information about colour.", diff --git a/msg/messages.js b/msg/messages.js index 9b1d67dee..f4b05591c 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -96,15 +96,19 @@ Blockly.Msg.REDO = 'Redo'; // Variable renaming. /// prompt - This message is only seen in the Opera browser. With most browsers, users can edit numeric values in blocks by just clicking and typing. Opera does not allows this, so we have to open a new window and prompt users with this message to chanage a value. Blockly.Msg.CHANGE_VALUE_TITLE = 'Change value:'; -/// button text - Text on the button used to launch the variable creation dialogue. -Blockly.Msg.NEW_VARIABLE = 'Create variable...'; -/// prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu]. -Blockly.Msg.NEW_VARIABLE_TITLE = 'New variable name:'; /// dropdown choice - When the user clicks on a variable block, this is one of the dropdown menu choices. It is used to rename the current variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu]. Blockly.Msg.RENAME_VARIABLE = 'Rename variable...'; /// prompt - Prompts the user to enter the new name for the selected variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].\n\nParameters:\n* %1 - the name of the variable to be renamed. Blockly.Msg.RENAME_VARIABLE_TITLE = 'Rename all "%1" variables to:'; +// Variable creation +/// button text - Text on the button used to launch the variable creation dialogue. +Blockly.Msg.NEW_VARIABLE = 'Create variable...'; +/// prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu]. +Blockly.Msg.NEW_VARIABLE_TITLE = 'New variable name:'; +/// alert - Tells the user that the name they entered is already in use. +Blockly.Msg.VARIABLE_ALREADY_EXISTS = 'A variable named "%1" already exists.' + // Variable deletion. /// confirm - Ask the user to confirm their deletion of multiple uses of a variable. Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = 'Delete %1 uses of the "%2" variable?';