From cc9b490bf9f5c22db9febaa73f167658c5b169da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 16 Jun 2016 08:03:57 +0200 Subject: [PATCH 1/3] Localisation updates from https://translatewiki.net. --- msg/json/cs.json | 7 ++++++- msg/json/zh-hans.json | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/msg/json/cs.json b/msg/json/cs.json index 5d76921d6..29136d340 100644 --- a/msg/json/cs.json +++ b/msg/json/cs.json @@ -8,7 +8,8 @@ "Utar", "Clon", "Koo6", - "Vtmarvin" + "Vtmarvin", + "Dvorapa" ] }, "VARIABLES_DEFAULT_NAME": "položka", @@ -291,9 +292,13 @@ "LISTS_GET_SUBLIST_END_LAST": "jako poslední", "LISTS_GET_SUBLIST_TOOLTIP": "Vytvoří kopii určené části seznamu.", "LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list", + "LISTS_SORT_TITLE": "seřadit %1 %2 %3", + "LISTS_SORT_TOOLTIP": "Seřadit kopii seznamu.", "LISTS_SORT_ORDER_ASCENDING": "vzestupně", "LISTS_SORT_ORDER_DESCENDING": "sestupně", "LISTS_SORT_TYPE_NUMERIC": "číselné", + "LISTS_SORT_TYPE_TEXT": "abecedně", + "LISTS_SORT_TYPE_IGNORECASE": "abecedně, na velikosti písmen nezáleží", "LISTS_SPLIT_LIST_FROM_TEXT": "udělat z textu seznam", "LISTS_SPLIT_TEXT_FROM_LIST": "udělat ze seznamu text", "LISTS_SPLIT_WITH_DELIMITER": "s oddělovačem", diff --git a/msg/json/zh-hans.json b/msg/json/zh-hans.json index 67b58d996..a99ce5379 100644 --- a/msg/json/zh-hans.json +++ b/msg/json/zh-hans.json @@ -8,7 +8,8 @@ "Xiaomingyan", "Yfdyh000", "아라", - "Hudafu" + "Hudafu", + "Shatteredwind" ] }, "VARIABLES_DEFAULT_NAME": "项目", @@ -204,7 +205,7 @@ "TEXT_GET_SUBSTRING_TOOLTIP": "返回指定的部分文本。", "TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "自文本", "TEXT_GET_SUBSTRING_START_FROM_START": "取得一段字串自#", - "TEXT_GET_SUBSTRING_START_FROM_END": "取得一段字串自#到末尾", + "TEXT_GET_SUBSTRING_START_FROM_END": "取得一段字串自倒数第#个字符", "TEXT_GET_SUBSTRING_START_FIRST": "取得一段字串自第一个字符", "TEXT_GET_SUBSTRING_END_FROM_START": "到字符#", "TEXT_GET_SUBSTRING_END_FROM_END": "到倒数第#个字符", From 567fe6a2e8702094879db79bf65a5d980186c6b3 Mon Sep 17 00:00:00 2001 From: picklesrus Date: Fri, 17 Jun 2016 14:33:23 -0700 Subject: [PATCH 2/3] Call svgResizeContents from block_svg's dipose so that deleting blocks (#434) from the context menu (or anywhere really) causes the workspace to recalculate its size. Remove the call to svgResizeContents from onMouseUp's logic for determining whether the block is being dropped in the trash since it calls dispose. One side effect of this is that when you delete multiple blocks resize gets called for each of them and the scrollbars move during the operation. This is most obviously seen by doing an airstrike in the playground and then deleting all the blocks at once. --- core/block_svg.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/core/block_svg.js b/core/block_svg.js index 8fc64f3a8..6a0df6f56 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -610,14 +610,7 @@ Blockly.BlockSvg.prototype.onMouseUp_ = function(e) { if (trashcan) { goog.Timer.callOnce(trashcan.close, 100, trashcan); } - // Save the block's workspace temporarily so we can resize the - // contents once the block is disposed. - var selectedWorkspace = Blockly.selected.workspace; Blockly.selected.dispose(false, true); - // Dropping a block on the trash can will usually cause the workspace to - // resize to contain the newly positioned block. Force a second resize - // now that the block has been deleted. - Blockly.resizeSvgContents(selectedWorkspace); } if (Blockly.highlightedConnection_) { Blockly.highlightedConnection_.unhighlight(); @@ -986,6 +979,9 @@ Blockly.BlockSvg.prototype.getSvgRoot = function() { Blockly.BlockSvg.prototype.dispose = function(healStack, animate) { Blockly.Tooltip.hide(); Blockly.Field.startCache(); + // Save the block's workspace temporarily so we can resize the + // contents once the block is disposed. + var blockWorkspace = this.workspace; // If this block is being dragged, unlink the mouse events. if (Blockly.selected == this) { this.unselect(); @@ -1012,6 +1008,7 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate) { Blockly.BlockSvg.superClass_.dispose.call(this, healStack); goog.dom.removeNode(this.svgGroup_); + Blockly.resizeSvgContents(blockWorkspace); // Sever JavaScript to DOM connections. this.svgGroup_ = null; this.svgPath_ = null; From 383dd5d9adb0dc46a31e7d951597c0f07f1098ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 20 Jun 2016 07:44:12 +0200 Subject: [PATCH 3/3] Localisation updates from https://translatewiki.net. --- msg/json/be-tarask.json | 1 + 1 file changed, 1 insertion(+) diff --git a/msg/json/be-tarask.json b/msg/json/be-tarask.json index 3117f514a..b08f882e4 100644 --- a/msg/json/be-tarask.json +++ b/msg/json/be-tarask.json @@ -279,6 +279,7 @@ "LISTS_SORT_ORDER_ASCENDING": "па павелічэньні", "LISTS_SORT_ORDER_DESCENDING": "па зьмяншэньні", "LISTS_SORT_TYPE_NUMERIC": "як лікі", + "LISTS_SORT_TYPE_TEXT": "паводле альфабэту", "LISTS_SPLIT_LIST_FROM_TEXT": "стварыць сьпіс з тэксту", "LISTS_SPLIT_TEXT_FROM_LIST": "стварыць тэкст са сьпісу", "LISTS_SPLIT_WITH_DELIMITER": "з падзяляльнікам",