From f28928db83d8649891ab268304a63c013a16d527 Mon Sep 17 00:00:00 2001 From: Dan LaLiberte Date: Fri, 6 May 2016 10:35:05 -0400 Subject: [PATCH] Update pull request, mostly whitespace and comments. --- blocks/lists.js | 3 --- generators/javascript/lists.js | 6 +++--- generators/lua/lists.js | 2 +- generators/php/lists.js | 2 +- generators/python/lists.js | 2 +- msg/messages.js | 6 +++--- nbproject/project.properties | 3 --- nbproject/project.xml | 9 --------- 8 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 nbproject/project.properties delete mode 100644 nbproject/project.xml diff --git a/blocks/lists.js b/blocks/lists.js index 79f6226ae..4895dd256 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -650,7 +650,6 @@ Blockly.Blocks['lists_sort'] = { */ init: function() { this.jsonInit({ - "id": "list_sort", "message0": Blockly.Msg.LISTS_SORT_TITLE, "args0": [ { @@ -676,8 +675,6 @@ Blockly.Blocks['lists_sort'] = { "check": "Array" } ], - //"previousStatement": null, - //"nextStatement": null, "output": "Array", "colour": Blockly.Blocks.lists.HUE, "tooltip": Blockly.Msg.LISTS_SORT_TOOLTIP, diff --git a/generators/javascript/lists.js b/generators/javascript/lists.js index accbe28ba..c9115e9e4 100644 --- a/generators/javascript/lists.js +++ b/generators/javascript/lists.js @@ -311,12 +311,12 @@ Blockly.JavaScript['lists_sort'] = function(block) { ['function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ + '(type, direction) {', ' var compareFuncs = {', - ' "NUMERIC": function(a, b) { ', - ' return parseFloat(a) - parseFloat(b); }, ', + ' "NUMERIC": function(a, b) {', + ' return parseFloat(a) - parseFloat(b); },', ' "TEXT": function(a, b) {', ' return a.toString().localeCompare(b.toString(), "en"); },', ' "IGNORE_CASE": function(a, b) {', - ' return a.toString().localeCompare(b.toString(), "en", ', + ' return a.toString().localeCompare(b.toString(), "en",', ' {"sensitivity": "base"}); },', ' };', ' var compare = compareFuncs[type];', diff --git a/generators/lua/lists.js b/generators/lua/lists.js index 6212e10fd..0d4cfa4b1 100644 --- a/generators/lua/lists.js +++ b/generators/lua/lists.js @@ -352,7 +352,7 @@ Blockly.Lua['lists_sort'] = function(block) { 'end']); var code = functionName + - '(' + listCode + ',"' + type + '", ' + direction + ')'; + '(' + listCode + ',"' + type + '", ' + direction + ')'; return [code, Blockly.Lua.ORDER_HIGH]; }; diff --git a/generators/php/lists.js b/generators/php/lists.js index a23633554..d8685ca0e 100644 --- a/generators/php/lists.js +++ b/generators/php/lists.js @@ -380,7 +380,7 @@ Blockly.PHP['lists_sort'] = function(block) { ' return $list2;', '}']); var sortCode = functionName + - '(' + listCode + ', "' + type + '", ' + direction + ')'; + '(' + listCode + ', "' + type + '", ' + direction + ')'; return [sortCode, Blockly.PHP.ORDER_FUNCTION_CALL]; }; diff --git a/generators/python/lists.js b/generators/python/lists.js index c1caf1f80..43352c2c2 100644 --- a/generators/python/lists.js +++ b/generators/python/lists.js @@ -337,7 +337,7 @@ Blockly.Python['lists_sort'] = function(block) { ]); var code = sortFunctionName + - '(' + listCode + ', "' + type + '", ' + reverse + ')'; + '(' + listCode + ', "' + type + '", ' + reverse + ')'; return [code, Blockly.Python.ORDER_FUNCTION_CALL]; }; diff --git a/msg/messages.js b/msg/messages.js index ab982d7ee..9ee138ffa 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -975,12 +975,12 @@ Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ''; /// [[File:Blockly-get-sublist.png]] Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = 'Creates a copy of the specified portion of a list.'; -/// url - Infomation describing sorting a list. +/// url - Information describing sorting a list. Blockly.Msg.LISTS_SORT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#sorting-a-list'; -/// Sort as type %1 (numeric or alphabetic) in order %2 a list of items %1. +/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3. Blockly.Msg.LISTS_SORT_TITLE = 'sort %1 %2 %3'; /// tooltip - See [https://github.com/google/blockly/wiki/Lists#sorting-a-list]. -Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a list.'; +Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a copy of a list.'; /// sorting order or direction from low to high value for numeric, or A-Z for alphabetic. Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = 'ascending'; /// sorting order or direction from high to low value for numeric, or Z-A for alphabetic. diff --git a/nbproject/project.properties b/nbproject/project.properties deleted file mode 100644 index da97eba56..000000000 --- a/nbproject/project.properties +++ /dev/null @@ -1,3 +0,0 @@ -files.encoding=UTF-8 -site.root.folder= -source.folder= diff --git a/nbproject/project.xml b/nbproject/project.xml deleted file mode 100644 index dd637cd33..000000000 --- a/nbproject/project.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - org.netbeans.modules.web.clientproject - - - blockly - - -