From 33201a249427bdf339316ddcef050b72c842c388 Mon Sep 17 00:00:00 2001 From: Paul Siersma Date: Thu, 13 Oct 2022 12:15:11 +0200 Subject: [PATCH] Fix regressions in translations and block appearance --- blocks/logic.js | 398 +++++++++++++++++++++-------------------- msg/json/en.json | 9 +- msg/json/nl.json | 19 +- msg/json/qqq.json | 32 ++-- msg/json/synonyms.json | 2 +- msg/messages.js | 8 +- package.json | 2 +- 7 files changed, 232 insertions(+), 238 deletions(-) diff --git a/blocks/logic.js b/blocks/logic.js index 5b226aaada8..810eb2444b4 100644 --- a/blocks/logic.js +++ b/blocks/logic.js @@ -41,202 +41,200 @@ goog.require('Blockly.FieldLabel'); * @type {!Object} */ const blocks = createBlockDefinitionsFromJsonArray([ - // Block for boolean data type: true and false. - { - 'type': 'logic_boolean', - 'message0': '%1', - 'args0': [ - { - 'type': 'field_dropdown', - 'name': 'BOOL', - 'options': [ - ['%{BKY_LOGIC_BOOLEAN_TRUE}', 'TRUE'], - ['%{BKY_LOGIC_BOOLEAN_FALSE}', 'FALSE'], - ], - }, - ], - 'output': 'Boolean', - 'style': 'numbers_blocks', - 'tooltip': '%{BKY_LOGIC_BOOLEAN_TOOLTIP}', - 'helpUrl': '%{BKY_LOGIC_BOOLEAN_HELPURL}', - }, - // Block for if/elseif/else condition. - { - 'type': 'controls_if', - 'message0': '%{BKY_CONTROLS_IF_MSG_IF} %1', - 'args0': [ - { - 'type': 'input_value', - 'name': 'IF0', - 'check': 'Boolean', - }, - ], - 'message1': '%{BKY_CONTROLS_IF_MSG_THEN} %1', - 'args1': [ - { - 'type': 'input_statement', - 'name': 'DO0', - }, - ], - 'previousStatement': null, - 'nextStatement': null, - 'style': 'situation_blocks', - 'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}', - 'suppressPrefixSuffix': true, - 'mutator': 'controls_if_mutator', - 'extensions': ['controls_if_tooltip'], - }, - // If/else block that does not use a mutator. - { - 'type': 'controls_ifelse', - 'message0': '%{BKY_CONTROLS_IF_MSG_IF} %1', - 'args0': [ - { - 'type': 'input_value', - 'name': 'IF0', - 'check': 'Boolean', - }, - ], - 'message1': '%{BKY_CONTROLS_IF_MSG_THEN} %1', - 'args1': [ - { - 'type': 'input_statement', - 'name': 'DO0', - }, - ], - 'message2': '%{BKY_CONTROLS_IF_MSG_ELSE} %1', - 'args2': [ - { - 'type': 'input_statement', - 'name': 'ELSE', - }, - ], - 'previousStatement': null, - 'nextStatement': null, - 'style': 'logic_blocks', - 'tooltip': '%{BKYCONTROLS_IF_TOOLTIP_2}', - 'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}', - 'suppressPrefixSuffix': true, - 'extensions': ['controls_if_tooltip'], - }, - // Block for comparison operator. - { - 'type': 'logic_compare', - 'message0': '%1 %2 %3', - 'args0': [ - { - 'type': 'input_value', - 'name': 'A', - }, - { - 'type': 'field_dropdown', - 'name': 'OP', - 'options': [ - ['=', 'EQ'], - ['\u2260', 'NEQ'], - ['\u200F<', 'LT'], - ['\u200F\u2264', 'LTE'], - ['\u200F>', 'GT'], - ['\u200F\u2265', 'GTE'], - ], - }, - { - 'type': 'input_value', - 'name': 'B', - }, - ], - 'inputsInline': true, - 'output': 'Boolean', - 'style': 'numbers_blocks', - 'helpUrl': '%{BKY_LOGIC_COMPARE_HELPURL}', - 'extensions': ['logic_compare', 'logic_op_tooltip'], - }, - // Block for logical operations: 'and', 'or'. - { - 'type': 'logic_operation', - 'message0': '%1 %2 %3', - 'args0': [ - { - 'type': 'input_value', - 'name': 'A', - 'check': 'Boolean', - }, - { - 'type': 'field_dropdown', - 'name': 'OP', - 'options': [ - ['%{BKY_LOGIC_OPERATION_AND}', 'AND'], - ['%{BKY_LOGIC_OPERATION_OR}', 'OR'], - ], - }, - { - 'type': 'input_value', - 'name': 'B', - 'check': 'Boolean', - }, - ], - 'inputsInline': true, - 'output': 'Boolean', - 'style': 'numbers_blocks', - 'helpUrl': '%{BKY_LOGIC_OPERATION_HELPURL}', - 'extensions': ['logic_op_tooltip'], - }, - // Block for negation. - { - 'type': 'logic_negate', - 'message0': '%{BKY_LOGIC_NEGATE_TITLE}', - 'args0': [ - { - 'type': 'input_value', - 'name': 'BOOL', - 'check': 'Boolean', - }, - ], - 'output': 'Boolean', - 'style': 'numbers_blocks', - 'tooltip': '%{BKY_LOGIC_NEGATE_TOOLTIP}', - 'helpUrl': '%{BKY_LOGIC_NEGATE_HELPURL}', - }, - // Block for null data type. - { - 'type': 'logic_null', - 'message0': '%{BKY_LOGIC_NULL}', - 'output': null, - 'style': 'logic_blocks', - 'tooltip': '%{BKY_LOGIC_NULL_TOOLTIP}', - 'helpUrl': '%{BKY_LOGIC_NULL_HELPURL}', - }, - // Block for ternary operator. - { - 'type': 'logic_ternary', - 'message0': '%{BKY_LOGIC_TERNARY_CONDITION} %1', - 'args0': [ - { - 'type': 'input_value', - 'name': 'IF', - 'check': 'Boolean', - }, - ], - 'message1': '%{BKY_LOGIC_TERNARY_IF_TRUE} %1', - 'args1': [ - { - 'type': 'input_value', - 'name': 'THEN', - }, - ], - 'message2': '%{BKY_LOGIC_TERNARY_IF_FALSE} %1', - 'args2': [ - { - 'type': 'input_value', - 'name': 'ELSE', - }, - ], - 'output': null, - 'style': 'logic_blocks', - 'tooltip': '%{BKY_LOGIC_TERNARY_TOOLTIP}', - 'helpUrl': '%{BKY_LOGIC_TERNARY_HELPURL}', - 'extensions': ['logic_ternary'], - }, +// Block for boolean data type: true and false. +{ + 'type': 'logic_boolean', + 'message0': '%1', + 'args0': [ + { + 'type': 'field_dropdown', + 'name': 'BOOL', + 'options': [ + ['%{BKY_LOGIC_BOOLEAN_TRUE}', 'TRUE'], + ['%{BKY_LOGIC_BOOLEAN_FALSE}', 'FALSE'], + ], + }, + ], + 'output': 'Boolean', + 'style': 'numbers_blocks', + 'tooltip': '%{BKY_LOGIC_BOOLEAN_TOOLTIP}', + 'helpUrl': '%{BKY_LOGIC_BOOLEAN_HELPURL}', +}, +// Block for if/elseif/else condition. +{ + 'type': 'controls_if', + 'message0': '%{BKY_CONTROLS_IF_MSG_IF} %1 %{BKY_CONTROLS_IF_MSG_THEN} ', + 'args0': [ + { + 'type': 'input_value', + 'name': 'IF0', + 'check': 'Boolean' + }, + ], + 'message1': '%1', + 'args1': [ + { + 'type': 'input_statement', + 'name': 'DO0' + }, + ], + 'previousStatement': null, + 'nextStatement': null, + 'style': 'situation_blocks', + 'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}', + 'mutator': 'controls_if_mutator', + 'extensions': ['controls_if_tooltip'], +}, +// If/else block that does not use a mutator. +{ + 'type': 'controls_ifelse', + 'message0': '%{BKY_CONTROLS_IF_MSG_IF} %1', + 'args0': [ + { + 'type': 'input_value', + 'name': 'IF0', + 'check': 'Boolean', + }, + ], + 'message1': '%{BKY_CONTROLS_IF_MSG_THEN} %1', + 'args1': [ + { + 'type': 'input_statement', + 'name': 'DO0', + }, + ], + 'message2': '%{BKY_CONTROLS_IF_MSG_ELSE} %1', + 'args2': [ + { + 'type': 'input_statement', + 'name': 'ELSE', + }, + ], + 'previousStatement': null, + 'nextStatement': null, + 'style': 'logic_blocks', + 'tooltip': '%{BKYCONTROLS_IF_TOOLTIP_2}', + 'helpUrl': '%{BKY_CONTROLS_IF_HELPURL}', + 'extensions': ['controls_if_tooltip'], +}, +// Block for comparison operator. +{ + 'type': 'logic_compare', + 'message0': '%1 %2 %3', + 'args0': [ + { + 'type': 'input_value', + 'name': 'A', + }, + { + 'type': 'field_dropdown', + 'name': 'OP', + 'options': [ + ['=', 'EQ'], + ['\u2260', 'NEQ'], + ['\u200F<', 'LT'], + ['\u200F\u2264', 'LTE'], + ['\u200F>', 'GT'], + ['\u200F\u2265', 'GTE'], + ], + }, + { + 'type': 'input_value', + 'name': 'B', + }, + ], + 'inputsInline': true, + 'output': 'Boolean', + 'style': 'numbers_blocks', + 'helpUrl': '%{BKY_LOGIC_COMPARE_HELPURL}', + 'extensions': ['logic_compare', 'logic_op_tooltip'], +}, +// Block for logical operations: 'and', 'or'. +{ + 'type': 'logic_operation', + 'message0': '%1 %2 %3', + 'args0': [ + { + 'type': 'input_value', + 'name': 'A', + 'check': 'Boolean', + }, + { + 'type': 'field_dropdown', + 'name': 'OP', + 'options': [ + ['%{BKY_LOGIC_OPERATION_AND}', 'AND'], + ['%{BKY_LOGIC_OPERATION_OR}', 'OR'], + ], + }, + { + 'type': 'input_value', + 'name': 'B', + 'check': 'Boolean', + }, + ], + 'inputsInline': true, + 'output': 'Boolean', + 'style': 'numbers_blocks', + 'helpUrl': '%{BKY_LOGIC_OPERATION_HELPURL}', + 'extensions': ['logic_op_tooltip'], +}, +// Block for negation. +{ + 'type': 'logic_negate', + 'message0': '%{BKY_LOGIC_NEGATE_TITLE}', + 'args0': [ + { + 'type': 'input_value', + 'name': 'BOOL', + 'check': 'Boolean', + }, + ], + 'output': 'Boolean', + 'style': 'numbers_blocks', + 'tooltip': '%{BKY_LOGIC_NEGATE_TOOLTIP}', + 'helpUrl': '%{BKY_LOGIC_NEGATE_HELPURL}', +}, +// Block for null data type. +{ + 'type': 'logic_null', + 'message0': '%{BKY_LOGIC_NULL}', + 'output': null, + 'style': 'logic_blocks', + 'tooltip': '%{BKY_LOGIC_NULL_TOOLTIP}', + 'helpUrl': '%{BKY_LOGIC_NULL_HELPURL}', +}, +// Block for ternary operator. +{ + 'type': 'logic_ternary', + 'message0': '%{BKY_LOGIC_TERNARY_CONDITION} %1', + 'args0': [ + { + 'type': 'input_value', + 'name': 'IF', + 'check': 'Boolean', + }, + ], + 'message1': '%{BKY_LOGIC_TERNARY_IF_TRUE} %1', + 'args1': [ + { + 'type': 'input_value', + 'name': 'THEN', + }, + ], + 'message2': '%{BKY_LOGIC_TERNARY_IF_FALSE} %1', + 'args2': [ + { + 'type': 'input_value', + 'name': 'ELSE', + }, + ], + 'output': null, + 'style': 'logic_blocks', + 'tooltip': '%{BKY_LOGIC_TERNARY_TOOLTIP}', + 'helpUrl': '%{BKY_LOGIC_TERNARY_HELPURL}', + 'extensions': ['logic_ternary'], +}, // Block representing the if statement in the controls_if mutator. { 'type': 'controls_if_if', @@ -490,6 +488,9 @@ const CONTROLS_IF_MUTATOR_MIXIN = { if (this.getInput('ELSE')) { this.removeInput('ELSE'); } + if (this.getInput('ELSELABEL')) { + this.removeInput('ELSELABEL'); + } for (let i = 1; this.getInput('IF' + i); i++) { this.removeInput('IF' + i); this.removeInput('DO' + i); @@ -502,8 +503,9 @@ const CONTROLS_IF_MUTATOR_MIXIN = { Msg['CONTROLS_IF_MSG_THEN']); } if (this.elseCount_) { - this.appendStatementInput('ELSE').appendField( - Msg['CONTROLS_IF_MSG_ELSE']); + this.appendDummyInput('ELSELABEL') + .appendField(Msg['CONTROLS_IF_MSG_ELSE']); + this.appendStatementInput('ELSE'); } }, /** diff --git a/msg/json/en.json b/msg/json/en.json index 880bbf65b83..f6720bad0b4 100644 --- a/msg/json/en.json +++ b/msg/json/en.json @@ -1,7 +1,7 @@ { "@metadata": { "author": "Ellen Spertus ", - "lastupdated": "2022-09-19 09:48:58.906800", + "lastupdated": "2022-10-13 11:36:24.979208", "locale": "en", "messagedocumentation" : "qqq" }, @@ -138,7 +138,7 @@ "CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop", "CONTROLS_REPEAT_TITLE": "repeat %1 times", "CONTROLS_REPEAT_FOREVER_TITLE": "repeat forever", - "CONTROLS_REPEAT_INPUT_DO": "do", + "CONTROLS_REPEAT_INPUT_DO": "", "CONTROLS_REPEAT_TOOLTIP": "Do some statements several times.", "CONTROLS_WHILEUNTIL_HELPURL": "https://github.com/google/blockly/wiki/Loops#repeat", "CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "repeat while", @@ -165,6 +165,7 @@ "CONTROLS_IF_MSG_IF": "if", "CONTROLS_IF_MSG_ELSEIF": "else if", "CONTROLS_IF_MSG_ELSE": "else", + "CONTROLS_IF_MSG_THEN": "then", "CONTROLS_IF_IF_TOOLTIP": "Add, remove, or reorder sections to reconfigure this if block.", "CONTROLS_IF_ELSEIF_TOOLTIP": "Add a condition to the if block.", "CONTROLS_IF_ELSE_TOOLTIP": "Add a final, catch-all condition to the if block.", @@ -442,8 +443,8 @@ "VARIABLES_SET_TOOLTIP": "Sets this variable to be equal to the input.", "VARIABLES_SET_CREATE_GET": "Create 'get %1'", "PROCEDURES_DEFNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Subroutine", - "PROCEDURES_DEFNORETURN_TITLE": "to", - "PROCEDURES_DEFNORETURN_PROCEDURE": "do something", + "PROCEDURES_DEFNORETURN_TITLE": "Subprogram", + "PROCEDURES_DEFNORETURN_PROCEDURE": "name", "PROCEDURES_BEFORE_PARAMS": "with:", "PROCEDURES_CALL_BEFORE_PARAMS": "with:", "PROCEDURES_DEFNORETURN_DO": "", diff --git a/msg/json/nl.json b/msg/json/nl.json index 3876759d492..d3489061b7b 100644 --- a/msg/json/nl.json +++ b/msg/json/nl.json @@ -132,8 +132,8 @@ "COLOUR_BLEND_RATIO": "verhouding", "COLOUR_BLEND_TOOLTIP": "Mengt twee kleuren samen met een bepaalde verhouding (0.0 - 1.0).", "CONTROLS_REPEAT_HELPURL": "https://nl.wikipedia.org/wiki/Repetitie_(informatica)#For_en_Foreach", - "CONTROLS_REPEAT_TITLE": "%1 keer herhalen", - "CONTROLS_REPEAT_INPUT_DO": "voer uit", + "CONTROLS_REPEAT_TITLE": "herhaal %1 keer", + "CONTROLS_REPEAT_INPUT_DO": "", "CONTROLS_REPEAT_TOOLTIP": "Voer een aantal opdrachten meerdere keren uit.", "CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "herhalen zolang", "CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "herhalen totdat", @@ -153,6 +153,7 @@ "CONTROLS_IF_TOOLTIP_3": "Als de eerste waarde waar is, voer dan het eerste blok met opdrachten uit. Voer anders, als de tweede waarde waar is, het tweede blok met opdrachten uit.", "CONTROLS_IF_TOOLTIP_4": "Als de eerste waarde \"waar\" is, voer dan het eerste blok uit. Voer anders wanneer de tweede waarde \"waar\" is, het tweede blok uit. Als geen van beide waarden waar zijn, voer dan het laatste blok uit.", "CONTROLS_IF_MSG_IF": "als", + "CONTROLS_IF_MSG_THEN": "dan", "CONTROLS_IF_MSG_ELSEIF": "anders als", "CONTROLS_IF_MSG_ELSE": "anders", "CONTROLS_IF_IF_TOOLTIP": "Voeg stukken toe, verwijder of wijzig de volgorde om dit \"als\"-blok te wijzigen.", @@ -171,8 +172,8 @@ "LOGIC_OPERATION_OR": "of", "LOGIC_NEGATE_TITLE": "niet %1", "LOGIC_NEGATE_TOOLTIP": "Geeft \"waar\" terug als de invoer \"onwaar\" is. Geeft \"onwaar\" als de invoer \"waar\" is.", - "LOGIC_BOOLEAN_TRUE": "waar", - "LOGIC_BOOLEAN_FALSE": "onwaar", + "LOGIC_BOOLEAN_TRUE": "1", + "LOGIC_BOOLEAN_FALSE": "0", "LOGIC_BOOLEAN_TOOLTIP": "Geeft \"waar\" of \"onwaar\" terug.", "LOGIC_NULL": "niets", "LOGIC_NULL_TOOLTIP": "Geeft niets terug.", @@ -221,7 +222,7 @@ "MATH_IS_NEGATIVE": "is negatief", "MATH_IS_DIVISIBLE_BY": "is deelbaar door", "MATH_IS_TOOLTIP": "Test of een getal even, oneven, een priemgetal, geheel, positief of negatief is, of deelbaar is door een bepaald getal. Geeft \"waar\" of \"onwaar\".", - "MATH_CHANGE_TITLE": "%1 wijzigen met %2", + "MATH_CHANGE_TITLE": "wijzig %1 met %2", "MATH_CHANGE_TOOLTIP": "Voegt een getal toe aan variabele \"%1\".", "MATH_ROUND_HELPURL": "https://nl.wikipedia.org/wiki/Afronden", "MATH_ROUND_TOOLTIP": "Rondt een getal af omhoog of naar beneden.", @@ -250,7 +251,7 @@ "MATH_CONSTRAIN_TITLE": "beperk %1 van minimaal %2 tot maximaal %3", "MATH_CONSTRAIN_TOOLTIP": "Beperk een getal tussen de twee opgegeven limieten (inclusief).", "MATH_RANDOM_INT_HELPURL": "https://nl.wikipedia.org/wiki/Toevalsgenerator", - "MATH_RANDOM_INT_TITLE": "willekeurig geheel getal van %1 tot %2", + "MATH_RANDOM_INT_TITLE": "willekeurig getal van %1 tot %2", "MATH_RANDOM_INT_TOOLTIP": "Geeft een willekeurig getal tussen de 2 opgegeven limieten in, inclusief.", "MATH_RANDOM_FLOAT_HELPURL": "https://nl.wikipedia.org/wiki/Toevalsgenerator", "MATH_RANDOM_FLOAT_TITLE_RANDOM": "willekeurige fractie", @@ -386,14 +387,14 @@ "VARIABLES_SET_TOOLTIP": "Verandert de waarde van de variabele naar de waarde van de invoer.", "VARIABLES_SET_CREATE_GET": "Maak 'opvragen van %1'", "PROCEDURES_DEFNORETURN_HELPURL": "https://nl.wikipedia.org/wiki/Subprogramma", - "PROCEDURES_DEFNORETURN_TITLE": "om", - "PROCEDURES_DEFNORETURN_PROCEDURE": "doe iets", + "PROCEDURES_DEFNORETURN_TITLE": "Subprogramma", + "PROCEDURES_DEFNORETURN_PROCEDURE": "naam", "PROCEDURES_BEFORE_PARAMS": "met:", "PROCEDURES_CALL_BEFORE_PARAMS": "met:", "PROCEDURES_DEFNORETURN_TOOLTIP": "Maakt een functie zonder uitvoer.", "PROCEDURES_DEFNORETURN_COMMENT": "Deze functie beschrijven...", "PROCEDURES_DEFRETURN_HELPURL": "https://nl.wikipedia.org/wiki/Subprogramma", - "PROCEDURES_DEFRETURN_RETURN": "uitvoeren", + "PROCEDURES_DEFRETURN_RETURN": "geef terug", "PROCEDURES_DEFRETURN_TOOLTIP": "Maakt een functie met een uitvoer.", "PROCEDURES_ALLOW_STATEMENTS": "statements toestaan", "PROCEDURES_DEF_DUPLICATE_WARNING": "Waarschuwing: deze functie heeft parameters met dezelfde naam.", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index 4b89255ec7f..ecc932c050d 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -1,15 +1,4 @@ { - "@metadata": { - "authors": [ - "Ajeje Brazorf", - "Amire80", - "Espertus", - "Liuxinyu970226", - "Metalhead64", - "Robby", - "Shirayuki" - ] - }, "LEAPHY_START": "leaphy start block title - The text that appears in the Leaphy start block.", "LEAPHY_ORIGINAL_CATEGORY": "leaphy Original Category title - The text that appears in the Leaphy Original Category.", "LEAPHY_CLICK_CATEGORY": "leaphy Click Category title - The text that appears in the Leaphy Click Category.", @@ -125,16 +114,16 @@ "DELETE_VARIABLE": "dropdown choice - Delete the currently selected variable.", "COLOUR_PICKER_HELPURL": "{{Optional}} url - Information about colour.", "COLOUR_PICKER_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette].", - "COLOUR_RANDOM_HELPURL": "{{Ignored}} url - A link that displays a random colour each time you visit it.", + "COLOUR_RANDOM_HELPURL": "{{Optional}} url - A link that displays a random colour each time you visit it.", "COLOUR_RANDOM_TITLE": "block text - Title of block that generates a colour at random.", "COLOUR_RANDOM_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Colour#generating-a-random-colour https://github.com/google/blockly/wiki/Colour#generating-a-random-colour].", - "COLOUR_RGB_HELPURL": "{{Ignored}} url - A link for colour codes with percentages (0-100%) for each component, instead of the more common 0-255, which may be more difficult for beginners.", + "COLOUR_RGB_HELPURL": "{{Optional}} url - A link for colour codes with percentages (0-100%) for each component, instead of the more common 0-255, which may be more difficult for beginners.", "COLOUR_RGB_TITLE": "block text - Title of block for [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].", "COLOUR_RGB_RED": "block input text - The amount of red (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].\n{{Identical|Red}}", "COLOUR_RGB_GREEN": "block input text - The amount of green (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].", "COLOUR_RGB_BLUE": "block input text - The amount of blue (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].\n{{Identical|Blue}}", "COLOUR_RGB_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].", - "COLOUR_BLEND_HELPURL": "{{Ignored}} url - A useful link that displays blending of two colours.", + "COLOUR_BLEND_HELPURL": "{{Optional}} url - A useful link that displays blending of two colours.", "COLOUR_BLEND_TITLE": "block text - A verb for blending two shades of paint.", "COLOUR_BLEND_COLOUR1": "block input text - The first of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend].", "COLOUR_BLEND_COLOUR2": "block input text - The second of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend].", @@ -170,6 +159,7 @@ "CONTROLS_IF_MSG_IF": "block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. It is recommended, but not essential, that this have text in common with the translation of 'else if'\n{{Identical|If}}", "CONTROLS_IF_MSG_ELSEIF": "block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English words 'otherwise if' would probably be clearer than 'else if', but the latter is used because it is traditional and shorter.", "CONTROLS_IF_MSG_ELSE": "block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English word 'otherwise' would probably be superior to 'else', but the latter is used because it is traditional and shorter.", + "CONTROLS_IF_MSG_THEN": "", "CONTROLS_IF_IF_TOOLTIP": "tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", "CONTROLS_IF_ELSEIF_TOOLTIP": "tooltip - Describes the 'else if' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", "CONTROLS_IF_ELSE_TOOLTIP": "tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", @@ -315,7 +305,7 @@ "TEXT_CHARAT_FIRST": "block text - Indicates that the first letter of the following piece of text should be retrieved. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_LAST": "block text - Indicates that the last letter (or number, punctuation mark, etc.) of the following piece of text should be retrieved. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_RANDOM": "block text - Indicates that any letter (or number, punctuation mark, etc.) in the following piece of text should be randomly selected. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", - "TEXT_CHARAT_TAIL": "{{Optional}}\nblock text - Text that goes after the rightmost block/dropdown when getting a single letter from a piece of text, as in [https://blockly-demo.appspot.com/static/apps/code/index.html#3m23km these blocks] or shown below. For most languages, this will be blank. [[File:Blockly-text-get.png]]", + "TEXT_CHARAT_TAIL": "block text - Text that goes after the rightmost block/dropdown when getting a single letter from a piece of text, as in [https://blockly-demo.appspot.com/static/apps/code/index.html#3m23km these blocks] or shown below. For most languages, this will be blank. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", "TEXT_GET_SUBSTRING_TOOLTIP": "See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].", "TEXT_GET_SUBSTRING_HELPURL": "{{Optional}} url - Information about extracting characters from text. Reminder: urls are the lowest priority translations. Feel free to skip.", @@ -326,7 +316,7 @@ "TEXT_GET_SUBSTRING_END_FROM_START": "dropdown - Indicates that the following number specifies the position (relative to the start position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_LAST": "block text - Indicates that a region ending with the last letter of the preceding piece of text should be extracted. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", - "TEXT_GET_SUBSTRING_TAIL": "{{Optional}}\nblock text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", + "TEXT_GET_SUBSTRING_TAIL": "block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", "TEXT_CHANGECASE_HELPURL": "{{Optional}} url - Information about the case of letters (upper-case and lower-case).", "TEXT_CHANGECASE_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "block text - Indicates that all of the letters in the following piece of text should be capitalized. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", @@ -364,7 +354,7 @@ "LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs].", "LISTS_CREATE_WITH_ITEM_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs].", "LISTS_REPEAT_HELPURL": "{{Optional}} url - Information about [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item].", - "LISTS_REPEAT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item].", + "LISTS_REPEAT_TOOLTIP": "{{Optional}} url - See [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item].", "LISTS_REPEAT_TITLE": "block text - See [https://github.com/google/blockly/wiki/Lists#create-list-with https://github.com/google/blockly/wiki/Lists#create-list-with]. \n\nParameters:\n* %1 - the item (text) to be repeated\n* %2 - the number of times to repeat it", "LISTS_LENGTH_HELPURL": "{{Optional}} url - Information about how the length of a list is computed (i.e., by the total number of elements, not the number of different elements).", "LISTS_LENGTH_TITLE": "block text - See [https://github.com/google/blockly/wiki/Lists#length-of https://github.com/google/blockly/wiki/Lists#length-of]. \n\nParameters:\n* %1 - the list whose length is desired", @@ -385,7 +375,7 @@ "LISTS_GET_INDEX_FIRST": "dropdown - Indicates that the '''first''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_LAST": "dropdown - Indicates that the '''last''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_RANDOM": "dropdown - Indicates that a '''random''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", - "LISTS_GET_INDEX_TAIL": "{{Optional}}\nblock text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessing an item from a list]. In most languages, this will be the empty string. [[File:Blockly-list-get-item.png]]", + "LISTS_GET_INDEX_TAIL": "block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessing an item from a list]. In most languages, this will be the empty string. [[File:Blockly-list-get-item.png]]", "LISTS_INDEX_FROM_START_TOOLTIP": "tooltip - Indicates the ordinal number that the first item in a list is referenced by. %1 will be replaced by either '#0' or '#1' depending on the indexing mode.", "LISTS_INDEX_FROM_END_TOOLTIP": "tooltip - Indicates the ordinal number that the last item in a list is referenced by. %1 will be replaced by either '#0' or '#1' depending on the indexing mode.", "LISTS_GET_INDEX_TOOLTIP_GET_FROM": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.", @@ -419,7 +409,7 @@ "LISTS_GET_SUBLIST_END_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to specify the end of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_END_FROM_END": "dropdown - Indicates that an index relative to the end of the list should be used to specify the end of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_END_LAST": "dropdown - Indicates that the '''last''' item in the given list should be [https://github.com/google/blockly/wiki/Lists#getting-a-sublist the end of the selected sublist]. [[File:Blockly-get-sublist.png]]", - "LISTS_GET_SUBLIST_TAIL": "{{Optional}}\nblock text - This appears in the rightmost position ('tail') of the sublist block, as described at [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist]. In English and most other languages, this is the empty string. [[File:Blockly-get-sublist.png]]", + "LISTS_GET_SUBLIST_TAIL": "block text - This appears in the rightmost position ('tail') of the sublist block, as described at [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist]. In English and most other languages, this is the empty string. [[File:Blockly-get-sublist.png]]", "LISTS_GET_SUBLIST_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-sublist https://github.com/google/blockly/wiki/Lists#getting-a-sublist] for more information. [[File:Blockly-get-sublist.png]]", "LISTS_SORT_HELPURL": "{{Optional}} url - Information describing sorting a list.", "LISTS_SORT_TITLE": "Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.\n{{Identical|Sort}}", @@ -438,7 +428,7 @@ "LISTS_REVERSE_HELPURL": "{{Optional}} url - Information describing reversing a list.", "LISTS_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of a list (%1) with the order of items reversed.", "LISTS_REVERSE_TOOLTIP": "tooltip - Short description for a block that reverses a copy of a list.", - "ORDINAL_NUMBER_SUFFIX": "{{Optional}}\ngrammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.", + "ORDINAL_NUMBER_SUFFIX": "grammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.", "VARIABLES_GET_HELPURL": "{{Optional}} url - Information about ''variables'' in computer programming. Consider using your language's translation of [https://en.wikipedia.org/wiki/Variable_(computer_science) https://en.wikipedia.org/wiki/Variable_(computer_science)], if it exists.", "VARIABLES_GET_TOOLTIP": "tooltip - This gets the value of the named variable without modifying it.", "VARIABLES_GET_CREATE_SET": "context menu - Selecting this creates a block to set (change) the value of this variable. \n\nParameters:\n* %1 - the name of the variable.", @@ -451,7 +441,7 @@ "PROCEDURES_DEFNORETURN_PROCEDURE": "default name - This acts as a placeholder for the name of a function on a function definition block, as shown on [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#w7cfju this block]. The user will replace it with the function's name.", "PROCEDURES_BEFORE_PARAMS": "block text - This precedes the list of parameters on a function's definition block. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function with parameters].", "PROCEDURES_CALL_BEFORE_PARAMS": "block text - This precedes the list of parameters on a function's caller block. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function with parameters].", - "PROCEDURES_DEFNORETURN_DO": "{{Optional}}\nblock text - This appears next to the function's 'body', the blocks that should be run when the function is called, as shown in [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function definition].", + "PROCEDURES_DEFNORETURN_DO": "block text - This appears next to the function's 'body', the blocks that should be run when the function is called, as shown in [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample function definition].", "PROCEDURES_DEFNORETURN_TOOLTIP": "tooltip", "PROCEDURES_DEFNORETURN_COMMENT": "Placeholder text that the user is encouraged to replace with a description of what their function does.", "PROCEDURES_DEFRETURN_HELPURL": "{{Optional}} url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that have return values.", diff --git a/msg/json/synonyms.json b/msg/json/synonyms.json index df3a96326f3..54175144a74 100644 --- a/msg/json/synonyms.json +++ b/msg/json/synonyms.json @@ -1 +1 @@ -{"CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "PROCEDURES_DEFRETURN_COMMENT": "PROCEDURES_DEFNORETURN_COMMENT"} \ No newline at end of file +{"CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "PROCEDURES_DEFRETURN_COMMENT": "PROCEDURES_DEFNORETURN_COMMENT"} \ No newline at end of file diff --git a/msg/messages.js b/msg/messages.js index 370622ed303..a0b464d7bbf 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -480,7 +480,7 @@ Blockly.Msg.CONTROLS_REPEAT_TITLE = 'repeat %1 times'; Blockly.Msg.CONTROLS_REPEAT_FOREVER_TITLE = 'repeat forever'; /** @type {string} */ /// block text - Preceding the blocks in the body of the loop. See [https://github.com/google/blockly/wiki/Loops https://github.com/google/blockly/wiki/Loops].\n{{Identical|Do}} -Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = 'do'; +Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = ''; /** @type {string} */ /// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat https://github.com/google/blockly/wiki/Loops#repeat]. Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = 'Do some statements several times.'; @@ -579,7 +579,7 @@ Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = 'else if'; /// block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English word "otherwise" would probably be superior to "else", but the latter is used because it is traditional and shorter. Blockly.Msg.CONTROLS_IF_MSG_ELSE = 'else'; /** @type {string} */ -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_MSG_THEN = 'then'; /** @type {string} */ Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; /** @type {string} */ @@ -1703,13 +1703,13 @@ Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = 'https://en.wikipedia.org/wiki/Subr /// block text - This precedes the name of the function when defining it. See /// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#c84aoc this sample /// function definition]. -Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = 'to'; +Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = 'Subprogram'; /** @type {string} */ /// default name - This acts as a placeholder for the name of a function on a /// function definition block, as shown on /// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#w7cfju this block]. /// The user will replace it with the function's name. -Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = 'do something'; +Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = 'name'; /** @type {string} */ /// block text - This precedes the list of parameters on a function's definition block. See /// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample diff --git a/package.json b/package.json index 95001a945fe..d02bc1118ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leaphy-blockly", - "version": "3.0.0", + "version": "3.0.1", "description": "Leaphy Blockly is an adaptation of the Blockly library for building visual programming editors.", "keywords": [ "blockly",