From 7021b5bd05f9b19b9bc19912ae2c4ad88c15ee29 Mon Sep 17 00:00:00 2001 From: unknown <1371033826@qq.com> Date: Thu, 12 Dec 2024 15:06:45 +0800 Subject: [PATCH] lazy-load-blockly --- blockly/iot/IOT_Blocks.js | 1380 +++++++++++++++++++++++++++- blockly/iot/IOT_Generate.js | 783 ---------------- blockly/msg/js/en-gb.js | 423 --------- blockly/msg/js/en.js | 428 --------- blockly/msg/js/zh-hans.js | 568 ------------ blockly/msg/js/zh-hant.js | 430 --------- blockly/msg/json/en-gb.json | 225 ----- blockly/msg/json/en.json | 397 -------- blockly/msg/json/zh-hans.json | 387 -------- blockly/msg/json/zh-hant.json | 365 -------- blockly/msg/messages.js | 1598 --------------------------------- ejs/projects.ejs | 10 - js/projects.js | 340 +++---- js/widgets.js | 12 +- mixio.js | 44 + 15 files changed, 1604 insertions(+), 5786 deletions(-) delete mode 100644 blockly/iot/IOT_Generate.js delete mode 100644 blockly/msg/js/en-gb.js delete mode 100644 blockly/msg/js/en.js delete mode 100644 blockly/msg/js/zh-hans.js delete mode 100644 blockly/msg/js/zh-hant.js delete mode 100644 blockly/msg/json/en-gb.json delete mode 100644 blockly/msg/json/en.json delete mode 100644 blockly/msg/json/zh-hans.json delete mode 100644 blockly/msg/json/zh-hant.json delete mode 100644 blockly/msg/messages.js diff --git a/blockly/iot/IOT_Blocks.js b/blockly/iot/IOT_Blocks.js index f4861b7..b4e901f 100644 --- a/blockly/iot/IOT_Blocks.js +++ b/blockly/iot/IOT_Blocks.js @@ -1801,4 +1801,1382 @@ Blockly.Blocks['chat'] = { getVars:function(){ return ["result"]; } -}; \ No newline at end of file +}; + +Blockly.JavaScript.GET=function(block) { + var url = Blockly.JavaScript.valueToCode(this, 'url', Blockly.JavaScript.ORDER_ATOMIC); + var statement_code=Blockly.JavaScript.statementToCode(block, "DO0" ); + var code_piece=[]; + code_piece=statement_code.split("\n"); + for(var i=0;i= 0)){ + code_piece[i]=code_piece[i].replace(" "," "); + } + } + statement_code="" + for(var i=0;i= 0)){ + code_piece[i]=code_piece[i].replace(" "," "); + } + } + statement_code="" + for(var i=0;i= 0)){ + code_piece[i]=code_piece[i].replace(" "," "); + } + } + statement_code="" + for(var i=0;i= 0)){ + code_piece[i]=code_piece[i].replace(" "," "); + } + } + statement_code="" + for(var i=0;i= 0)){ - code_piece[i]=code_piece[i].replace(" "," "); - } - } - statement_code="" - for(var i=0;i= 0)){ - code_piece[i]=code_piece[i].replace(" "," "); - } - } - statement_code="" - for(var i=0;i= 0)){ - code_piece[i]=code_piece[i].replace(" "," "); - } - } - statement_code="" - for(var i=0;i= 0)){ - code_piece[i]=code_piece[i].replace(" "," "); - } - } - statement_code="" - for(var i=0;i", - "lastupdated": "2021-07-01 14:44:40.033432", - "locale": "en", - "messagedocumentation" : "qqq" - }, - "VARIABLES_DEFAULT_NAME": "item", - "UNNAMED_KEY": "unnamed", - "TODAY": "Today", - "DUPLICATE_BLOCK": "Duplicate", - "ADD_COMMENT": "Add Comment", - "REMOVE_COMMENT": "Remove Comment", - "DUPLICATE_COMMENT": "Duplicate Comment", - "EXTERNAL_INPUTS": "External Inputs", - "INLINE_INPUTS": "Inline Inputs", - "DELETE_BLOCK": "Delete Block", - "DELETE_X_BLOCKS": "Delete %1 Blocks", - "DELETE_ALL_BLOCKS": "Delete all %1 blocks?", - "CLEAN_UP": "Clean up Blocks", - "COLLAPSE_BLOCK": "Collapse Block", - "COLLAPSE_ALL": "Collapse Blocks", - "EXPAND_BLOCK": "Expand Block", - "EXPAND_ALL": "Expand Blocks", - "DISABLE_BLOCK": "Disable Block", - "ENABLE_BLOCK": "Enable Block", - "HELP": "Help", - "UNDO": "Undo", - "REDO": "Redo", - "CHANGE_VALUE_TITLE": "Change value:", - "RENAME_VARIABLE": "Rename variable...", - "RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:", - "NEW_VARIABLE": "Create variable...", - "NEW_STRING_VARIABLE": "Create string variable...", - "NEW_NUMBER_VARIABLE": "Create number variable...", - "NEW_COLOUR_VARIABLE": "Create colour variable...", - "NEW_VARIABLE_TYPE_TITLE": "New variable type:", - "NEW_VARIABLE_TITLE": "New variable name:", - "VARIABLE_ALREADY_EXISTS": "A variable named '%1' already exists.", - "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "A variable named '%1' already exists for another 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", - "COLOUR_PICKER_HELPURL": "https://en.wikipedia.org/wiki/Color", - "COLOUR_PICKER_TOOLTIP": "Choose a colour from the palette.", - "COLOUR_RANDOM_HELPURL": "http://randomcolour.com", - "COLOUR_RANDOM_TITLE": "random colour", - "COLOUR_RANDOM_TOOLTIP": "Choose a colour at random.", - "COLOUR_RGB_HELPURL": "https://www.december.com/html/spec/colorpercompact.html", - "COLOUR_RGB_TITLE": "colour with", - "COLOUR_RGB_RED": "red", - "COLOUR_RGB_GREEN": "green", - "COLOUR_RGB_BLUE": "blue", - "COLOUR_RGB_TOOLTIP": "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.", - "COLOUR_BLEND_HELPURL": "https://meyerweb.com/eric/tools/color-blend/#:::rgbp", - "COLOUR_BLEND_TITLE": "blend", - "COLOUR_BLEND_COLOUR1": "colour 1", - "COLOUR_BLEND_COLOUR2": "colour 2", - "COLOUR_BLEND_RATIO": "ratio", - "COLOUR_BLEND_TOOLTIP": "Blends two colours together with a given ratio (0.0 - 1.0).", - "CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop", - "CONTROLS_REPEAT_TITLE": "repeat %1 times", - "CONTROLS_REPEAT_INPUT_DO": "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", - "CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "repeat until", - "CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "While a value is true, then do some statements.", - "CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "While a value is false, then do some statements.", - "CONTROLS_FOR_HELPURL": "https://github.com/google/blockly/wiki/Loops#count-with", - "CONTROLS_FOR_TOOLTIP": "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.", - "CONTROLS_FOR_TITLE": "count with %1 from %2 to %3 by %4", - "CONTROLS_FOREACH_HELPURL": "https://github.com/google/blockly/wiki/Loops#for-each", - "CONTROLS_FOREACH_TITLE": "for each item %1 in list %2", - "CONTROLS_FOREACH_TOOLTIP": "For each item in a list, set the variable '%1' to the item, and then do some statements.", - "CONTROLS_FLOW_STATEMENTS_HELPURL": "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "break out of loop", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "continue with next iteration of loop", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Break out of the containing loop.", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Skip the rest of this loop, and continue with the next iteration.", - "CONTROLS_FLOW_STATEMENTS_WARNING": "Warning: This block may only be used within a loop.", - "CONTROLS_IF_HELPURL": "https://github.com/google/blockly/wiki/IfElse", - "CONTROLS_IF_TOOLTIP_1": "If a value is true, then do some statements.", - "CONTROLS_IF_TOOLTIP_2": "If a value is true, then do the first block of statements. Otherwise, do the second block of statements.", - "CONTROLS_IF_TOOLTIP_3": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.", - "CONTROLS_IF_TOOLTIP_4": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.", - "CONTROLS_IF_MSG_IF": "if", - "CONTROLS_IF_MSG_ELSEIF": "else if", - "CONTROLS_IF_MSG_ELSE": "else", - "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.", - "LOGIC_COMPARE_HELPURL": "https://en.wikipedia.org/wiki/Inequality_(mathematics)", - "LOGIC_COMPARE_TOOLTIP_EQ": "Return true if both inputs equal each other.", - "LOGIC_COMPARE_TOOLTIP_NEQ": "Return true if both inputs are not equal to each other.", - "LOGIC_COMPARE_TOOLTIP_LT": "Return true if the first input is smaller than the second input.", - "LOGIC_COMPARE_TOOLTIP_LTE": "Return true if the first input is smaller than or equal to the second input.", - "LOGIC_COMPARE_TOOLTIP_GT": "Return true if the first input is greater than the second input.", - "LOGIC_COMPARE_TOOLTIP_GTE": "Return true if the first input is greater than or equal to the second input.", - "LOGIC_OPERATION_HELPURL": "https://github.com/google/blockly/wiki/Logic#logical-operations", - "LOGIC_OPERATION_TOOLTIP_AND": "Return true if both inputs are true.", - "LOGIC_OPERATION_AND": "and", - "LOGIC_OPERATION_TOOLTIP_OR": "Return true if at least one of the inputs is true.", - "LOGIC_OPERATION_OR": "or", - "LOGIC_NEGATE_HELPURL": "https://github.com/google/blockly/wiki/Logic#not", - "LOGIC_NEGATE_TITLE": "not %1", - "LOGIC_NEGATE_TOOLTIP": "Returns true if the input is false. Returns false if the input is true.", - "LOGIC_BOOLEAN_HELPURL": "https://github.com/google/blockly/wiki/Logic#values", - "LOGIC_BOOLEAN_TRUE": "true", - "LOGIC_BOOLEAN_FALSE": "false", - "LOGIC_BOOLEAN_TOOLTIP": "Returns either true or false.", - "LOGIC_NULL_HELPURL": "https://en.wikipedia.org/wiki/Nullable_type", - "LOGIC_NULL": "null", - "LOGIC_NULL_TOOLTIP": "Returns null.", - "LOGIC_TERNARY_HELPURL": "https://en.wikipedia.org/wiki/%3F:", - "LOGIC_TERNARY_CONDITION": "test", - "LOGIC_TERNARY_IF_TRUE": "if true", - "LOGIC_TERNARY_IF_FALSE": "if false", - "LOGIC_TERNARY_TOOLTIP": "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.", - "MATH_NUMBER_HELPURL": "https://en.wikipedia.org/wiki/Number", - "MATH_NUMBER_TOOLTIP": "A number.", - "MATH_ADDITION_SYMBOL": "+", - "MATH_SUBTRACTION_SYMBOL": "-", - "MATH_DIVISION_SYMBOL": "÷", - "MATH_MULTIPLICATION_SYMBOL": "×", - "MATH_POWER_SYMBOL": "^", - "MATH_TRIG_SIN": "sin", - "MATH_TRIG_COS": "cos", - "MATH_TRIG_TAN": "tan", - "MATH_TRIG_ASIN": "asin", - "MATH_TRIG_ACOS": "acos", - "MATH_TRIG_ATAN": "atan", - "MATH_ARITHMETIC_HELPURL": "https://en.wikipedia.org/wiki/Arithmetic", - "MATH_ARITHMETIC_TOOLTIP_ADD": "Return the sum of the two numbers.", - "MATH_ARITHMETIC_TOOLTIP_MINUS": "Return the difference of the two numbers.", - "MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "Return the product of the two numbers.", - "MATH_ARITHMETIC_TOOLTIP_DIVIDE": "Return the quotient of the two numbers.", - "MATH_ARITHMETIC_TOOLTIP_POWER": "Return the first number raised to the power of the second number.", - "MATH_SINGLE_HELPURL": "https://en.wikipedia.org/wiki/Square_root", - "MATH_SINGLE_OP_ROOT": "square root", - "MATH_SINGLE_TOOLTIP_ROOT": "Return the square root of a number.", - "MATH_SINGLE_OP_ABSOLUTE": "absolute", - "MATH_SINGLE_TOOLTIP_ABS": "Return the absolute value of a number.", - "MATH_SINGLE_TOOLTIP_NEG": "Return the negation of a number.", - "MATH_SINGLE_TOOLTIP_LN": "Return the natural logarithm of a number.", - "MATH_SINGLE_TOOLTIP_LOG10": "Return the base 10 logarithm of a number.", - "MATH_SINGLE_TOOLTIP_EXP": "Return e to the power of a number.", - "MATH_SINGLE_TOOLTIP_POW10": "Return 10 to the power of a number.", - "MATH_TRIG_HELPURL": "https://en.wikipedia.org/wiki/Trigonometric_functions", - "MATH_TRIG_TOOLTIP_SIN": "Return the sine of a degree (not radian).", - "MATH_TRIG_TOOLTIP_COS": "Return the cosine of a degree (not radian).", - "MATH_TRIG_TOOLTIP_TAN": "Return the tangent of a degree (not radian).", - "MATH_TRIG_TOOLTIP_ASIN": "Return the arcsine of a number.", - "MATH_TRIG_TOOLTIP_ACOS": "Return the arccosine of a number.", - "MATH_TRIG_TOOLTIP_ATAN": "Return the arctangent of a number.", - "MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant", - "MATH_CONSTANT_TOOLTIP": "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).", - "MATH_IS_EVEN": "is even", - "MATH_IS_ODD": "is odd", - "MATH_IS_PRIME": "is prime", - "MATH_IS_WHOLE": "is whole", - "MATH_IS_POSITIVE": "is positive", - "MATH_IS_NEGATIVE": "is negative", - "MATH_IS_DIVISIBLE_BY": "is divisible by", - "MATH_IS_TOOLTIP": "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.", - "MATH_CHANGE_HELPURL": "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter", - "MATH_CHANGE_TITLE": "change %1 by %2", - "MATH_CHANGE_TOOLTIP": "Add a number to variable '%1'.", - "MATH_ROUND_HELPURL": "https://en.wikipedia.org/wiki/Rounding", - "MATH_ROUND_TOOLTIP": "Round a number up or down.", - "MATH_ROUND_OPERATOR_ROUND": "round", - "MATH_ROUND_OPERATOR_ROUNDUP": "round up", - "MATH_ROUND_OPERATOR_ROUNDDOWN": "round down", - "MATH_ONLIST_HELPURL": "", - "MATH_ONLIST_OPERATOR_SUM": "sum of list", - "MATH_ONLIST_TOOLTIP_SUM": "Return the sum of all the numbers in the list.", - "MATH_ONLIST_OPERATOR_MIN": "min of list", - "MATH_ONLIST_TOOLTIP_MIN": "Return the smallest number in the list.", - "MATH_ONLIST_OPERATOR_MAX": "max of list", - "MATH_ONLIST_TOOLTIP_MAX": "Return the largest number in the list.", - "MATH_ONLIST_OPERATOR_AVERAGE": "average of list", - "MATH_ONLIST_TOOLTIP_AVERAGE": "Return the average (arithmetic mean) of the numeric values in the list.", - "MATH_ONLIST_OPERATOR_MEDIAN": "median of list", - "MATH_ONLIST_TOOLTIP_MEDIAN": "Return the median number in the list.", - "MATH_ONLIST_OPERATOR_MODE": "modes of list", - "MATH_ONLIST_TOOLTIP_MODE": "Return a list of the most common item(s) in the list.", - "MATH_ONLIST_OPERATOR_STD_DEV": "standard deviation of list", - "MATH_ONLIST_TOOLTIP_STD_DEV": "Return the standard deviation of the list.", - "MATH_ONLIST_OPERATOR_RANDOM": "random item of list", - "MATH_ONLIST_TOOLTIP_RANDOM": "Return a random element from the list.", - "MATH_MODULO_HELPURL": "https://en.wikipedia.org/wiki/Modulo_operation", - "MATH_MODULO_TITLE": "remainder of %1 ÷ %2", - "MATH_MODULO_TOOLTIP": "Return the remainder from dividing the two numbers.", - "MATH_CONSTRAIN_HELPURL": "https://en.wikipedia.org/wiki/Clamping_(graphics)", - "MATH_CONSTRAIN_TITLE": "constrain %1 low %2 high %3", - "MATH_CONSTRAIN_TOOLTIP": "Constrain a number to be between the specified limits (inclusive).", - "MATH_RANDOM_INT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation", - "MATH_RANDOM_INT_TITLE": "random integer from %1 to %2", - "MATH_RANDOM_INT_TOOLTIP": "Return a random integer between the two specified limits, inclusive.", - "MATH_RANDOM_FLOAT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation", - "MATH_RANDOM_FLOAT_TITLE_RANDOM": "random fraction", - "MATH_RANDOM_FLOAT_TOOLTIP": "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).", - "MATH_ATAN2_HELPURL": "https://en.wikipedia.org/wiki/Atan2", - "MATH_ATAN2_TITLE": "atan2 of X:%1 Y:%2", - "MATH_ATAN2_TOOLTIP": "Return the arctangent of point (X, Y) in degrees from -180 to 180.", - "TEXT_TEXT_HELPURL": "https://en.wikipedia.org/wiki/String_(computer_science)", - "TEXT_TEXT_TOOLTIP": "A letter, word, or line of text.", - "TEXT_JOIN_HELPURL": "https://github.com/google/blockly/wiki/Text#text-creation", - "TEXT_JOIN_TITLE_CREATEWITH": "create text with", - "TEXT_JOIN_TOOLTIP": "Create a piece of text by joining together any number of items.", - "TEXT_CREATE_JOIN_TITLE_JOIN": "join", - "TEXT_CREATE_JOIN_TOOLTIP": "Add, remove, or reorder sections to reconfigure this text block.", - "TEXT_CREATE_JOIN_ITEM_TOOLTIP": "Add an item to the text.", - "TEXT_APPEND_HELPURL": "https://github.com/google/blockly/wiki/Text#text-modification", - "TEXT_APPEND_TITLE": "to %1 append text %2", - "TEXT_APPEND_TOOLTIP": "Append some text to variable '%1'.", - "TEXT_LENGTH_HELPURL": "https://github.com/google/blockly/wiki/Text#text-modification", - "TEXT_LENGTH_TITLE": "length of %1", - "TEXT_LENGTH_TOOLTIP": "Returns the number of letters (including spaces) in the provided text.", - "TEXT_ISEMPTY_HELPURL": "https://github.com/google/blockly/wiki/Text#checking-for-empty-text", - "TEXT_ISEMPTY_TITLE": "%1 is empty", - "TEXT_ISEMPTY_TOOLTIP": "Returns true if the provided text is empty.", - "TEXT_INDEXOF_HELPURL": "https://github.com/google/blockly/wiki/Text#finding-text", - "TEXT_INDEXOF_TOOLTIP": "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.", - "TEXT_INDEXOF_TITLE": "in text %1 %2 %3", - "TEXT_INDEXOF_OPERATOR_FIRST": "find first occurrence of text", - "TEXT_INDEXOF_OPERATOR_LAST": "find last occurrence of text", - "TEXT_CHARAT_HELPURL": "https://github.com/google/blockly/wiki/Text#extracting-text", - "TEXT_CHARAT_TITLE": "in text %1 %2", - "TEXT_CHARAT_FROM_START": "get letter #", - "TEXT_CHARAT_FROM_END": "get letter # from end", - "TEXT_CHARAT_FIRST": "get first letter", - "TEXT_CHARAT_LAST": "get last letter", - "TEXT_CHARAT_RANDOM": "get random letter", - "TEXT_CHARAT_TAIL": "", - "TEXT_CHARAT_TOOLTIP": "Returns the letter at the specified position.", - "TEXT_GET_SUBSTRING_TOOLTIP": "Returns a specified portion of the text.", - "TEXT_GET_SUBSTRING_HELPURL": "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text", - "TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "in text", - "TEXT_GET_SUBSTRING_START_FROM_START": "get substring from letter #", - "TEXT_GET_SUBSTRING_START_FROM_END": "get substring from letter # from end", - "TEXT_GET_SUBSTRING_START_FIRST": "get substring from first letter", - "TEXT_GET_SUBSTRING_END_FROM_START": "to letter #", - "TEXT_GET_SUBSTRING_END_FROM_END": "to letter # from end", - "TEXT_GET_SUBSTRING_END_LAST": "to last letter", - "TEXT_GET_SUBSTRING_TAIL": "", - "TEXT_CHANGECASE_HELPURL": "https://github.com/google/blockly/wiki/Text#adjusting-text-case", - "TEXT_CHANGECASE_TOOLTIP": "Return a copy of the text in a different case.", - "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "to UPPER CASE", - "TEXT_CHANGECASE_OPERATOR_LOWERCASE": "to lower case", - "TEXT_CHANGECASE_OPERATOR_TITLECASE": "to Title Case", - "TEXT_TRIM_HELPURL": "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces", - "TEXT_TRIM_TOOLTIP": "Return a copy of the text with spaces removed from one or both ends.", - "TEXT_TRIM_OPERATOR_BOTH": "trim spaces from both sides of", - "TEXT_TRIM_OPERATOR_LEFT": "trim spaces from left side of", - "TEXT_TRIM_OPERATOR_RIGHT": "trim spaces from right side of", - "TEXT_PRINT_HELPURL": "https://github.com/google/blockly/wiki/Text#printing-text", - "TEXT_PRINT_TITLE": "print %1", - "TEXT_PRINT_TOOLTIP": "Print the specified text, number or other value.", - "TEXT_PROMPT_HELPURL": "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user", - "TEXT_PROMPT_TYPE_TEXT": "prompt for text with message", - "TEXT_PROMPT_TYPE_NUMBER": "prompt for number with message", - "TEXT_PROMPT_TOOLTIP_NUMBER": "Prompt for user for a number.", - "TEXT_PROMPT_TOOLTIP_TEXT": "Prompt for user for some text.", - "TEXT_COUNT_MESSAGE0": "count %1 in %2", - "TEXT_COUNT_HELPURL": "https://github.com/google/blockly/wiki/Text#counting-substrings", - "TEXT_COUNT_TOOLTIP": "Count how many times some text occurs within some other text.", - "TEXT_REPLACE_MESSAGE0": "replace %1 with %2 in %3", - "TEXT_REPLACE_HELPURL": "https://github.com/google/blockly/wiki/Text#replacing-substrings", - "TEXT_REPLACE_TOOLTIP": "Replace all occurances of some text within some other text.", - "TEXT_REVERSE_MESSAGE0": "reverse %1", - "TEXT_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Text#reversing-text", - "TEXT_REVERSE_TOOLTIP": "Reverses the order of the characters in the text.", - "LISTS_CREATE_EMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-empty-list", - "LISTS_CREATE_EMPTY_TITLE": "create empty list", - "LISTS_CREATE_EMPTY_TOOLTIP": "Returns a list, of length 0, containing no data records", - "LISTS_CREATE_WITH_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-list-with", - "LISTS_CREATE_WITH_TOOLTIP": "Create a list with any number of items.", - "LISTS_CREATE_WITH_INPUT_WITH": "create list with", - "LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "list", - "LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "Add, remove, or reorder sections to reconfigure this list block.", - "LISTS_CREATE_WITH_ITEM_TOOLTIP": "Add an item to the list.", - "LISTS_REPEAT_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-list-with", - "LISTS_REPEAT_TOOLTIP": "Creates a list consisting of the given value repeated the specified number of times.", - "LISTS_REPEAT_TITLE": "create list with item %1 repeated %2 times", - "LISTS_LENGTH_HELPURL": "https://github.com/google/blockly/wiki/Lists#length-of", - "LISTS_LENGTH_TITLE": "length of %1", - "LISTS_LENGTH_TOOLTIP": "Returns the length of a list.", - "LISTS_ISEMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#is-empty", - "LISTS_ISEMPTY_TITLE": "%1 is empty", - "LISTS_ISEMPTY_TOOLTIP": "Returns true if the list is empty.", - "LISTS_INLIST": "in list", - "LISTS_INDEX_OF_HELPURL": "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list", - "LISTS_INDEX_OF_FIRST": "find first occurrence of item", - "LISTS_INDEX_OF_LAST": "find last occurrence of item", - "LISTS_INDEX_OF_TOOLTIP": "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.", - "LISTS_GET_INDEX_GET": "get", - "LISTS_GET_INDEX_GET_REMOVE": "get and remove", - "LISTS_GET_INDEX_REMOVE": "remove", - "LISTS_GET_INDEX_FROM_START": "#", - "LISTS_GET_INDEX_FROM_END": "# from end", - "LISTS_GET_INDEX_FIRST": "first", - "LISTS_GET_INDEX_LAST": "last", - "LISTS_GET_INDEX_RANDOM": "random", - "LISTS_GET_INDEX_TAIL": "", - "LISTS_INDEX_FROM_START_TOOLTIP": "%1 is the first item.", - "LISTS_INDEX_FROM_END_TOOLTIP": "%1 is the last item.", - "LISTS_GET_INDEX_TOOLTIP_GET_FROM": "Returns the item at the specified position in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "Returns the first item in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_LAST": "Returns the last item in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "Returns a random item in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM": "Removes and returns the item at the specified position in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "Removes and returns the first item in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "Removes and returns the last item in a list.", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "Removes and returns a random item in a list.", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM": "Removes the item at the specified position in a list.", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST": "Removes the first item in a list.", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST": "Removes the last item in a list.", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM": "Removes a random item in a list.", - "LISTS_SET_INDEX_HELPURL": "https://github.com/google/blockly/wiki/Lists#in-list--set", - "LISTS_SET_INDEX_SET": "set", - "LISTS_SET_INDEX_INSERT": "insert at", - "LISTS_SET_INDEX_INPUT_TO": "as", - "LISTS_SET_INDEX_TOOLTIP_SET_FROM": "Sets the item at the specified position in a list.", - "LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "Sets the first item in a list.", - "LISTS_SET_INDEX_TOOLTIP_SET_LAST": "Sets the last item in a list.", - "LISTS_SET_INDEX_TOOLTIP_SET_RANDOM": "Sets a random item in a list.", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FROM": "Inserts the item at the specified position in a list.", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST": "Inserts the item at the start of a list.", - "LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "Append the item to the end of a list.", - "LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "Inserts the item randomly in a list.", - "LISTS_GET_SUBLIST_HELPURL": "https://github.com/google/blockly/wiki/Lists#getting-a-sublist", - "LISTS_GET_SUBLIST_START_FROM_START": "get sub-list from #", - "LISTS_GET_SUBLIST_START_FROM_END": "get sub-list from # from end", - "LISTS_GET_SUBLIST_START_FIRST": "get sub-list from first", - "LISTS_GET_SUBLIST_END_FROM_START": "to #", - "LISTS_GET_SUBLIST_END_FROM_END": "to # from end", - "LISTS_GET_SUBLIST_END_LAST": "to last", - "LISTS_GET_SUBLIST_TAIL": "", - "LISTS_GET_SUBLIST_TOOLTIP": "Creates a copy of the specified portion of a list.", - "LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list", - "LISTS_SORT_TITLE": "sort %1 %2 %3", - "LISTS_SORT_TOOLTIP": "Sort a copy of a list.", - "LISTS_SORT_ORDER_ASCENDING": "ascending", - "LISTS_SORT_ORDER_DESCENDING": "descending", - "LISTS_SORT_TYPE_NUMERIC": "numeric", - "LISTS_SORT_TYPE_TEXT": "alphabetic", - "LISTS_SORT_TYPE_IGNORECASE": "alphabetic, ignore case", - "LISTS_SPLIT_HELPURL": "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists", - "LISTS_SPLIT_LIST_FROM_TEXT": "make list from text", - "LISTS_SPLIT_TEXT_FROM_LIST": "make text from list", - "LISTS_SPLIT_WITH_DELIMITER": "with delimiter", - "LISTS_SPLIT_TOOLTIP_SPLIT": "Split text into a list of texts, breaking at each delimiter.", - "LISTS_SPLIT_TOOLTIP_JOIN": "Join a list of texts into one text, separated by a delimiter.", - "LISTS_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Lists#reversing-a-list", - "LISTS_REVERSE_MESSAGE0": "reverse %1", - "LISTS_REVERSE_TOOLTIP": "Reverse a copy of a list.", - "ORDINAL_NUMBER_SUFFIX": "", - "VARIABLES_GET_HELPURL": "https://github.com/google/blockly/wiki/Variables#get", - "VARIABLES_GET_TOOLTIP": "Returns the value of this variable.", - "VARIABLES_GET_CREATE_SET": "Create 'set %1'", - "VARIABLES_SET_HELPURL": "https://github.com/google/blockly/wiki/Variables#set", - "VARIABLES_SET": "set %1 to %2", - "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_BEFORE_PARAMS": "with:", - "PROCEDURES_CALL_BEFORE_PARAMS": "with:", - "PROCEDURES_DEFNORETURN_DO": "", - "PROCEDURES_DEFNORETURN_TOOLTIP": "Creates a function with no output.", - "PROCEDURES_DEFNORETURN_COMMENT": "Describe this function...", - "PROCEDURES_DEFRETURN_HELPURL": "https://en.wikipedia.org/wiki/Subroutine", - "PROCEDURES_DEFRETURN_RETURN": "return", - "PROCEDURES_DEFRETURN_TOOLTIP": "Creates a function with an output.", - "PROCEDURES_ALLOW_STATEMENTS": "allow statements", - "PROCEDURES_DEF_DUPLICATE_WARNING": "Warning: This function has duplicate parameters.", - "PROCEDURES_CALLNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Subroutine", - "PROCEDURES_CALLNORETURN_TOOLTIP": "Run the user-defined function '%1'.", - "PROCEDURES_CALLRETURN_HELPURL": "https://en.wikipedia.org/wiki/Subroutine", - "PROCEDURES_CALLRETURN_TOOLTIP": "Run the user-defined function '%1' and use its output.", - "PROCEDURES_MUTATORCONTAINER_TITLE": "inputs", - "PROCEDURES_MUTATORCONTAINER_TOOLTIP": "Add, remove, or reorder inputs to this function.", - "PROCEDURES_MUTATORARG_TITLE": "input name:", - "PROCEDURES_MUTATORARG_TOOLTIP": "Add an input to the function.", - "PROCEDURES_HIGHLIGHT_DEF": "Highlight function definition", - "PROCEDURES_CREATE_DO": "Create '%1'", - "PROCEDURES_IFRETURN_TOOLTIP": "If a value is true, then return a second value.", - "PROCEDURES_IFRETURN_HELPURL": "http://c2.com/cgi/wiki?GuardClause", - "PROCEDURES_IFRETURN_WARNING": "Warning: This block may be used only within a function definition.", - "WORKSPACE_COMMENT_DEFAULT_TEXT": "Say something...", - "WORKSPACE_ARIA_LABEL": "Blockly Workspace", - "COLLAPSED_WARNINGS_WARNING": "Collapsed blocks contain warnings.", - "DIALOG_OK": "OK", - "DIALOG_CANCEL": "Cancel" -} diff --git a/blockly/msg/json/zh-hans.json b/blockly/msg/json/zh-hans.json deleted file mode 100644 index db2eddc..0000000 --- a/blockly/msg/json/zh-hans.json +++ /dev/null @@ -1,387 +0,0 @@ -{ - "@metadata": { - "authors": [ - ")8", - "A Chinese Wikipedian", - "Ambeta", - "DGCK81LNN", - "Deathkon", - "Duzc2", - "Espertus", - "Htq110219891", - "Hudafu", - "Liuxinyu970226", - "Luotiancheng", - "Muhaoying", - "Qiyue2001", - "Shatteredwind", - "Shimamura Sakura", - "Tonylianlong", - "WindWood", - "Xiaomingyan", - "Yfdyh000", - "佛壁灯", - "沈澄心", - "아라" - ] - }, - "VARIABLES_DEFAULT_NAME": "项目", - "UNNAMED_KEY": "未命名", - "TODAY": "今天", - "DUPLICATE_BLOCK": "复制", - "ADD_COMMENT": "添加注释", - "REMOVE_COMMENT": "删除注释", - "DUPLICATE_COMMENT": "复制注释", - "EXTERNAL_INPUTS": "外部输入", - "INLINE_INPUTS": "单行输入", - "DELETE_BLOCK": "删除块", - "DELETE_X_BLOCKS": "删除 %1 个块", - "DELETE_ALL_BLOCKS": "删除所有 %1 个块吗?", - "CLEAN_UP": "整理块", - "COLLAPSE_BLOCK": "折叠块", - "COLLAPSE_ALL": "折叠块", - "EXPAND_BLOCK": "展开块", - "EXPAND_ALL": "展开块", - "DISABLE_BLOCK": "禁用块", - "ENABLE_BLOCK": "启用块", - "HELP": "帮助", - "UNDO": "撤销", - "REDO": "重做", - "CHANGE_VALUE_TITLE": "更改值:", - "RENAME_VARIABLE": "重命名变量...", - "RENAME_VARIABLE_TITLE": "将所有“%1”变量重命名为:", - "NEW_VARIABLE": "创建变量...", - "NEW_STRING_VARIABLE": "创建字符串变量...", - "NEW_NUMBER_VARIABLE": "创建数字变量...", - "NEW_COLOUR_VARIABLE": "创建颜色变量...", - "NEW_VARIABLE_TYPE_TITLE": "新变量的类型:", - "NEW_VARIABLE_TITLE": "新变量的名称:", - "VARIABLE_ALREADY_EXISTS": "名字叫“%1”的变量已经存在了。", - "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "名字叫“%1”的变量已经有了另一个类型:“%2”。", - "DELETE_VARIABLE_CONFIRMATION": "要删除对变量“%2”的%1个引用吗?", - "CANNOT_DELETE_VARIABLE_PROCEDURE": "不能删除变量“%1”,因为它是函数“%2”定义的一部分", - "DELETE_VARIABLE": "删除变量“%1”", - "COLOUR_PICKER_HELPURL": "https://zh.wikipedia.org/wiki/颜色", - "COLOUR_PICKER_TOOLTIP": "从调色板中选择一种颜色。", - "COLOUR_RANDOM_TITLE": "随机颜色", - "COLOUR_RANDOM_TOOLTIP": "随机选择一种颜色。", - "COLOUR_RGB_TITLE": "颜色", - "COLOUR_RGB_RED": "红色", - "COLOUR_RGB_GREEN": "绿色", - "COLOUR_RGB_BLUE": "蓝色", - "COLOUR_RGB_TOOLTIP": "通过指定红色、绿色和蓝色的量创建一种颜色。所有的值必须在0和100之间。", - "COLOUR_BLEND_TITLE": "混合", - "COLOUR_BLEND_COLOUR1": "颜色1", - "COLOUR_BLEND_COLOUR2": "颜色2", - "COLOUR_BLEND_RATIO": "比例", - "COLOUR_BLEND_TOOLTIP": "把两种颜色以一个给定的比例(0.0-1.0)进行混合。", - "CONTROLS_REPEAT_HELPURL": "https://zh.wikipedia.org/wiki/For循环", - "CONTROLS_REPEAT_TITLE": "重复 %1 次", - "CONTROLS_REPEAT_INPUT_DO": "执行", - "CONTROLS_REPEAT_TOOLTIP": "多次执行一些语句。", - "CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "当条件满足时重复", - "CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "重复直到条件满足", - "CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "只要值为真,就一直循环执行一些语句。", - "CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "只要值为假,就一直循环执行一些语句。", - "CONTROLS_FOR_TOOLTIP": "用变量%1记录从开始数值到终止数值之间的数值,数值按指定间隔增加,并执行指定的块。", - "CONTROLS_FOR_TITLE": "变量 %1 从 %2 数到 %3 每次增加 %4", - "CONTROLS_FOREACH_TITLE": "遍历列表 %2 里的每一项 %1", - "CONTROLS_FOREACH_TOOLTIP": "遍历列表中的每一项,将变量“%1”设为所选项,并执行一些语句。", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "跳出循环", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "继续下一轮循环", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "跳出包含它的循环。", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "跳过本轮循环的剩余部分,并继进行续下一轮循环。", - "CONTROLS_FLOW_STATEMENTS_WARNING": "警告:这个块只能在循环内使用。", - "CONTROLS_IF_TOOLTIP_1": "如果值为真,执行一些语句。", - "CONTROLS_IF_TOOLTIP_2": "如果值为真,则执行第一块语句。否则,则执行第二块语句。", - "CONTROLS_IF_TOOLTIP_3": "如果第一个值为真,则执行第一块的语句。否则,如果第二个值为真,则执行第二块的语句。", - "CONTROLS_IF_TOOLTIP_4": "如果第一个值为真,则执行第一块对语句。否则,如果第二个值为真,则执行语句的第二块。如果没有值为真,则执行最后一块的语句。", - "CONTROLS_IF_MSG_IF": "如果", - "CONTROLS_IF_MSG_ELSEIF": "否则如果", - "CONTROLS_IF_MSG_ELSE": "否则", - "CONTROLS_IF_IF_TOOLTIP": "增加、删除或重新排列各节来重新配置这个if语句块。", - "CONTROLS_IF_ELSEIF_TOOLTIP": "在这个if语句块中增加一个条件。", - "CONTROLS_IF_ELSE_TOOLTIP": "在这个if语句块中添加一个最终的,包括所有其余情况的条件。", - "IOS_OK": "确定", - "IOS_CANCEL": "取消", - "IOS_ERROR": "错误", - "IOS_PROCEDURES_INPUTS": "输入", - "IOS_PROCEDURES_ADD_INPUT": "+ 添加输入", - "IOS_PROCEDURES_ALLOW_STATEMENTS": "允许的语句", - "IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR": "这个函数有多个输入。", - "IOS_VARIABLES_ADD_VARIABLE": "+ 添加变量", - "IOS_VARIABLES_ADD_BUTTON": "添加", - "IOS_VARIABLES_RENAME_BUTTON": "重命名", - "IOS_VARIABLES_DELETE_BUTTON": "删除", - "IOS_VARIABLES_VARIABLE_NAME": "变量名", - "IOS_VARIABLES_EMPTY_NAME_ERROR": "你不能使用空白的变量名。", - "LOGIC_COMPARE_HELPURL": "https://zh.wikipedia.org/wiki/不等", - "LOGIC_COMPARE_TOOLTIP_EQ": "如果两个输入结果相等,则返回真。", - "LOGIC_COMPARE_TOOLTIP_NEQ": "如果两个输入结果不相等,则返回真。", - "LOGIC_COMPARE_TOOLTIP_LT": "如果第一个输入结果比第二个小,则返回真。", - "LOGIC_COMPARE_TOOLTIP_LTE": "如果第一个输入结果小于或等于第二个输入结果,则返回真。", - "LOGIC_COMPARE_TOOLTIP_GT": "如果第一个输入结果比第二个大,则返回真。", - "LOGIC_COMPARE_TOOLTIP_GTE": "如果第一个输入结果大于或等于第二个输入结果,则返回真。", - "LOGIC_OPERATION_TOOLTIP_AND": "如果两个输入结果都为真,则返回真。", - "LOGIC_OPERATION_AND": "并且", - "LOGIC_OPERATION_TOOLTIP_OR": "如果至少有一个输入结果为真,则返回真。", - "LOGIC_OPERATION_OR": "或", - "LOGIC_NEGATE_HELPURL": "https://github.com/google/blockly/wiki/Logic#not", - "LOGIC_NEGATE_TITLE": "%1不成立", - "LOGIC_NEGATE_TOOLTIP": "如果输入结果为假,则返回真;如果输入结果为真,则返回假。", - "LOGIC_BOOLEAN_TRUE": "真", - "LOGIC_BOOLEAN_FALSE": "假", - "LOGIC_BOOLEAN_TOOLTIP": "返回真或假。", - "LOGIC_NULL": "空", - "LOGIC_NULL_TOOLTIP": "返回空值。", - "LOGIC_TERNARY_HELPURL": "https://zh.wikipedia.org/wiki/条件运算符", - "LOGIC_TERNARY_CONDITION": "断言", - "LOGIC_TERNARY_IF_TRUE": "如果为真", - "LOGIC_TERNARY_IF_FALSE": "如果为假", - "LOGIC_TERNARY_TOOLTIP": "检查“断言”里的条件语句。如果条件为真,则返回“如果为真”的值,否则,则返回“如果为假”的值。", - "MATH_NUMBER_HELPURL": "https://zh.wikipedia.org/wiki/数", - "MATH_NUMBER_TOOLTIP": "一个数值。", - "MATH_ARITHMETIC_HELPURL": "https://zh.wikipedia.org/wiki/算术", - "MATH_ARITHMETIC_TOOLTIP_ADD": "返回两个数值的和。", - "MATH_ARITHMETIC_TOOLTIP_MINUS": "返回两个数值的差。", - "MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "返回两个数值的乘积。", - "MATH_ARITHMETIC_TOOLTIP_DIVIDE": "返回两个数值的商。", - "MATH_ARITHMETIC_TOOLTIP_POWER": "返回以第一个数值为底数,以第二个数值为幂的结果。", - "MATH_SINGLE_HELPURL": "https://zh.wikipedia.org/wiki/平方根", - "MATH_SINGLE_OP_ROOT": "平方根", - "MATH_SINGLE_TOOLTIP_ROOT": "返回一个数的平方根。", - "MATH_SINGLE_OP_ABSOLUTE": "绝对值", - "MATH_SINGLE_TOOLTIP_ABS": "返回一个数值的绝对值。", - "MATH_SINGLE_TOOLTIP_NEG": "返回一个数值的相反数。", - "MATH_SINGLE_TOOLTIP_LN": "返回一个数值的自然对数。", - "MATH_SINGLE_TOOLTIP_LOG10": "返回一个数值的以10为底的对数。", - "MATH_SINGLE_TOOLTIP_EXP": "返回一个数值的e次幂。", - "MATH_SINGLE_TOOLTIP_POW10": "返回一个数值的10次幂。", - "MATH_TRIG_HELPURL": "https://zh.wikipedia.org/wiki/三角函数", - "MATH_TRIG_TOOLTIP_SIN": "返回指定角度的正弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_COS": "返回指定角度的余弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_TAN": "返回指定角度的正切值(非弧度)。", - "MATH_TRIG_TOOLTIP_ASIN": "返回一个数值的反正弦值。", - "MATH_TRIG_TOOLTIP_ACOS": "返回一个数值的反余弦值。", - "MATH_TRIG_TOOLTIP_ATAN": "返回一个数值的反正切值。", - "MATH_CONSTANT_HELPURL": "https://zh.wikipedia.org/wiki/数学常数", - "MATH_CONSTANT_TOOLTIP": "返回一个常见常量:π (3.141…)、e (2.718…)、φ (1.618…)、根号2 (1.414…)、根号二分之一 (0.707…)或∞ (无穷大)。", - "MATH_IS_EVEN": "是偶数", - "MATH_IS_ODD": "是奇数", - "MATH_IS_PRIME": "是质数", - "MATH_IS_WHOLE": "是整数", - "MATH_IS_POSITIVE": "是正数", - "MATH_IS_NEGATIVE": "是负数", - "MATH_IS_DIVISIBLE_BY": "可被整除", - "MATH_IS_TOOLTIP": "检查一个数值是否是偶数、奇数、质数、自然数、正数、负数或者是否能被某数整除。返回真或假。", - "MATH_CHANGE_HELPURL": "https://zh.wikipedia.org/wiki/加法", - "MATH_CHANGE_TITLE": "将 %1 增加 %2", - "MATH_CHANGE_TOOLTIP": "为变量“%1”增加一个数值。", - "MATH_ROUND_HELPURL": "https://zh.wikipedia.org/wiki/数值修约", - "MATH_ROUND_TOOLTIP": "数字向上或向下舍入。", - "MATH_ROUND_OPERATOR_ROUND": "四舍五入", - "MATH_ROUND_OPERATOR_ROUNDUP": "向上舍入", - "MATH_ROUND_OPERATOR_ROUNDDOWN": "向下舍入", - "MATH_ONLIST_OPERATOR_SUM": "列表中数值的和", - "MATH_ONLIST_TOOLTIP_SUM": "返回列表中的所有数值的和。", - "MATH_ONLIST_OPERATOR_MIN": "列表最小值", - "MATH_ONLIST_TOOLTIP_MIN": "返回列表中最小值。", - "MATH_ONLIST_OPERATOR_MAX": "列表最大值", - "MATH_ONLIST_TOOLTIP_MAX": "返回列表中最大值。", - "MATH_ONLIST_OPERATOR_AVERAGE": "列表平均值", - "MATH_ONLIST_TOOLTIP_AVERAGE": "返回列表中的数值的平均值。", - "MATH_ONLIST_OPERATOR_MEDIAN": "列表中位数", - "MATH_ONLIST_TOOLTIP_MEDIAN": "返回列表中数值的中位数。", - "MATH_ONLIST_OPERATOR_MODE": "列表中的众数", - "MATH_ONLIST_TOOLTIP_MODE": "返回列表中的出现次数最多的项的列表。", - "MATH_ONLIST_OPERATOR_STD_DEV": "列表的标准差", - "MATH_ONLIST_TOOLTIP_STD_DEV": "返回列表的标准差。", - "MATH_ONLIST_OPERATOR_RANDOM": "列表中的随机一项", - "MATH_ONLIST_TOOLTIP_RANDOM": "从列表中返回一个随机的元素。", - "MATH_MODULO_HELPURL": "https://zh.wikipedia.org/wiki/模除", - "MATH_MODULO_TITLE": "取 %1 ÷ %2 的余数", - "MATH_MODULO_TOOLTIP": "返回这两个数字相除后的余数。", - "MATH_CONSTRAIN_TITLE": "将 %1 限制在 最低 %2 到最高 %3 之间", - "MATH_CONSTRAIN_TOOLTIP": "将一个数值限制在两个指定的数值范围(含边界)之间。", - "MATH_RANDOM_INT_HELPURL": "https://zh.wikipedia.org/wiki/随机数生成器", - "MATH_RANDOM_INT_TITLE": "从 %1 到 %2 范围内的随机整数", - "MATH_RANDOM_INT_TOOLTIP": "返回一个限制在两个指定数值的范围(含边界)之间的随机整数。", - "MATH_RANDOM_FLOAT_HELPURL": "https://zh.wikipedia.org/wiki/随机数生成器", - "MATH_RANDOM_FLOAT_TITLE_RANDOM": "随机小数", - "MATH_RANDOM_FLOAT_TOOLTIP": "返回一个从0.0(含)到1.0(不含)之间的随机数。", - "MATH_ATAN2_HELPURL": "https://zh.wikipedia.org/wiki/反正切2", - "MATH_ATAN2_TITLE": "点(x:%1,y:%2)的方位角", - "MATH_ATAN2_TOOLTIP": "返回点(X,Y)的反正切值,范围为-180到180度。", - "TEXT_TEXT_HELPURL": "https://zh.wikipedia.org/wiki/字符串", - "TEXT_TEXT_TOOLTIP": "一个字、词语或一行文本。", - "TEXT_JOIN_TITLE_CREATEWITH": "创建文本,内容:", - "TEXT_JOIN_TOOLTIP": "通过串起任意数量的项以建立一段文本。", - "TEXT_CREATE_JOIN_TITLE_JOIN": "拼接", - "TEXT_CREATE_JOIN_TOOLTIP": "添加、移除或重新排列各节来重新配置这个文本块。", - "TEXT_CREATE_JOIN_ITEM_TOOLTIP": "将一个项添加到文本中。", - "TEXT_APPEND_TITLE": "在%1之后加上文本%2", - "TEXT_APPEND_TOOLTIP": "将一些文本追加到变量“%1”里。", - "TEXT_LENGTH_TITLE": "%1的长度", - "TEXT_LENGTH_TOOLTIP": "返回给定文本的字母数(包括空格)。", - "TEXT_ISEMPTY_TITLE": "%1是空的", - "TEXT_ISEMPTY_TOOLTIP": "如果给定的文本为空,则返回真。", - "TEXT_INDEXOF_TOOLTIP": "返回第一个文本段在第二个文本段中的第一/最后一个匹配项的起始位置。如果未找到,则返回%1。", - "TEXT_INDEXOF_TITLE": "在文本 %1 里 %2 %3", - "TEXT_INDEXOF_OPERATOR_FIRST": "寻找第一次出现的文本", - "TEXT_INDEXOF_OPERATOR_LAST": "寻找最后一次出现的文本", - "TEXT_CHARAT_TITLE": "在文本%1 里 %2", - "TEXT_CHARAT_FROM_START": "获取第#个字符", - "TEXT_CHARAT_FROM_END": "获取倒数第#个字符", - "TEXT_CHARAT_FIRST": "获取第一个字符", - "TEXT_CHARAT_LAST": "获取最后一个字符", - "TEXT_CHARAT_RANDOM": "获取随机一个字符", - "TEXT_CHARAT_TAIL": "-", - "TEXT_CHARAT_TOOLTIP": "返回位于指定位置的字符。", - "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_FIRST": "获取子串,从第一个字符", - "TEXT_GET_SUBSTRING_END_FROM_START": "到第#个字符", - "TEXT_GET_SUBSTRING_END_FROM_END": "到倒数第#个字符", - "TEXT_GET_SUBSTRING_END_LAST": "到最后一个字符", - "TEXT_GET_SUBSTRING_TAIL": "-", - "TEXT_CHANGECASE_TOOLTIP": "用不同的大小写模式复制并返回这段文字。", - "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "转为大写", - "TEXT_CHANGECASE_OPERATOR_LOWERCASE": "转为小写", - "TEXT_CHANGECASE_OPERATOR_TITLECASE": "转为首字母大写", - "TEXT_TRIM_TOOLTIP": "从某一端或同时从两端删除多余的空白,并返回这段文字的一个副本。", - "TEXT_TRIM_OPERATOR_BOTH": "消除其两侧的空白", - "TEXT_TRIM_OPERATOR_LEFT": "消除其左侧的空白", - "TEXT_TRIM_OPERATOR_RIGHT": "消除其右侧的空白", - "TEXT_PRINT_TITLE": "输出%1", - "TEXT_PRINT_TOOLTIP": "输出指定的文字、数字或其他值。", - "TEXT_PROMPT_TYPE_TEXT": "要求输入文本,并显示提示消息", - "TEXT_PROMPT_TYPE_NUMBER": "要求输入数字,并显示提示消息", - "TEXT_PROMPT_TOOLTIP_NUMBER": "要求用户输入数字。", - "TEXT_PROMPT_TOOLTIP_TEXT": "要求用户输入一些文本。", - "TEXT_COUNT_MESSAGE0": "计算%1在%2里出现的次数", - "TEXT_COUNT_HELPURL": "https://github.com/google/blockly/wiki/Text#counting-substrings", - "TEXT_COUNT_TOOLTIP": "计算在一段文本中,某个部分文本重复出现了多少次。", - "TEXT_REPLACE_MESSAGE0": "把%3中的%1替换为%2", - "TEXT_REPLACE_HELPURL": "https://github.com/google/blockly/wiki/Text#replacing-substrings", - "TEXT_REPLACE_TOOLTIP": "在一段文本中,将出现过的某部分文本都替换掉。", - "TEXT_REVERSE_MESSAGE0": "倒转文本%1", - "TEXT_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Text#reversing-text", - "TEXT_REVERSE_TOOLTIP": "将文本中各个字符的顺序倒转。", - "LISTS_CREATE_EMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-empty-list", - "LISTS_CREATE_EMPTY_TITLE": "创建空列表", - "LISTS_CREATE_EMPTY_TOOLTIP": "返回一个列表,长度为 0,不包含任何数据记录", - "LISTS_CREATE_WITH_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-list-with", - "LISTS_CREATE_WITH_TOOLTIP": "建立一个具有任意数量项目的列表。", - "LISTS_CREATE_WITH_INPUT_WITH": "创建列表,内容:", - "LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "列表", - "LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "增加、删除或重新排列各部分以此重新配置这个列表块。", - "LISTS_CREATE_WITH_ITEM_TOOLTIP": "将一个项添加到列表中。", - "LISTS_REPEAT_TOOLTIP": "建立包含指定重复次数的值的列表。", - "LISTS_REPEAT_TITLE": "建立列表使用项 %1 重复 %2 次", - "LISTS_LENGTH_TITLE": "%1的长度", - "LISTS_LENGTH_TOOLTIP": "返回列表的长度。", - "LISTS_ISEMPTY_TITLE": "%1是空的", - "LISTS_ISEMPTY_TOOLTIP": "如果改列表为空,则返回真。", - "LISTS_INLIST": "在列表中", - "LISTS_INDEX_OF_FIRST": "寻找第一次出现的项", - "LISTS_INDEX_OF_LAST": "寻找最后一次出现的项", - "LISTS_INDEX_OF_TOOLTIP": "返回在列表中的第一/最后一个匹配项的索引值。如果找不到项目则返回%1。", - "LISTS_GET_INDEX_GET": "取得", - "LISTS_GET_INDEX_GET_REMOVE": "取得并移除", - "LISTS_GET_INDEX_REMOVE": "移除", - "LISTS_GET_INDEX_FROM_START": "#", - "LISTS_GET_INDEX_FROM_END": "倒数第#项", - "LISTS_GET_INDEX_FIRST": "第一项", - "LISTS_GET_INDEX_LAST": "最后一项", - "LISTS_GET_INDEX_RANDOM": "随机的一项", - "LISTS_GET_INDEX_TAIL": "-", - "LISTS_INDEX_FROM_START_TOOLTIP": "%1是第一项。", - "LISTS_INDEX_FROM_END_TOOLTIP": "%1是最后一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_FROM": "返回在列表中的指定位置的项。", - "LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "返回列表中的第一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_LAST": "返回列表中的最后一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "返回列表中的随机一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM": "移除并返回列表中的指定位置的项。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "移除并返回列表中的第一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "移除并返回列表中的最后一项。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "移除并返回列表中的随机一项。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM": "移除在列表中的指定位置的项。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST": "移除列表中的第一项", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST": "移除列表中的最后一项", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM": "删除列表中的随机一项。", - "LISTS_SET_INDEX_SET": "设置", - "LISTS_SET_INDEX_INSERT": "插入在", - "LISTS_SET_INDEX_INPUT_TO": "值为", - "LISTS_SET_INDEX_TOOLTIP_SET_FROM": "设置在列表中指定位置的项。", - "LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "设置列表中的第一项。", - "LISTS_SET_INDEX_TOOLTIP_SET_LAST": "设置列表中的最后一项。", - "LISTS_SET_INDEX_TOOLTIP_SET_RANDOM": "设置列表中的随机一项。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FROM": "在列表中指定位置插入项。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST": "在列表的起始处添加该项。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "在列表的末尾处添加该项。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "在列表的随机位置插入该项。", - "LISTS_GET_SUBLIST_START_FROM_START": "获取子列表,从第#项", - "LISTS_GET_SUBLIST_START_FROM_END": "获取子列表,从倒数第#项", - "LISTS_GET_SUBLIST_START_FIRST": "获取子列表,从第一项", - "LISTS_GET_SUBLIST_END_FROM_START": "到第#项", - "LISTS_GET_SUBLIST_END_FROM_END": "到倒数第#项", - "LISTS_GET_SUBLIST_END_LAST": "到最后一项", - "LISTS_GET_SUBLIST_TAIL": "-", - "LISTS_GET_SUBLIST_TOOLTIP": "复制列表中指定的部分。", - "LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list", - "LISTS_SORT_TITLE": "排序%1 %2 %3", - "LISTS_SORT_TOOLTIP": "排序一个列表,返回副本。", - "LISTS_SORT_ORDER_ASCENDING": "升序", - "LISTS_SORT_ORDER_DESCENDING": "降序", - "LISTS_SORT_TYPE_NUMERIC": "按数字", - "LISTS_SORT_TYPE_TEXT": "按字母", - "LISTS_SORT_TYPE_IGNORECASE": "按字母(忽略大小写)", - "LISTS_SPLIT_HELPURL": "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists", - "LISTS_SPLIT_LIST_FROM_TEXT": "从文本制作列表", - "LISTS_SPLIT_TEXT_FROM_LIST": "将列表合并为文本", - "LISTS_SPLIT_WITH_DELIMITER": "分隔符:", - "LISTS_SPLIT_TOOLTIP_SPLIT": "将文本按指定的分隔符拆分为文本组成的列表。", - "LISTS_SPLIT_TOOLTIP_JOIN": "加入文本列表至一个文本,由分隔符分隔。", - "LISTS_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Lists#reversing-a-list", - "LISTS_REVERSE_MESSAGE0": "倒转%1", - "LISTS_REVERSE_TOOLTIP": "倒转一个列表,返回副本。", - "ORDINAL_NUMBER_SUFFIX": "-", - "VARIABLES_GET_TOOLTIP": "返回此变量的值。", - "VARIABLES_GET_CREATE_SET": "创建“设定%1”", - "VARIABLES_SET": "赋值 %1 为 %2", - "VARIABLES_SET_TOOLTIP": "设置此变量,以使它和输入值相等。", - "VARIABLES_SET_CREATE_GET": "创建“获得%1”", - "PROCEDURES_DEFNORETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程序", - "PROCEDURES_DEFNORETURN_TITLE": "至", - "PROCEDURES_DEFNORETURN_PROCEDURE": "做点什么", - "PROCEDURES_BEFORE_PARAMS": "与:", - "PROCEDURES_CALL_BEFORE_PARAMS": "与:", - "PROCEDURES_DEFNORETURN_DO": "-", - "PROCEDURES_DEFNORETURN_TOOLTIP": "创建一个不带输出值的函数。", - "PROCEDURES_DEFNORETURN_COMMENT": "描述该功能...", - "PROCEDURES_DEFRETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程序", - "PROCEDURES_DEFRETURN_RETURN": "返回", - "PROCEDURES_DEFRETURN_TOOLTIP": "创建一个有输出值的函数。", - "PROCEDURES_ALLOW_STATEMENTS": "允许声明", - "PROCEDURES_DEF_DUPLICATE_WARNING": "警告:此函数具有重复参数。", - "PROCEDURES_CALLNORETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程序", - "PROCEDURES_CALLNORETURN_TOOLTIP": "运行用户定义的函数“%1”。", - "PROCEDURES_CALLRETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程序", - "PROCEDURES_CALLRETURN_TOOLTIP": "运行用户定义的函数“%1”,并使用它的输出值。", - "PROCEDURES_MUTATORCONTAINER_TITLE": "输入", - "PROCEDURES_MUTATORCONTAINER_TOOLTIP": "添加、移除或重新排此函数的输入。", - "PROCEDURES_MUTATORARG_TITLE": "输入名称:", - "PROCEDURES_MUTATORARG_TOOLTIP": "添加函数输入。", - "PROCEDURES_HIGHLIGHT_DEF": "突出显示函数定义", - "PROCEDURES_CREATE_DO": "创建“%1”", - "PROCEDURES_IFRETURN_TOOLTIP": "如果值为真,则返回第二个值。", - "PROCEDURES_IFRETURN_HELPURL": "http://c2.com/cgi/wiki?GuardClause", - "PROCEDURES_IFRETURN_WARNING": "警告:这个块只能在函数内部使用。", - "WORKSPACE_COMMENT_DEFAULT_TEXT": "说点什么...", - "WORKSPACE_ARIA_LABEL": "Blockly工作区", - "COLLAPSED_WARNINGS_WARNING": "已收起的信息块内包含警告。", - "DIALOG_OK": "确认", - "DIALOG_CANCEL": "取消" -} diff --git a/blockly/msg/json/zh-hant.json b/blockly/msg/json/zh-hant.json deleted file mode 100644 index 663c87c..0000000 --- a/blockly/msg/json/zh-hant.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "@metadata": { - "authors": [ - "Cwlin0416", - "Dnow", - "Dnowba", - "Gasolin", - "Jessica1213", - "Kasimtan", - "Kly", - "LNDDYL", - "Liuxinyu970226", - "Wehwei", - "和平至上", - "沈澄心" - ] - }, - "VARIABLES_DEFAULT_NAME": "項目", - "UNNAMED_KEY": "未命名", - "TODAY": "今天", - "DUPLICATE_BLOCK": "複製", - "ADD_COMMENT": "加入註解", - "REMOVE_COMMENT": "移除註解", - "DUPLICATE_COMMENT": "複製註解", - "EXTERNAL_INPUTS": "外部輸入", - "INLINE_INPUTS": "單行輸入", - "DELETE_BLOCK": "刪除區塊", - "DELETE_X_BLOCKS": "刪除%1個積木", - "DELETE_ALL_BLOCKS": "刪除全部 %1 個區塊?", - "CLEAN_UP": "整理積木", - "COLLAPSE_BLOCK": "收合區塊", - "COLLAPSE_ALL": "收合積木", - "EXPAND_BLOCK": "展開區塊", - "EXPAND_ALL": "展開積木", - "DISABLE_BLOCK": "停用區塊", - "ENABLE_BLOCK": "啟用積木", - "HELP": "說明", - "UNDO": "還原", - "REDO": "重做", - "CHANGE_VALUE_TITLE": "修改值:", - "RENAME_VARIABLE": "重新命名變數...", - "RENAME_VARIABLE_TITLE": "將所有「%1」變數重新命名為:", - "NEW_VARIABLE": "建立變數…", - "NEW_STRING_VARIABLE": "建立字串變數……", - "NEW_NUMBER_VARIABLE": "建立數值變數……", - "NEW_COLOUR_VARIABLE": "建立顏色變數…", - "NEW_VARIABLE_TYPE_TITLE": "新變數類型:", - "NEW_VARIABLE_TITLE": "新變數名稱:", - "VARIABLE_ALREADY_EXISTS": "已存在變數「%1」。", - "VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE": "已存在名為「%1」,且用於其它類型「%2」的變數。", - "DELETE_VARIABLE_CONFIRMATION": "刪除使用%1次的「%2」變數?", - "CANNOT_DELETE_VARIABLE_PROCEDURE": "無法刪除變數「%1」,因為這是功能「%2」定義的一部份內容", - "DELETE_VARIABLE": "刪除變數「%1」", - "COLOUR_PICKER_HELPURL": "https://zh.wikipedia.org/wiki/顏色", - "COLOUR_PICKER_TOOLTIP": "從調色板中選擇一種顏色。", - "COLOUR_RANDOM_TITLE": "隨機顏色", - "COLOUR_RANDOM_TOOLTIP": "隨機選擇一種顏色。", - "COLOUR_RGB_TITLE": "顏色", - "COLOUR_RGB_RED": "紅", - "COLOUR_RGB_GREEN": "綠", - "COLOUR_RGB_BLUE": "藍", - "COLOUR_RGB_TOOLTIP": "透過指定紅、綠、 藍色的值來建立一種顏色。所有的值必須介於 0 和 100 之間。", - "COLOUR_BLEND_TITLE": "混合", - "COLOUR_BLEND_COLOUR1": "顏色 1", - "COLOUR_BLEND_COLOUR2": "顏色 2", - "COLOUR_BLEND_RATIO": "比例", - "COLOUR_BLEND_TOOLTIP": "用一個給定的比率(0.0-1.0)混合兩種顏色。", - "CONTROLS_REPEAT_HELPURL": "https://zh.wikipedia.org/wiki/For迴圈", - "CONTROLS_REPEAT_TITLE": "重複%1次", - "CONTROLS_REPEAT_INPUT_DO": "執行", - "CONTROLS_REPEAT_TOOLTIP": "重複執行指定的陳述式多次。", - "CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "重複,當", - "CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "重複直到", - "CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "當值為 true 時,執行一些陳述式。", - "CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "當值為 false 時,執行一些陳述式。", - "CONTROLS_FOR_TOOLTIP": "從起始數到結尾數中取出變數「%1」的值,按指定的時間間隔,執行指定的區塊。", - "CONTROLS_FOR_TITLE": "循環計數 %1 從 %2 到 %3 每次增加 %4", - "CONTROLS_FOREACH_TITLE": "為列表 %2 裡的每一項 %1", - "CONTROLS_FOREACH_TOOLTIP": "遍歷每個清單中的項目,將變數「%1」設定到該項目中,然後執行某些陳述式。", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "中斷循環", - "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "繼續下一個循環", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "中斷當前的循環。", - "CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "跳過這個循環的其餘步驟,並繼續下一次的循環。", - "CONTROLS_FLOW_STATEMENTS_WARNING": "警告:此區塊僅可用於循環內。", - "CONTROLS_IF_TOOLTIP_1": "當值為 true 時,執行一些陳述式。", - "CONTROLS_IF_TOOLTIP_2": "當值為 true 時,執行第一個陳述式。否則,執行第二個陳述式。", - "CONTROLS_IF_TOOLTIP_3": "如果第一個值為 true,則執行第一個陳述式。否則,當第二個值為 true 時,則執行第二個陳述式。", - "CONTROLS_IF_TOOLTIP_4": "如果第一個值為 true,則執行第一個陳述式。否則當第二個值為 true 時,則執行第二個陳述式。如果前幾個敘述都不為 ture,則執行最後一個陳述式。", - "CONTROLS_IF_MSG_IF": "如果", - "CONTROLS_IF_MSG_ELSEIF": "否則,如果", - "CONTROLS_IF_MSG_ELSE": "否則", - "CONTROLS_IF_IF_TOOLTIP": "添加、刪除或重新排列各部份以重新配置這個「如果」區塊。", - "CONTROLS_IF_ELSEIF_TOOLTIP": "添加條件到「如果」積木。", - "CONTROLS_IF_ELSE_TOOLTIP": "加入一個最終、所有條件都執行的部份到「如果」區塊中。", - "IOS_OK": "確定", - "IOS_CANCEL": "取消", - "IOS_ERROR": "錯誤", - "IOS_PROCEDURES_INPUTS": "輸入", - "IOS_PROCEDURES_ADD_INPUT": "+ 添加輸入", - "IOS_PROCEDURES_ALLOW_STATEMENTS": "允許加入陳述式", - "IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR": "此功能有多個輸入內容。", - "IOS_VARIABLES_ADD_VARIABLE": "+ 添加變數", - "IOS_VARIABLES_ADD_BUTTON": "添加", - "IOS_VARIABLES_RENAME_BUTTON": "重新命名", - "IOS_VARIABLES_DELETE_BUTTON": "刪除", - "IOS_VARIABLES_VARIABLE_NAME": "變數名稱", - "IOS_VARIABLES_EMPTY_NAME_ERROR": "您不能使用空的變數名稱。", - "LOGIC_COMPARE_HELPURL": "https://zh.wikipedia.org/wiki/不等", - "LOGIC_COMPARE_TOOLTIP_EQ": "如果這兩個輸入區塊的結果相等,返回 true。", - "LOGIC_COMPARE_TOOLTIP_NEQ": "如果這兩個輸入區塊的結果不相等,返回 true。", - "LOGIC_COMPARE_TOOLTIP_LT": "如果第一個輸入結果比第二個小,返回 true。", - "LOGIC_COMPARE_TOOLTIP_LTE": "如果第一個輸入結果小於或等於第二個,返回 true。", - "LOGIC_COMPARE_TOOLTIP_GT": "如果第一個輸入結果大於第二個,返回 true。", - "LOGIC_COMPARE_TOOLTIP_GTE": "如果第一個輸入結果大於或等於第二個,返回 true。", - "LOGIC_OPERATION_TOOLTIP_AND": "如果兩個輸入結果都為 true,則返回 true。", - "LOGIC_OPERATION_AND": "和", - "LOGIC_OPERATION_TOOLTIP_OR": "如果至少一個輸入結果為 true,返回 true。", - "LOGIC_OPERATION_OR": "或", - "LOGIC_NEGATE_TITLE": "%1 不成立", - "LOGIC_NEGATE_TOOLTIP": "如果輸入結果是 false,則返回 true。如果輸入結果是 true,則返回 false。", - "LOGIC_BOOLEAN_TRUE": "真", - "LOGIC_BOOLEAN_FALSE": "假", - "LOGIC_BOOLEAN_TOOLTIP": "返回真或假。", - "LOGIC_NULL": "空", - "LOGIC_NULL_TOOLTIP": "返回空值。", - "LOGIC_TERNARY_HELPURL": "https://zh.wikipedia.org/wiki/條件運算符", - "LOGIC_TERNARY_CONDITION": "測試", - "LOGIC_TERNARY_IF_TRUE": "如果為真", - "LOGIC_TERNARY_IF_FALSE": "如果為假", - "LOGIC_TERNARY_TOOLTIP": "檢查「測試」中的條件。如果條件為真,將返回「如果為真」的值;否則,返回「如果為假」的值。", - "MATH_NUMBER_HELPURL": "https://zh.wikipedia.org/wiki/數", - "MATH_NUMBER_TOOLTIP": "一個數字。", - "MATH_ARITHMETIC_HELPURL": "https://zh.wikipedia.org/wiki/算術", - "MATH_ARITHMETIC_TOOLTIP_ADD": "返回兩個數字的總和。", - "MATH_ARITHMETIC_TOOLTIP_MINUS": "返回兩個數字的差。", - "MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "返回兩個數字的乘積。", - "MATH_ARITHMETIC_TOOLTIP_DIVIDE": "返回兩個數字的商。", - "MATH_ARITHMETIC_TOOLTIP_POWER": "返回第二個數字的指數的第一個數字。", - "MATH_SINGLE_HELPURL": "https://zh.wikipedia.org/wiki/平方根", - "MATH_SINGLE_OP_ROOT": "開根號", - "MATH_SINGLE_TOOLTIP_ROOT": "返回指定數字的平方根。", - "MATH_SINGLE_OP_ABSOLUTE": "絕對值", - "MATH_SINGLE_TOOLTIP_ABS": "返回指定數字的絕對值。", - "MATH_SINGLE_TOOLTIP_NEG": "返回指定數字的相反數。", - "MATH_SINGLE_TOOLTIP_LN": "返回指定數字的自然對數。", - "MATH_SINGLE_TOOLTIP_LOG10": "返回指定數字的對數。", - "MATH_SINGLE_TOOLTIP_EXP": "返回指定數字指數的e的冪次。", - "MATH_SINGLE_TOOLTIP_POW10": "返回指定數字指數的10的冪次。", - "MATH_TRIG_HELPURL": "https://zh.wikipedia.org/wiki/三角函數", - "MATH_TRIG_TOOLTIP_SIN": "返回指定角度的正弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_COS": "返回指定角度的餘弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_TAN": "返回指定角度的正切值(非弧度)。", - "MATH_TRIG_TOOLTIP_ASIN": "返回指定角度的反正弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_ACOS": "返回指定角度的反餘弦值(非弧度)。", - "MATH_TRIG_TOOLTIP_ATAN": "返回指定角度的反正切值。", - "MATH_CONSTANT_HELPURL": "https://zh.wikipedia.org/wiki/數學常數", - "MATH_CONSTANT_TOOLTIP": "返回一個的常見常量: π (3.141......),e (2.718...)、 φ (1.618...)、 開方(2) (1.414......)、 開方(½) (0.707......) 或 ∞ (無窮大)。", - "MATH_IS_EVEN": "是偶數", - "MATH_IS_ODD": "是奇數", - "MATH_IS_PRIME": "是質數", - "MATH_IS_WHOLE": "是整數", - "MATH_IS_POSITIVE": "是正值", - "MATH_IS_NEGATIVE": "是負數", - "MATH_IS_DIVISIBLE_BY": "可被整除", - "MATH_IS_TOOLTIP": "如果數字是偶數,奇數,非負整數,正數、 負數,或如果它是可被某數字整除,則返回 true 或 false。", - "MATH_CHANGE_HELPURL": "https://zh.wikipedia.org/wiki/加法", - "MATH_CHANGE_TITLE": "修改 %1 自 %2", - "MATH_CHANGE_TOOLTIP": "將數字加到變數「%1」。", - "MATH_ROUND_HELPURL": "https://zh.wikipedia.org/wiki/數值簡化", - "MATH_ROUND_TOOLTIP": "將數字無條件進位或無條件捨去。", - "MATH_ROUND_OPERATOR_ROUND": "四捨五入", - "MATH_ROUND_OPERATOR_ROUNDUP": "無條件進位", - "MATH_ROUND_OPERATOR_ROUNDDOWN": "無條件捨去", - "MATH_ONLIST_OPERATOR_SUM": "數字總和 自清單", - "MATH_ONLIST_TOOLTIP_SUM": "返回清單中的所有數字的總和。", - "MATH_ONLIST_OPERATOR_MIN": "最小值 自清單", - "MATH_ONLIST_TOOLTIP_MIN": "返回清單項目中最小的數字。", - "MATH_ONLIST_OPERATOR_MAX": "最大值 自清單", - "MATH_ONLIST_TOOLTIP_MAX": "返回清單項目中最大的數字。", - "MATH_ONLIST_OPERATOR_AVERAGE": "平均數 自清單", - "MATH_ONLIST_TOOLTIP_AVERAGE": "返回清單中數值的平均值(算術平均值)。", - "MATH_ONLIST_OPERATOR_MEDIAN": "中位數 自清單", - "MATH_ONLIST_TOOLTIP_MEDIAN": "返回清單中數值的中位數。", - "MATH_ONLIST_OPERATOR_MODE": "比較眾數 自清單", - "MATH_ONLIST_TOOLTIP_MODE": "返回一個清單中的最常見的項目。", - "MATH_ONLIST_OPERATOR_STD_DEV": "標準差 自清單", - "MATH_ONLIST_TOOLTIP_STD_DEV": "返回清單中數字的標準差。", - "MATH_ONLIST_OPERATOR_RANDOM": "隨機抽取 自清單", - "MATH_ONLIST_TOOLTIP_RANDOM": "從清單中返回一個隨機的項目。", - "MATH_MODULO_HELPURL": "https://zh.wikipedia.org/wiki/模除", - "MATH_MODULO_TITLE": "%1 除以 %2 的餘數", - "MATH_MODULO_TOOLTIP": "回傳兩個數字相除的餘數。", - "MATH_CONSTRAIN_TITLE": "限制數字 %1 介於(低)%2 到(高)%3", - "MATH_CONSTRAIN_TOOLTIP": "限制數字介於兩個指定的數字之間(包含)。", - "MATH_RANDOM_INT_HELPURL": "https://zh.wikipedia.org/wiki/隨機數生成器", - "MATH_RANDOM_INT_TITLE": "隨機取數 %1 到 %2", - "MATH_RANDOM_INT_TOOLTIP": "在指定二個數之間隨機取一個數(包含)。", - "MATH_RANDOM_FLOAT_HELPURL": "https://zh.wikipedia.org/wiki/隨機數生成器", - "MATH_RANDOM_FLOAT_TITLE_RANDOM": "隨機取分數", - "MATH_RANDOM_FLOAT_TOOLTIP": "在 0.0(包含)和 1.0(不包含)之間隨機取一個數。", - "MATH_ATAN2_HELPURL": "https://zh.wikipedia.org/wiki/Atan2", - "MATH_ATAN2_TITLE": "X:%1 Y:%2 的 Atan2", - "MATH_ATAN2_TOOLTIP": "回傳點(X,Y)從 -180 至 180 度的反正切值。", - "TEXT_TEXT_HELPURL": "https://zh.wikipedia.org/wiki/字串", - "TEXT_TEXT_TOOLTIP": "一個字元、一個單詞,或一串文字。", - "TEXT_JOIN_TITLE_CREATEWITH": "字串組合", - "TEXT_JOIN_TOOLTIP": "通過連接任意數量的項目來建立一串文字。", - "TEXT_CREATE_JOIN_TITLE_JOIN": "加入", - "TEXT_CREATE_JOIN_TOOLTIP": "添加、刪除或重新排列各部份以重新配置這個文字區塊。", - "TEXT_CREATE_JOIN_ITEM_TOOLTIP": "添加一個項目到字串中。", - "TEXT_APPEND_TITLE": "至 %1 套用文字 %2", - "TEXT_APPEND_TOOLTIP": "添加一些文字到變數「%1」之後。", - "TEXT_LENGTH_TITLE": "長度 %1", - "TEXT_LENGTH_TOOLTIP": "返回這串文字的字元數(包含空格)。", - "TEXT_ISEMPTY_TITLE": "%1 為空", - "TEXT_ISEMPTY_TOOLTIP": "如果提供的字串為空,則返回 true。", - "TEXT_INDEXOF_TOOLTIP": "在字串1中檢索是否有包含字串2,如果有,返回從頭/倒數算起的索引值。如果沒有則返回 %1。", - "TEXT_INDEXOF_TITLE": "在文字 %1 %2 %3", - "TEXT_INDEXOF_OPERATOR_FIRST": "從 最前面 索引字串", - "TEXT_INDEXOF_OPERATOR_LAST": "從 最後面 索引字串", - "TEXT_CHARAT_TITLE": "在文字 %1 %2", - "TEXT_CHARAT_FROM_START": "取得 字元 #", - "TEXT_CHARAT_FROM_END": "取得 倒數第 # 個字元", - "TEXT_CHARAT_FIRST": "取得 第一個字元", - "TEXT_CHARAT_LAST": "取得 最後一個字元", - "TEXT_CHARAT_RANDOM": "取得 任意字元", - "TEXT_CHARAT_TOOLTIP": "返回位於指定位置的字元。", - "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_FIRST": "取得 第一個字元", - "TEXT_GET_SUBSTRING_END_FROM_START": "到 字元 #", - "TEXT_GET_SUBSTRING_END_FROM_END": "到 倒數第 # 個字元", - "TEXT_GET_SUBSTRING_END_LAST": "到最後一個字元", - "TEXT_CHANGECASE_TOOLTIP": "使用不同的大小寫複製這段文字。", - "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "轉成英文大寫", - "TEXT_CHANGECASE_OPERATOR_LOWERCASE": "轉成英文小寫", - "TEXT_CHANGECASE_OPERATOR_TITLECASE": "轉成英文首字大寫", - "TEXT_TRIM_TOOLTIP": "複製這段文字,同時刪除兩端多餘的空格。", - "TEXT_TRIM_OPERATOR_BOTH": "消除兩側空格", - "TEXT_TRIM_OPERATOR_LEFT": "消除左側空格", - "TEXT_TRIM_OPERATOR_RIGHT": "消除右側空格", - "TEXT_PRINT_TITLE": "輸出 %1", - "TEXT_PRINT_TOOLTIP": "輸出指定的文字、 數字或其他值。", - "TEXT_PROMPT_TYPE_TEXT": "輸入 文字 並顯示提示訊息", - "TEXT_PROMPT_TYPE_NUMBER": "輸入 數字 並顯示提示訊息", - "TEXT_PROMPT_TOOLTIP_NUMBER": "輸入數字", - "TEXT_PROMPT_TOOLTIP_TEXT": "輸入文字", - "TEXT_COUNT_MESSAGE0": "在%2計算%1", - "TEXT_COUNT_HELPURL": "https://github.com/google/blockly/wiki/Text#counting-substrings", - "TEXT_COUNT_TOOLTIP": "計算某些文字在內容裡的出現次數。", - "TEXT_REPLACE_MESSAGE0": "在%3以%2取代%1", - "TEXT_REPLACE_HELPURL": "https://github.com/google/blockly/wiki/Text#replacing-substrings", - "TEXT_REPLACE_TOOLTIP": "取代在內容裡的全部某些文字。", - "TEXT_REVERSE_MESSAGE0": "反轉%1", - "TEXT_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Text#reversing-text", - "TEXT_REVERSE_TOOLTIP": "反轉排序在文字裡的字元。", - "LISTS_CREATE_EMPTY_TITLE": "建立空的清單", - "LISTS_CREATE_EMPTY_TOOLTIP": "返回一個長度(項目數量)為 0 的清單,不包含任何資料記錄", - "LISTS_CREATE_WITH_TOOLTIP": "建立一個具備任意數量項目的清單。", - "LISTS_CREATE_WITH_INPUT_WITH": "使用這些值建立清單", - "LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "清單", - "LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "添加、刪除或重新排列各部份以重新配置這個清單區塊。", - "LISTS_CREATE_WITH_ITEM_TOOLTIP": "添加一個項目到清單裡。", - "LISTS_REPEAT_TOOLTIP": "建立一個清單,項目中包含指定重複次數的值。", - "LISTS_REPEAT_TITLE": "建立清單使用項目 %1 重複 %2 次", - "LISTS_LENGTH_TITLE": "長度 %1", - "LISTS_LENGTH_TOOLTIP": "返回清單的長度(項目數)。", - "LISTS_ISEMPTY_TITLE": "%1 值為空", - "LISTS_ISEMPTY_TOOLTIP": "如果該清單為空,則返回 true。", - "LISTS_INLIST": "自清單", - "LISTS_INDEX_OF_FIRST": "從 最前面 索引項目", - "LISTS_INDEX_OF_LAST": "從 最後面 索引項目", - "LISTS_INDEX_OF_TOOLTIP": "在清單中檢索是否有包含項目,如果有,返回從頭/倒數算起的索引值。如果沒有則返回 %1。", - "LISTS_GET_INDEX_GET": "取得", - "LISTS_GET_INDEX_GET_REMOVE": "取得並移除", - "LISTS_GET_INDEX_REMOVE": "移除", - "LISTS_GET_INDEX_FROM_END": "倒數第 # 筆", - "LISTS_GET_INDEX_FIRST": "第一筆", - "LISTS_GET_INDEX_LAST": "最後一筆", - "LISTS_GET_INDEX_RANDOM": "隨機", - "LISTS_INDEX_FROM_START_TOOLTIP": "%1 是第一個項目。", - "LISTS_INDEX_FROM_END_TOOLTIP": "%1 是最後一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_FROM": "返回在清單中指定位置的項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "返回清單中的第一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_LAST": "返回清單中的最後一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "返回清單中隨機一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM": "移除並返回清單中的指定位置的項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "移除並返回清單中的第一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "移除並返回清單中的最後一個項目。", - "LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "移除並返回清單中的隨機項目。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM": "移除在清單中指定位置的項目。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST": "移除清單中的第一個項目。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST": "移除清單中的最後一個項目。", - "LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM": "移除清單中隨機一個項目。", - "LISTS_SET_INDEX_SET": "設定", - "LISTS_SET_INDEX_INSERT": "添加", - "LISTS_SET_INDEX_INPUT_TO": "為", - "LISTS_SET_INDEX_TOOLTIP_SET_FROM": "設定清單中指定位置的項目。", - "LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "設定清單中的第一個項目。", - "LISTS_SET_INDEX_TOOLTIP_SET_LAST": "設定清單中的最後一個項目。", - "LISTS_SET_INDEX_TOOLTIP_SET_RANDOM": "設定清單中隨機一個項目。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FROM": "添加一個項目到清單中的指定位置。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST": "添加一個項目到清單中的第一個位置。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "添加一個項目到清單中的最後一個位置。", - "LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "添加一個項目到清單中的隨機位置。", - "LISTS_GET_SUBLIST_START_FROM_START": "取得子清單 從 #", - "LISTS_GET_SUBLIST_START_FROM_END": "取得子清單 從 # 倒數", - "LISTS_GET_SUBLIST_START_FIRST": "取得子清單 從 最前面", - "LISTS_GET_SUBLIST_END_FROM_START": "到 #", - "LISTS_GET_SUBLIST_END_FROM_END": "到 # 倒數", - "LISTS_GET_SUBLIST_END_LAST": "到 最後面", - "LISTS_GET_SUBLIST_TOOLTIP": "複製清單中指定的部分。", - "LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list", - "LISTS_SORT_TITLE": "排列 %1 %2 %3", - "LISTS_SORT_TOOLTIP": "排序清單的複製內容。", - "LISTS_SORT_ORDER_ASCENDING": "升序", - "LISTS_SORT_ORDER_DESCENDING": "降序", - "LISTS_SORT_TYPE_NUMERIC": "依數字", - "LISTS_SORT_TYPE_TEXT": "依字母", - "LISTS_SORT_TYPE_IGNORECASE": "依字母排序,忽略大小寫", - "LISTS_SPLIT_LIST_FROM_TEXT": "從文本製作清單", - "LISTS_SPLIT_TEXT_FROM_LIST": "從清單拆出文本", - "LISTS_SPLIT_WITH_DELIMITER": "用分隔符", - "LISTS_SPLIT_TOOLTIP_SPLIT": "將文本變成清單項目,按分隔符號拆分。", - "LISTS_SPLIT_TOOLTIP_JOIN": "串起清單項目成一個文本,並用分隔符號分開。", - "LISTS_REVERSE_HELPURL": "https://github.com/google/blockly/wiki/Lists#reversing-a-list", - "LISTS_REVERSE_MESSAGE0": "反轉%1", - "LISTS_REVERSE_TOOLTIP": "反轉清單的複製內容。", - "VARIABLES_GET_TOOLTIP": "返回此變數的值。", - "VARIABLES_GET_CREATE_SET": "建立「賦值 %1」", - "VARIABLES_SET": "賦值 %1 成 %2", - "VARIABLES_SET_TOOLTIP": "設定此變數,好和輸入結果相等。", - "VARIABLES_SET_CREATE_GET": "建立「取得 %1」", - "PROCEDURES_DEFNORETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程式", - "PROCEDURES_DEFNORETURN_TITLE": "到", - "PROCEDURES_DEFNORETURN_PROCEDURE": "做些什麼", - "PROCEDURES_BEFORE_PARAMS": "與:", - "PROCEDURES_CALL_BEFORE_PARAMS": "與:", - "PROCEDURES_DEFNORETURN_TOOLTIP": "創建一個無回傳值的函式。", - "PROCEDURES_DEFNORETURN_COMMENT": "描述此函式...", - "PROCEDURES_DEFRETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程式", - "PROCEDURES_DEFRETURN_RETURN": "返回", - "PROCEDURES_DEFRETURN_TOOLTIP": "創建一個有回傳值的的函式。", - "PROCEDURES_ALLOW_STATEMENTS": "允許陳述式", - "PROCEDURES_DEF_DUPLICATE_WARNING": "警告: 此函式中有重複的參數。", - "PROCEDURES_CALLNORETURN_HELPURL": "https://zh.wikipedia.org/wiki/子程式", - "PROCEDURES_CALLNORETURN_TOOLTIP": "執行使用者定義的函式「%1」。", - "PROCEDURES_CALLRETURN_HELPURL": "https://zh.wikipedia.org/wiki/%E5%AD%90%E7%A8%8B%E5%BA%8F", - "PROCEDURES_CALLRETURN_TOOLTIP": "執行使用者定義的函式「%1」,並使用它的回傳值。", - "PROCEDURES_MUTATORCONTAINER_TITLE": "輸入", - "PROCEDURES_MUTATORCONTAINER_TOOLTIP": "添加、刪除或重新排列此函式的輸入。", - "PROCEDURES_MUTATORARG_TITLE": "輸入名稱:", - "PROCEDURES_MUTATORARG_TOOLTIP": "添加一個輸入區塊到函式。", - "PROCEDURES_HIGHLIGHT_DEF": "反白顯示函式定義", - "PROCEDURES_CREATE_DO": "建立「%1」", - "PROCEDURES_IFRETURN_TOOLTIP": "如果值為 true,則返回第二個值。", - "PROCEDURES_IFRETURN_WARNING": "警告:這個區塊只可以在定義函式時使用。", - "WORKSPACE_COMMENT_DEFAULT_TEXT": "來說些事情...", - "WORKSPACE_ARIA_LABEL": "Blockly工作區", - "COLLAPSED_WARNINGS_WARNING": "收合含有警告的區塊。", - "DIALOG_OK": "確定", - "DIALOG_CANCEL": "取消" -} diff --git a/blockly/msg/messages.js b/blockly/msg/messages.js deleted file mode 100644 index 650df6b..0000000 --- a/blockly/msg/messages.js +++ /dev/null @@ -1,1598 +0,0 @@ -/** - * @license - * Copyright 2012 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @fileoverview English strings. - * @author fraser@google.com (Neil Fraser) - * - * After modifying this file, either run "npm run build:langfiles" from the - * parent directory, or run (from this directory): - * ../scripts/i18n/js_to_json.py - * to regenerate json/{en,qqq,synonyms}.json. - * - * To convert all of the json files to .js files, run: - * ../scripts/i18n/create_messages.py json/*.json - */ -'use strict'; - - -/** - * Due to the frequency of long strings, the 80-column wrap rule need not apply - * to message files. - */ - -/** - * Each message is preceded with a triple-slash comment that becomes the - * message descriptor. The build process extracts these descriptors, adds - * them to msg/json/qqq.json, and they show up in the translation console. - */ - -/** @type {string} */ -/// {{Notranslate}} Hue value for all logic blocks. -Blockly.Msg.LOGIC_HUE = '210'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all loop blocks. -Blockly.Msg.LOOPS_HUE = '120'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all math blocks. -Blockly.Msg.MATH_HUE = '230'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all text blocks. -Blockly.Msg.TEXTS_HUE = '160'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all list blocks. -Blockly.Msg.LISTS_HUE = '260'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all colour blocks. -Blockly.Msg.COLOUR_HUE = '20'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all variable blocks. -Blockly.Msg.VARIABLES_HUE = '330'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all variable dynamic blocks. -Blockly.Msg.VARIABLES_DYNAMIC_HUE = '310'; -/** @type {string} */ -/// {{Notranslate}} Hue value for all procedure blocks. -Blockly.Msg.PROCEDURES_HUE = '290'; - -/** @type {string} */ -/// default name - A simple, general default name for a variable, preferably short. -/// For more context, see -/// [[Translating:Blockly#infrequent_message_types]].\n{{Identical|Item}} -Blockly.Msg.VARIABLES_DEFAULT_NAME = 'item'; -/** @type {string} */ -/// default name - A simple, default name for an unnamed function or variable. Preferably indicates that the item is unnamed. -Blockly.Msg.UNNAMED_KEY = 'unnamed'; -/** @type {string} */ -/// button text - Button that sets a calendar to today's date.\n{{Identical|Today}} -Blockly.Msg.TODAY = 'Today'; - -// Context menus. -/** @type {string} */ -/// context menu - Make a copy of the selected block (and any blocks it contains).\n{{Identical|Duplicate}} -Blockly.Msg.DUPLICATE_BLOCK = 'Duplicate'; -/** @type {string} */ -/// context menu - Add a descriptive comment to the selected block. -Blockly.Msg.ADD_COMMENT = 'Add Comment'; -/** @type {string} */ -/// context menu - Remove the descriptive comment from the selected block. -Blockly.Msg.REMOVE_COMMENT = 'Remove Comment'; -/** @type {string} */ -/// context menu - Make a copy of the selected workspace comment.\n{{Identical|Duplicate}} -Blockly.Msg.DUPLICATE_COMMENT = 'Duplicate Comment'; -/** @type {string} */ -/// context menu - Change from 'external' to 'inline' mode for displaying blocks used as inputs to the selected block. See [[Translating:Blockly#context_menus]]. -Blockly.Msg.EXTERNAL_INPUTS = 'External Inputs'; -/** @type {string} */ -/// context menu - Change from 'internal' to 'external' mode for displaying blocks used as inputs to the selected block. See [[Translating:Blockly#context_menus]]. -Blockly.Msg.INLINE_INPUTS = 'Inline Inputs'; -/** @type {string} */ -/// context menu - Permanently delete the selected block. -Blockly.Msg.DELETE_BLOCK = 'Delete Block'; -/** @type {string} */ -/// context menu - Permanently delete the %1 selected blocks.\n\nParameters:\n* %1 - an integer greater than 1. -Blockly.Msg.DELETE_X_BLOCKS = 'Delete %1 Blocks'; -/** @type {string} */ -/// confirmation prompt - Question the user if they really wanted to permanently delete all %1 blocks.\n\nParameters:\n* %1 - an integer greater than 1. -Blockly.Msg.DELETE_ALL_BLOCKS = 'Delete all %1 blocks?'; -/** @type {string} */ -/// context menu - Reposition all the blocks so that they form a neat line. -Blockly.Msg.CLEAN_UP = 'Clean up Blocks'; -/** @type {string} */ -/// context menu - Make the appearance of the selected block smaller by hiding some information about it. -Blockly.Msg.COLLAPSE_BLOCK = 'Collapse Block'; -/** @type {string} */ -/// context menu - Make the appearance of all blocks smaller by hiding some information about it. Use the same terminology as in the previous message. -Blockly.Msg.COLLAPSE_ALL = 'Collapse Blocks'; -/** @type {string} */ -/// context menu - Restore the appearance of the selected block by showing information about it that was hidden (collapsed) earlier. -Blockly.Msg.EXPAND_BLOCK = 'Expand Block'; -/** @type {string} */ -/// context menu - Restore the appearance of all blocks by showing information about it that was hidden (collapsed) earlier. Use the same terminology as in the previous message. -Blockly.Msg.EXPAND_ALL = 'Expand Blocks'; -/** @type {string} */ -/// context menu - Make the selected block have no effect (unless reenabled). -Blockly.Msg.DISABLE_BLOCK = 'Disable Block'; -/** @type {string} */ -/// context menu - Make the selected block have effect (after having been disabled earlier). -Blockly.Msg.ENABLE_BLOCK = 'Enable Block'; -/** @type {string} */ -/// context menu - Provide helpful information about the selected block.\n{{Identical|Help}} -Blockly.Msg.HELP = 'Help'; -/** @type {string} */ -/// context menu - Undo the previous action.\n{{Identical|Undo}} -Blockly.Msg.UNDO = 'Undo'; -/** @type {string} */ -/// context menu - Undo the previous undo action.\n{{Identical|Redo}} -Blockly.Msg.REDO = 'Redo'; - -// Variable renaming. -/** @type {string} */ -/// 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:'; -/** @type {string} */ -/// 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...'; -/** @type {string} */ -/// 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 -/** @type {string} */ -/// button text - Text on the button used to launch the variable creation dialogue. -Blockly.Msg.NEW_VARIABLE = 'Create variable...'; -/** @type {string} */ -/// button text - Text on the button used to launch the variable creation dialogue. -Blockly.Msg.NEW_STRING_VARIABLE = 'Create string variable...'; -/** @type {string} */ -/// button text - Text on the button used to launch the variable creation dialogue. -Blockly.Msg.NEW_NUMBER_VARIABLE = 'Create number variable...'; -/** @type {string} */ -/// button text - Text on the button used to launch the variable creation dialogue. -Blockly.Msg.NEW_COLOUR_VARIABLE = 'Create colour variable...'; -/** @type {string} */ -/// prompt - Prompts the user to enter the type for a variable. -Blockly.Msg.NEW_VARIABLE_TYPE_TITLE = 'New variable type:'; -/** @type {string} */ -/// 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:'; -/** @type {string} */ -/// alert - Tells the user that the name they entered is already in use. -Blockly.Msg.VARIABLE_ALREADY_EXISTS = 'A variable named "%1" already exists.'; -/** @type {string} */ -/// alert - Tells the user that the name they entered is already in use for another type. -Blockly.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE = 'A variable named "%1" already exists for another type: "%2".'; - -// Variable deletion. -/** @type {string} */ -/// 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?'; -/** @type {string} */ -/// alert - Tell the user that they can't delete a variable because it's part of the definition of a function. -Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = 'Can\'t delete the variable "%1" because it\'s part of the definition of the function "%2"'; -/** @type {string} */ -/// dropdown choice - Delete the currently selected variable. -Blockly.Msg.DELETE_VARIABLE = 'Delete the "%1" variable'; - -// Colour Blocks. -/** @type {string} */ -/// {{Optional}} url - Information about colour. -Blockly.Msg.COLOUR_PICKER_HELPURL = 'https://en.wikipedia.org/wiki/Color'; -/** @type {string} */ -/// 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]. -Blockly.Msg.COLOUR_PICKER_TOOLTIP = 'Choose a colour from the palette.'; -/** @type {string} */ -/// {{Optional}} url - A link that displays a random colour each time you visit it. -Blockly.Msg.COLOUR_RANDOM_HELPURL = 'http://randomcolour.com'; -/** @type {string} */ -/// block text - Title of block that generates a colour at random. -Blockly.Msg.COLOUR_RANDOM_TITLE = 'random colour'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Colour#generating-a-random-colour https://github.com/google/blockly/wiki/Colour#generating-a-random-colour]. -Blockly.Msg.COLOUR_RANDOM_TOOLTIP = 'Choose a colour at random.'; -/** @type {string} */ -/// {{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. -Blockly.Msg.COLOUR_RGB_HELPURL = 'https://www.december.com/html/spec/colorpercompact.html'; -/** @type {string} */ -/// 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]. -Blockly.Msg.COLOUR_RGB_TITLE = 'colour with'; -/** @type {string} */ -/// 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}} -Blockly.Msg.COLOUR_RGB_RED = 'red'; -/** @type {string} */ -/// 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]. -Blockly.Msg.COLOUR_RGB_GREEN = 'green'; -/** @type {string} */ -/// 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}} -Blockly.Msg.COLOUR_RGB_BLUE = 'blue'; -/** @type {string} */ -/// 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]. -Blockly.Msg.COLOUR_RGB_TOOLTIP = 'Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.'; -/** @type {string} */ -/// {{Optional}} url - A useful link that displays blending of two colours. -Blockly.Msg.COLOUR_BLEND_HELPURL = 'https://meyerweb.com/eric/tools/color-blend/#:::rgbp'; -/** @type {string} */ -/// block text - A verb for blending two shades of paint. -Blockly.Msg.COLOUR_BLEND_TITLE = 'blend'; -/** @type {string} */ -/// block input text - The first of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend]. -Blockly.Msg.COLOUR_BLEND_COLOUR1 = 'colour 1'; -/** @type {string} */ -/// block input text - The second of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend]. -Blockly.Msg.COLOUR_BLEND_COLOUR2 = 'colour 2'; -/** @type {string} */ -/// block input text - The proportion of the [https://github.com/google/blockly/wiki/Colour#blending-colours blend] containing the first colour; the remaining proportion is of the second colour. For example, if the first colour is red and the second colour blue, a ratio of 1 would yield pure red, a ratio of .5 would yield purple (equal amounts of red and blue), and a ratio of 0 would yield pure blue.\n{{Identical|Ratio}} -Blockly.Msg.COLOUR_BLEND_RATIO = 'ratio'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Colour#blending-colours https://github.com/google/blockly/wiki/Colour#blending-colours]. -Blockly.Msg.COLOUR_BLEND_TOOLTIP = 'Blends two colours together with a given ratio (0.0 - 1.0).'; - -// Loop Blocks. -/** @type {string} */ -/// {{Optional}} url - Describes 'repeat loops' in computer programs; consider using the translation of the page [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow]. -Blockly.Msg.CONTROLS_REPEAT_HELPURL = 'https://en.wikipedia.org/wiki/For_loop'; -/** @type {string} */ -/// block input text - Title of [https://github.com/google/blockly/wiki/Loops#repeat repeat block].\n\nParameters:\n* %1 - the number of times the body of the loop should be repeated. -Blockly.Msg.CONTROLS_REPEAT_TITLE = 'repeat %1 times'; -/** @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'; -/** @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.'; -/** @type {string} */ -/// {{Optional}} url - Describes 'while loops' in computer programs; consider using the translation of [https://en.wikipedia.org/wiki/While_loop https://en.wikipedia.org/wiki/While_loop], if present, or [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow]. -Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = 'https://github.com/google/blockly/wiki/Loops#repeat'; -/** @type {string} */ -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -/** @type {string} */ -/// dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-while repeat while] the following condition is true. -Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = 'repeat while'; -/** @type {string} */ -/// dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-until repeat until] the following condition becomes true. -Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = 'repeat until'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while]. -Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = 'While a value is true, then do some statements.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-until https://github.com/google/blockly/wiki/Loops#repeat-until]. -Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = 'While a value is false, then do some statements.'; - -/** @type {string} */ -/// {{Optional}} url - Describes 'for loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/For_loop https://en.wikipedia.org/wiki/For_loop], if present. -Blockly.Msg.CONTROLS_FOR_HELPURL = 'https://github.com/google/blockly/wiki/Loops#count-with'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Loops#count-with https://github.com/google/blockly/wiki/Loops#count-with].\n\nParameters:\n* %1 - the name of the loop variable. -Blockly.Msg.CONTROLS_FOR_TOOLTIP = 'Have the variable "%1" take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.'; -/** @type {string} */ -/// block text - Repeatedly counts a variable (%1) -/// starting with a (usually lower) number in a range (%2), -/// ending with a (usually higher) number in a range (%3), and counting the -/// iterations by a number of steps (%4). As in -/// [https://github.com/google/blockly/wiki/Loops#count-with -/// https://github.com/google/blockly/wiki/Loops#count-with]. -/// [[File:Blockly-count-with.png]] -Blockly.Msg.CONTROLS_FOR_TITLE = 'count with %1 from %2 to %3 by %4'; -/** @type {string} */ -Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; - -/** @type {string} */ -/// {{Optional}} url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present. -Blockly.Msg.CONTROLS_FOREACH_HELPURL = 'https://github.com/google/blockly/wiki/Loops#for-each'; -/** @type {string} */ -/// block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block]. -/// Sequentially assigns every item in array %2 to the valiable %1. -Blockly.Msg.CONTROLS_FOREACH_TITLE = 'for each item %1 in list %2'; -/** @type {string} */ -Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -/** @type {string} */ -/// block text - Description of [https://github.com/google/blockly/wiki/Loops#for-each for each blocks].\n\nParameters:\n* %1 - the name of the loop variable. -Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = 'For each item in a list, set the variable "%1" to the item, and then do some statements.'; - -/** @type {string} */ -/// {{Optional}} url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = 'https://github.com/google/blockly/wiki/Loops#loop-termination-blocks'; -/** @type {string} */ -/// dropdown - The current loop should be exited. See [https://github.com/google/blockly/wiki/Loops#break https://github.com/google/blockly/wiki/Loops#break]. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = 'break out of loop'; -/** @type {string} */ -/// dropdown - The current iteration of the loop should be ended and the next should begin. See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration]. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = 'continue with next iteration of loop'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Loops#break-out-of-loop https://github.com/google/blockly/wiki/Loops#break-out-of-loop]. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = 'Break out of the containing loop.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration]. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = 'Skip the rest of this loop, and continue with the next iteration.'; -/** @type {string} */ -/// warning - The user has tried placing a block outside of a loop (for each, while, repeat, etc.), but this type of block may only be used within a loop. See [https://github.com/google/blockly/wiki/Loops#loop-termination-blocks https://github.com/google/blockly/wiki/Loops#loop-termination-blocks]. -Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = 'Warning: This block may only be used within a loop.'; - -// Logic Blocks. -/** @type {string} */ -/// {{Optional}} url - Describes conditional statements (if-then-else) in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_else https://en.wikipedia.org/wiki/If_else], if present. -Blockly.Msg.CONTROLS_IF_HELPURL = 'https://github.com/google/blockly/wiki/IfElse'; -/** @type {string} */ -/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-blocks 'if' blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present. -Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = 'If a value is true, then do some statements.'; -/** @type {string} */ -/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-blocks if-else blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present. -Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = 'If a value is true, then do the first block of statements. Otherwise, do the second block of statements.'; -/** @type {string} */ -/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-if-blocks if-else-if blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present. -Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = 'If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.'; -/** @type {string} */ -/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-if-else-blocks if-else-if-else blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present. -Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = 'If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.'; -/** @type {string} */ -/// 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}} -Blockly.Msg.CONTROLS_IF_MSG_IF = 'if'; -/** @type {string} */ -/// 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. -Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = 'else if'; -/** @type {string} */ -/// 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; -/** @type {string} */ -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -/** @type {string} */ -/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification]. -Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = 'Add, remove, or reorder sections to reconfigure this if block.'; -/** @type {string} */ -Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -/** @type {string} */ -/// tooltip - Describes the 'else if' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification]. -Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = 'Add a condition to the if block.'; -/** @type {string} */ -Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; -/** @type {string} */ -/// tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification]. -Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = 'Add a final, catch-all condition to the if block.'; - -/** @type {string} */ -/// {{Optional}} url - Information about comparisons. -Blockly.Msg.LOGIC_COMPARE_HELPURL = 'https://en.wikipedia.org/wiki/Inequality_(mathematics)'; -/** @type {string} */ -/// tooltip - Describes the equals (=) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = 'Return true if both inputs equal each other.'; -/** @type {string} */ -/// tooltip - Describes the not equals (≠) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = 'Return true if both inputs are not equal to each other.'; -/** @type {string} */ -/// tooltip - Describes the less than (<) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = 'Return true if the first input is smaller than the second input.'; -/** @type {string} */ -/// tooltip - Describes the less than or equals (≤) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = 'Return true if the first input is smaller than or equal to the second input.'; -/** @type {string} */ -/// tooltip - Describes the greater than (>) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = 'Return true if the first input is greater than the second input.'; -/** @type {string} */ -/// tooltip - Describes the greater than or equals (≥) block. -Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = 'Return true if the first input is greater than or equal to the second input.'; - -/** @type {string} */ -/// {{Optional}} url - Information about the Boolean conjunction ("and") and disjunction ("or") operators. Consider using the translation of [https://en.wikipedia.org/wiki/Boolean_logic https://en.wikipedia.org/wiki/Boolean_logic], if it exists in your language. -Blockly.Msg.LOGIC_OPERATION_HELPURL = 'https://github.com/google/blockly/wiki/Logic#logical-operations'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction]. -Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = 'Return true if both inputs are true.'; -/** @type {string} */ -/// block text - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].\n{{Identical|And}} -Blockly.Msg.LOGIC_OPERATION_AND = 'and'; -/** @type {string} */ -/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction]. -Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = 'Return true if at least one of the inputs is true.'; -/** @type {string} */ -/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].\n{{Identical|Or}} -Blockly.Msg.LOGIC_OPERATION_OR = 'or'; - -/** @type {string} */ -/// {{Optional}} url - Information about logical negation. The translation of [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation] is recommended if it exists in the target language. -Blockly.Msg.LOGIC_NEGATE_HELPURL = 'https://github.com/google/blockly/wiki/Logic#not'; -/** @type {string} */ -/// block text - This is a unary operator that returns ''false'' when the input is ''true'', and ''true'' when the input is ''false''. -/// \n\nParameters:\n* %1 - the input (which should be either the value "true" or "false") -Blockly.Msg.LOGIC_NEGATE_TITLE = 'not %1'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation]. -Blockly.Msg.LOGIC_NEGATE_TOOLTIP = 'Returns true if the input is false. Returns false if the input is true.'; - -/** @type {string} */ -/// {{Optional}} url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language. -Blockly.Msg.LOGIC_BOOLEAN_HELPURL = 'https://github.com/google/blockly/wiki/Logic#values'; -/** @type {string} */ -/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.\n{{Identical|True}} -Blockly.Msg.LOGIC_BOOLEAN_TRUE = 'true'; -/** @type {string} */ -/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.\n{{Identical|False}} -Blockly.Msg.LOGIC_BOOLEAN_FALSE = 'false'; -/** @type {string} */ -/// tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values]. -Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = 'Returns either true or false.'; - -/** @type {string} */ -/// {{Optional}} url - Provide a link to the translation of [https://en.wikipedia.org/wiki/Nullable_type https://en.wikipedia.org/wiki/Nullable_type], if it exists in your language; otherwise, do not worry about translating this advanced concept. -Blockly.Msg.LOGIC_NULL_HELPURL = 'https://en.wikipedia.org/wiki/Nullable_type'; -/** @type {string} */ -/// block text - In computer languages, ''null'' is a special value that indicates that no value has been set. You may use your language's word for "nothing" or "invalid".\n{{Identical|Null}} -Blockly.Msg.LOGIC_NULL = 'null'; -/** @type {string} */ -/// tooltip - This should use the word from the previous message. -Blockly.Msg.LOGIC_NULL_TOOLTIP = 'Returns null.'; - -/** @type {string} */ -/// {{Optional}} url - Describes the programming language operator known as the ''ternary'' or ''conditional'' operator. It is recommended that you use the translation of [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:] if it exists. -Blockly.Msg.LOGIC_TERNARY_HELPURL = 'https://en.wikipedia.org/wiki/%3F:'; -/** @type {string} */ -/// block input text - Label for the input whose value determines which of the other two inputs is returned. In some programming languages, this is called a ''''predicate''''. -Blockly.Msg.LOGIC_TERNARY_CONDITION = 'test'; -/** @type {string} */ -/// block input text - Indicates that the following input should be returned (used as output) if the test input is true. Remember to try to keep block text terse (short). -Blockly.Msg.LOGIC_TERNARY_IF_TRUE = 'if true'; -/** @type {string} */ -/// block input text - Indicates that the following input should be returned (used as output) if the test input is false. -Blockly.Msg.LOGIC_TERNARY_IF_FALSE = 'if false'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:]. -Blockly.Msg.LOGIC_TERNARY_TOOLTIP = 'Check the condition in "test". If the condition is true, returns the "if true" value; otherwise returns the "if false" value.'; - -// Math Blocks. -/** @type {string} */ -/// {{Optional}} url - Information about (real) numbers. -Blockly.Msg.MATH_NUMBER_HELPURL = 'https://en.wikipedia.org/wiki/Number'; -/** @type {string} */ -/// tooltip - Any positive or negative number, not necessarily an integer. -Blockly.Msg.MATH_NUMBER_TOOLTIP = 'A number.'; - -/** @type {string} */ -/// {{Optional}} math - The symbol for the binary operation addition. -Blockly.Msg.MATH_ADDITION_SYMBOL = '+'; -/** @type {string} */ -/// {{Optional}} math - The symbol for the binary operation indicating that the right operand should be -/// subtracted from the left operand. -Blockly.Msg.MATH_SUBTRACTION_SYMBOL = '-'; -/** @type {string} */ -/// {{Optional}} math - The binary operation indicating that the left operand should be divided by -/// the right operand. -Blockly.Msg.MATH_DIVISION_SYMBOL = '÷'; -/** @type {string} */ -/// {{Optional}} math - The symbol for the binary operation multiplication. -Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = '×'; -/** @type {string} */ -/// {{Optional}} math - The symbol for the binary operation exponentiation. Specifically, if the -/// value of the left operand is L and the value of the right operand (the exponent) is -/// R, multiply L by itself R times. (Fractional and negative exponents are also legal.) -Blockly.Msg.MATH_POWER_SYMBOL = '^'; - -/** @type {string} */ -/// math - The short name of the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine]. -Blockly.Msg.MATH_TRIG_SIN = 'sin'; -/** @type {string} */ -/// math - The short name of the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine]. -Blockly.Msg.MATH_TRIG_COS = 'cos'; -/** @type {string} */ -/// math - The short name of the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent]. -Blockly.Msg.MATH_TRIG_TAN = 'tan'; -/** @type {string} */ -/// math - The short name of the ''inverse of'' the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine]. -Blockly.Msg.MATH_TRIG_ASIN = 'asin'; -/** @type {string} */ -/// math - The short name of the ''inverse of'' the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine]. -Blockly.Msg.MATH_TRIG_ACOS = 'acos'; -/** @type {string} */ -/// math - The short name of the ''inverse of'' the trigonometric function -/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent]. -Blockly.Msg.MATH_TRIG_ATAN = 'atan'; - -/** @type {string} */ -/// {{Optional}} url - Information about addition, subtraction, multiplication, division, and exponentiation. -Blockly.Msg.MATH_ARITHMETIC_HELPURL = 'https://en.wikipedia.org/wiki/Arithmetic'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Addition https://en.wikipedia.org/wiki/Addition]. -Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = 'Return the sum of the two numbers.'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Subtraction https://en.wikipedia.org/wiki/Subtraction]. -Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = 'Return the difference of the two numbers.'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Multiplication https://en.wikipedia.org/wiki/Multiplication]. -Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = 'Return the product of the two numbers.'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Division_(mathematics) https://en.wikipedia.org/wiki/Division_(mathematics)]. -Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = 'Return the quotient of the two numbers.'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Exponentiation https://en.wikipedia.org/wiki/Exponentiation]. -Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = 'Return the first number raised to the power of the second number.'; - -/** @type {string} */ -/// {{Optional}} url - Information about the square root operation. -Blockly.Msg.MATH_SINGLE_HELPURL = 'https://en.wikipedia.org/wiki/Square_root'; -/** @type {string} */ -/// dropdown - This computes the positive [https://en.wikipedia.org/wiki/Square_root square root] of its input. For example, the square root of 16 is 4. -Blockly.Msg.MATH_SINGLE_OP_ROOT = 'square root'; -/** @type {string} */ -/// tooltip - Please use the same term as in the previous message. -Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = 'Return the square root of a number.'; -/** @type {string} */ -/// dropdown - This leaves positive numeric inputs changed and inverts negative inputs. For example, the absolute value of 5 is 5; the absolute value of -5 is also 5. For more information, see [https://en.wikipedia.org/wiki/Absolute_value https://en.wikipedia.org/wiki/Absolute_value]. -Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = 'absolute'; -/** @type {string} */ -/// tooltip - Please use the same term as in the previous message. -Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = 'Return the absolute value of a number.'; - -/** @type {string} */ -/// tooltip - Calculates '''0-n''', where '''n''' is the single numeric input. -Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = 'Return the negation of a number.'; -/** @type {string} */ -/// tooltip - Calculates the [https://en.wikipedia.org/wiki/Natural_logarithm|natural logarithm] of its single numeric input. -Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = 'Return the natural logarithm of a number.'; -/** @type {string} */ -/// tooltip - Calculates the [https://en.wikipedia.org/wiki/Common_logarithm common logarithm] of its single numeric input. -Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = 'Return the base 10 logarithm of a number.'; -/** @type {string} */ -/// tooltip - Multiplies [https://en.wikipedia.org/wiki/E_(mathematical_constant) e] by itself n times, where n is the single numeric input. -Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = 'Return e to the power of a number.'; -/** @type {string} */ -/// tooltip - Multiplies 10 by itself n times, where n is the single numeric input. -Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = 'Return 10 to the power of a number.'; - -/** @type {string} */ -/// {{Optional}} url - Information about the trigonometric functions sine, cosine, tangent, and their inverses (ideally using degrees, not radians). -Blockly.Msg.MATH_TRIG_HELPURL = 'https://en.wikipedia.org/wiki/Trigonometric_functions'; -/** @type {string} */ -/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = 'Return the sine of a degree (not radian).'; -/** @type {string} */ -/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_COS = 'Return the cosine of a degree (not radian).'; -/** @type {string} */ -/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = 'Return the tangent of a degree (not radian).'; -/** @type {string} */ -/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent sine function], using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = 'Return the arcsine of a number.'; -/** @type {string} */ -/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent cosine] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = 'Return the arccosine of a number.'; -/** @type {string} */ -/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent tangent] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians. -Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = 'Return the arctangent of a number.'; - -/** @type {string} */ -/// {{Optional}} url - Information about the mathematical constants Pi (π), e, the golden ratio (φ), √ 2, √ 1/2, and infinity (∞). -Blockly.Msg.MATH_CONSTANT_HELPURL = 'https://en.wikipedia.org/wiki/Mathematical_constant'; -/** @type {string} */ -/// tooltip - Provides the specified [https://en.wikipedia.org/wiki/Mathematical_constant mathematical constant]. -Blockly.Msg.MATH_CONSTANT_TOOLTIP = 'Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).'; -/** @type {string} */ -/// dropdown - A number is '''even''' if it is a multiple of 2. For example, 4 is even (yielding true), but 3 is not (false). -Blockly.Msg.MATH_IS_EVEN = 'is even'; -/** @type {string} */ -/// dropdown - A number is '''odd''' if it is not a multiple of 2. For example, 3 is odd (yielding true), but 4 is not (false). The opposite of "odd" is "even". -Blockly.Msg.MATH_IS_ODD = 'is odd'; -/** @type {string} */ -/// dropdown - A number is [https://en.wikipedia.org/wiki/Prime prime] if it cannot be evenly divided by any positive integers except for 1 and itself. For example, 5 is prime, but 6 is not because 2 × 3 = 6. -Blockly.Msg.MATH_IS_PRIME = 'is prime'; -/** @type {string} */ -/// dropdown - A number is '''whole''' if it is an [https://en.wikipedia.org/wiki/Integer integer]. For example, 5 is whole, but 5.1 is not. -Blockly.Msg.MATH_IS_WHOLE = 'is whole'; -/** @type {string} */ -/// dropdown - A number is '''positive''' if it is greater than 0. (0 is neither negative nor positive.) -Blockly.Msg.MATH_IS_POSITIVE = 'is positive'; -/** @type {string} */ -/// dropdown - A number is '''negative''' if it is less than 0. (0 is neither negative nor positive.) -Blockly.Msg.MATH_IS_NEGATIVE = 'is negative'; -/** @type {string} */ -/// dropdown - A number x is divisible by y if y goes into x evenly. For example, 10 is divisible by 5, but 10 is not divisible by 3. -Blockly.Msg.MATH_IS_DIVISIBLE_BY = 'is divisible by'; -/** @type {string} */ -/// tooltip - This block lets the user specify via a dropdown menu whether to check if the numeric input is even, odd, prime, whole, positive, negative, or divisible by a given value. -Blockly.Msg.MATH_IS_TOOLTIP = 'Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.'; - -/** @type {string} */ -/// {{Optional}} url - Information about incrementing (increasing the value of) a variable. -/// For other languages, just use the translation of the Wikipedia page about -/// addition ([https://en.wikipedia.org/wiki/Addition https://en.wikipedia.org/wiki/Addition]). -Blockly.Msg.MATH_CHANGE_HELPURL = 'https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter'; -/** @type {string} */ -/// - As in: ''change'' [the value of variable] ''item'' ''by'' 1 (e.g., if the variable named 'item' had the value 5, change it to 6). -/// %1 is a variable name. -/// %2 is the amount of change. -Blockly.Msg.MATH_CHANGE_TITLE = 'change %1 by %2'; -/** @type {string} */ -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -/** @type {string} */ -/// tooltip - This updates the value of the variable by adding to it the following numeric input.\n\nParameters:\n* %1 - the name of the variable whose value should be increased. -Blockly.Msg.MATH_CHANGE_TOOLTIP = 'Add a number to variable "%1".'; - -/** @type {string} */ -/// {{Optional}} url - Information about how numbers are rounded to the nearest integer -Blockly.Msg.MATH_ROUND_HELPURL = 'https://en.wikipedia.org/wiki/Rounding'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Rounding https://en.wikipedia.org/wiki/Rounding]. -Blockly.Msg.MATH_ROUND_TOOLTIP = 'Round a number up or down.'; -/** @type {string} */ -/// dropdown - This rounds its input to the nearest whole number. For example, 3.4 is rounded to 3. -Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = 'round'; -/** @type {string} */ -/// dropdown - This rounds its input up to the nearest whole number. For example, if the input was 2.2, the result would be 3. -Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = 'round up'; -/** @type {string} */ -/// dropdown - This rounds its input down to the nearest whole number. For example, if the input was 3.8, the result would be 3. -Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = 'round down'; - -/** @type {string} */ -/// {{Optional}} url - Information about applying a function to a list of numbers. (We were unable to find such information in English. Feel free to skip this and any other URLs that are difficult.) -Blockly.Msg.MATH_ONLIST_HELPURL = ''; -/** @type {string} */ -/// dropdown - This computes the sum of the numeric elements in the list. For example, the sum of the list {1, 4} is 5. -Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = 'sum of list'; -/** @type {string} */ -/// tooltip - Please use the same term for "sum" as in the previous message. -Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = 'Return the sum of all the numbers in the list.'; -/** @type {string} */ -/// dropdown - This finds the smallest (minimum) number in a list. For example, the smallest number in the list [-5, 0, 3] is -5. -Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = 'min of list'; -/** @type {string} */ -/// tooltip - Please use the same term for "min" or "minimum" as in the previous message. -Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = 'Return the smallest number in the list.'; -/** @type {string} */ -/// dropdown - This finds the largest (maximum) number in a list. For example, the largest number in the list [-5, 0, 3] is 3. -Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = 'max of list'; -/** @type {string} */ -/// tooltip -Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = 'Return the largest number in the list.'; -/** @type {string} */ -/// dropdown - This adds up all of the numbers in a list and divides the sum by the number of elements in the list. For example, the [https://en.wikipedia.org/wiki/Arithmetic_mean average] of the list [1, 2, 3, 4] is 2.5 (10/4). -Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = 'average of list'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Arithmetic_mean https://en.wikipedia.org/wiki/Arithmetic_mean] for more informatin. -Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = 'Return the average (arithmetic mean) of the numeric values in the list.'; -/** @type {string} */ -/// dropdown - This finds the [https://en.wikipedia.org/wiki/Median median] of the numeric values in a list. For example, the median of the list {1, 2, 7, 12, 13} is 7. -Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = 'median of list'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Median median https://en.wikipedia.org/wiki/Median median] for more information. -Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = 'Return the median number in the list.'; -/** @type {string} */ -/// dropdown - This finds the most common numbers ([https://en.wikipedia.org/wiki/Mode_(statistics) modes]) in a list. For example, the modes of the list {1, 3, 9, 3, 9} are {3, 9}. -Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = 'modes of list'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Mode_(statistics) https://en.wikipedia.org/wiki/Mode_(statistics)] for more information. -Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = 'Return a list of the most common item(s) in the list.'; -/** @type {string} */ -/// dropdown - This finds the [https://en.wikipedia.org/wiki/Standard_deviation standard deviation] of the numeric values in a list. -Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = 'standard deviation of list'; -/** @type {string} */ -/// tooltip - See [https://en.wikipedia.org/wiki/Standard_deviation https://en.wikipedia.org/wiki/Standard_deviation] for more information. -Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = 'Return the standard deviation of the list.'; -/** @type {string} */ -/// dropdown - This choose an element at random from a list. Each element is chosen with equal probability. -Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = 'random item of list'; -/** @type {string} */ -/// tooltip - Please use same term for 'random' as in previous entry. -Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = 'Return a random element from the list.'; - -/** @type {string} */ -/// {{Optional}} url - information about the modulo (remainder) operation. -Blockly.Msg.MATH_MODULO_HELPURL = 'https://en.wikipedia.org/wiki/Modulo_operation'; -/** @type {string} */ -/// block text - Title of block providing the remainder when dividing the first numerical input by the second. For example, the remainder of 10 divided by 3 is 1.\n\nParameters:\n* %1 - the dividend (10, in our example)\n* %2 - the divisor (3 in our example). -Blockly.Msg.MATH_MODULO_TITLE = 'remainder of %1 ÷ %2'; -/** @type {string} */ -/// tooltip - For example, the remainder of 10 divided by 3 is 1. -Blockly.Msg.MATH_MODULO_TOOLTIP = 'Return the remainder from dividing the two numbers.'; - -/** @type {string} */ -/// {{Optional}} url - Information about constraining a numeric value to be in a specific range. (The English URL is not ideal. Recall that translating URLs is the lowest priority.) -Blockly.Msg.MATH_CONSTRAIN_HELPURL = 'https://en.wikipedia.org/wiki/Clamping_(graphics)'; -/** @type {string} */ -/// block text - The title of the block that '''constrain'''s (forces) a number to be in a given range. -///For example, if the number 150 is constrained to be between 5 and 100, the result will be 100. -///\n\nParameters:\n* %1 - the value to constrain (e.g., 150)\n* %2 - the minimum value (e.g., 5)\n* %3 - the maximum value (e.g., 100). -Blockly.Msg.MATH_CONSTRAIN_TITLE = 'constrain %1 low %2 high %3'; -/** @type {string} */ -/// tooltip - This compares a number ''x'' to a low value ''L'' and a high value ''H''. If ''x'' is less then ''L'', the result is ''L''. If ''x'' is greater than ''H'', the result is ''H''. Otherwise, the result is ''x''. -Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = 'Constrain a number to be between the specified limits (inclusive).'; - -/** @type {string} */ -/// {{Optional}} url - Information about how computers generate random numbers. -Blockly.Msg.MATH_RANDOM_INT_HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation'; -/** @type {string} */ -/// block text - The title of the block that generates a random integer (whole number) in the specified range. For example, if the range is from 5 to 7, this returns 5, 6, or 7 with equal likelihood. %1 is a placeholder for the lower number, %2 is the placeholder for the larger number. -Blockly.Msg.MATH_RANDOM_INT_TITLE = 'random integer from %1 to %2'; -/** @type {string} */ -/// tooltip - Return a random integer between two values specified as inputs. For example, if one input was 7 and another 9, any of the numbers 7, 8, or 9 could be produced. -Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = 'Return a random integer between the two specified limits, inclusive.'; - -/** @type {string} */ -/// {{Optional}} url - Information about how computers generate random numbers (specifically, numbers in the range from 0 to just below 1). -Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation'; -/** @type {string} */ -/// block text - The title of the block that generates a random number greater than or equal to 0 and less than 1. -Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = 'random fraction'; -/** @type {string} */ -/// tooltip - Return a random fraction between 0 and 1. The value may be equal to 0 but must be less than 1. -Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = 'Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).'; - -/** @type {string} */ -/// {{Optional}} url - Information about how to calculate atan2. -Blockly.Msg.MATH_ATAN2_HELPURL = 'https://en.wikipedia.org/wiki/Atan2'; -/** @type {string} */ -/// block text - The title of the block that calculates atan2 of point (X, Y). For example, if the point is (-1, -1), this returns -135. %1 is a placeholder for the X coordinate, %2 is the placeholder for the Y coordinate. -Blockly.Msg.MATH_ATAN2_TITLE = 'atan2 of X:%1 Y:%2'; -/** @type {string} */ -/// tooltip - Return the arctangent of point (X, Y) in degrees from -180 to 180. For example, if the point is (-1, -1) this returns -135. -Blockly.Msg.MATH_ATAN2_TOOLTIP = 'Return the arctangent of point (X, Y) in degrees from -180 to 180.'; - -// Text Blocks. -/** @type {string} */ -/// {{Optional}} url - Information about how computers represent text (sometimes referred to as ''string''s). -Blockly.Msg.TEXT_TEXT_HELPURL = 'https://en.wikipedia.org/wiki/String_(computer_science)'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text https://github.com/google/blockly/wiki/Text]. -Blockly.Msg.TEXT_TEXT_TOOLTIP = 'A letter, word, or line of text.'; - -/** @type {string} */ -/// {{Optional}} url - Information on concatenating/appending pieces of text. -Blockly.Msg.TEXT_JOIN_HELPURL = 'https://github.com/google/blockly/wiki/Text#text-creation'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation]. -Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = 'create text with'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation create text with] for more information. -Blockly.Msg.TEXT_JOIN_TOOLTIP = 'Create a piece of text by joining together any number of items.'; - -/** @type {string} */ -/// block text - This is shown when the programmer wants to change the number of pieces of text being joined together. See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.\n{{Identical|Join}} -Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = 'join'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section. -Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = 'Add, remove, or reorder sections to reconfigure this text block.'; -/** @type {string} */ -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section. -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = 'Add an item to the text.'; - -/** @type {string} */ -/// {{Optional}} url - This and the other text-related URLs are going to be hard to translate. As always, it is okay to leave untranslated or paste in the English-language URL. For these URLs, you might also consider a general URL about how computers represent text (such as the translation of [https://en.wikipedia.org/wiki/String_(computer_science) this Wikipedia page]). -Blockly.Msg.TEXT_APPEND_HELPURL = 'https://github.com/google/blockly/wiki/Text#text-modification'; -/** @type {string} */ -/// block input text - Message that the variable name at %1 will have the item at %2 appended to it. -/// [[File:blockly-append-text.png]] -Blockly.Msg.TEXT_APPEND_TITLE = 'to %1 append text %2'; -/** @type {string} */ -Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-modification https://github.com/google/blockly/wiki/Text#text-modification] for more information.\n\nParameters:\n* %1 - the name of the variable to which text should be appended -Blockly.Msg.TEXT_APPEND_TOOLTIP = 'Append some text to variable "%1".'; - -/** @type {string} */ -/// {{Optional}} url - Information about text on computers (usually referred to as 'strings'). -Blockly.Msg.TEXT_LENGTH_HELPURL = 'https://github.com/google/blockly/wiki/Text#text-modification'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length]. -/// \n\nParameters:\n* %1 - the piece of text to take the length of -Blockly.Msg.TEXT_LENGTH_TITLE = 'length of %1'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length]. -Blockly.Msg.TEXT_LENGTH_TOOLTIP = 'Returns the number of letters (including spaces) in the provided text.'; - -/** @type {string} */ -/// {{Optional}} url - Information about empty pieces of text on computers (usually referred to as 'empty strings'). -Blockly.Msg.TEXT_ISEMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Text#checking-for-empty-text'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text]. -/// \n\nParameters:\n* %1 - the piece of text to test for emptiness -Blockly.Msg.TEXT_ISEMPTY_TITLE = '%1 is empty'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text]. -Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = 'Returns true if the provided text is empty.'; - -/** @type {string} */ -/// {{Optional}} url - Information about finding a character in a piece of text. -Blockly.Msg.TEXT_INDEXOF_HELPURL = 'https://github.com/google/blockly/wiki/Text#finding-text'; -/** @type {string} */ -/// tooltip - %1 will be replaced by either the number 0 or -1 depending on the indexing mode. See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text]. -Blockly.Msg.TEXT_INDEXOF_TOOLTIP = 'Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.'; -/** @type {string} */ -/// block text - Title of blocks allowing users to find text. See -/// [https://github.com/google/blockly/wiki/Text#finding-text -/// https://github.com/google/blockly/wiki/Text#finding-text]. -/// [[File:Blockly-find-text.png]]. -/// In English the expanded message is "in text %1 find (first|last) occurance of text %3" -/// where %1 and %3 are added by the user. See TEXT_INDEXOF_OPERATOR_FIRST and -/// TEXT_INDEXOF_OPERATOR_LAST for the dropdown text that replaces %2. -Blockly.Msg.TEXT_INDEXOF_TITLE = 'in text %1 %2 %3'; -/** @type {string} */ -/// dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text -/// https://github.com/google/blockly/wiki/Text#finding-text]. -/// [[File:Blockly-find-text.png]]. -Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = 'find first occurrence of text'; -/** @type {string} */ -/// dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text -/// https://github.com/google/blockly/wiki/Text#finding-text]. This would -/// replace "find first occurrence of text" below. (For more information on -/// how common text is factored out of dropdown menus, see -/// [https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus -/// https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus)].) -/// [[File:Blockly-find-text.png]]. -Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = 'find last occurrence of text'; -/** @type {string} */ - -/// {{Optional}} url - Information about extracting characters (letters, number, symbols, etc.) from text. -Blockly.Msg.TEXT_CHARAT_HELPURL = 'https://github.com/google/blockly/wiki/Text#extracting-text'; -/** @type {string} */ -/// block text - Text for a block to extract a letter (or number, -/// punctuation character, etc.) from a string, as shown below. %1 is added by -/// the user and %2 is replaced by a dropdown of options, possibly followed by -/// another user supplied string. TEXT_CHARAT_TAIL is then added to the end. 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]] -Blockly.Msg.TEXT_CHARAT_TITLE = 'in text %1 %2'; -/** @type {string} */ -/// dropdown - Indicates that the letter (or number, punctuation character, etc.) with the -/// specified index should be obtained from the preceding piece of text. 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]] -Blockly.Msg.TEXT_CHARAT_FROM_START = 'get letter #'; -/** @type {string} */ -/// block text - Indicates that the letter (or number, punctuation character, etc.) with the -/// specified index from the end of a given piece of text should be obtained. 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]] -Blockly.Msg.TEXT_CHARAT_FROM_END = 'get letter # from end'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_CHARAT_FIRST = 'get first letter'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_CHARAT_LAST = 'get last letter'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_CHARAT_RANDOM = 'get random letter'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_CHARAT_TAIL = ''; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_CHARAT_TOOLTIP = 'Returns the letter at the specified position.'; - -/** @type {string} */ -/// 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]. -Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = 'Returns a specified portion of the text.'; -/** @type {string} */ -/// {{Optional}} url - Information about extracting characters from text. Reminder: urls are the -/// lowest priority translations. Feel free to skip. -Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = 'https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text'; -/** @type {string} */ -/// block text - Precedes a piece of text from which a portion should be extracted. -/// [[File:Blockly-get-substring.png]] -Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = 'in text'; -/** @type {string} */ -/// dropdown - Indicates that the following number specifies the position (relative to the start -/// position) of the beginning 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = 'get substring from letter #'; -/** @type {string} */ -/// dropdown - Indicates that the following number specifies the position (relative to the end -/// position) of the beginning 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]. -/// Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will -/// automatically appear ''after'' this and any other -/// [https://translatewiki.net/wiki/Translating:Blockly#Ordinal_numbers ordinal numbers] -/// on this block. -/// [[File:Blockly-get-substring.png]] -Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = 'get substring from letter # from end'; -/** @type {string} */ -/// block text - Indicates that a region starting with the first 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = 'get substring from first letter'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = 'to letter #'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = 'to letter # from end'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = 'to last letter'; -/** @type {string} */ -/// 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]] -Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ''; - -/** @type {string} */ -/// {{Optional}} url - Information about the case of letters (upper-case and lower-case). -Blockly.Msg.TEXT_CHANGECASE_HELPURL = 'https://github.com/google/blockly/wiki/Text#adjusting-text-case'; -/** @type {string} */ -/// 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]. -Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = 'Return a copy of the text in a different case.'; -/** @type {string} */ -/// 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]. -Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = 'to UPPER CASE'; -/** @type {string} */ -/// block text - Indicates that all of the letters in the following piece of text should be converted to lower-case. 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]. -Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = 'to lower case'; -/** @type {string} */ -/// block text - Indicates that the first letter of each of the following words should be capitalized and the rest converted to lower-case. 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]. -Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = 'to Title Case'; - -/** @type {string} */ -/// {{Optional}} url - Information about trimming (removing) text off the beginning and ends of pieces of text. -Blockly.Msg.TEXT_TRIM_HELPURL = 'https://github.com/google/blockly/wiki/Text#trimming-removing-spaces'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces -/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. -Blockly.Msg.TEXT_TRIM_TOOLTIP = 'Return a copy of the text with spaces removed from one or both ends.'; -/** @type {string} */ -/// dropdown - Removes spaces from the beginning and end of a piece of text. See -/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces -/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. Note that neither -/// this nor the other options modify the original piece of text (that follows); -/// the block just returns a version of the text without the specified spaces. -Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = 'trim spaces from both sides of'; -/** @type {string} */ -/// dropdown - Removes spaces from the beginning of a piece of text. See -/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces -/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. -/// Note that in right-to-left scripts, this will remove spaces from the right side. -Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = 'trim spaces from left side of'; -/** @type {string} */ -/// dropdown - Removes spaces from the end of a piece of text. See -/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces -/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. -/// Note that in right-to-left scripts, this will remove spaces from the left side. -Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = 'trim spaces from right side of'; - -/** @type {string} */ -/// {{Optional}} url - Information about displaying text on computers. -Blockly.Msg.TEXT_PRINT_HELPURL = 'https://github.com/google/blockly/wiki/Text#printing-text'; -/** @type {string} */ -/// block text - Display the input on the screen. See -/// [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -/// \n\nParameters:\n* %1 - the value to print -Blockly.Msg.TEXT_PRINT_TITLE = 'print %1'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -Blockly.Msg.TEXT_PRINT_TOOLTIP = 'Print the specified text, number or other value.'; -/** @type {string} */ -/// {{Optional}} url - Information about getting text from users. -Blockly.Msg.TEXT_PROMPT_HELPURL = 'https://github.com/google/blockly/wiki/Text#getting-input-from-the-user'; -/** @type {string} */ -/// dropdown - Specifies that a piece of text should be requested from the user with -/// the following message. See [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = 'prompt for text with message'; -/** @type {string} */ -/// dropdown - Specifies that a number should be requested from the user with the -/// following message. See [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = 'prompt for number with message'; -/** @type {string} */ -/// dropdown - Precedes the message with which the user should be prompted for -/// a number. See [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = 'Prompt for user for a number.'; -/** @type {string} */ -/// dropdown - Precedes the message with which the user should be prompted for some text. -/// See [https://github.com/google/blockly/wiki/Text#printing-text -/// https://github.com/google/blockly/wiki/Text#printing-text]. -Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = 'Prompt for user for some text.'; - -/** @type {string} */ -/// block text - Title of a block that counts the number of instances of -/// a smaller pattern (%1) inside a longer string (%2). -Blockly.Msg.TEXT_COUNT_MESSAGE0 = 'count %1 in %2'; -/** @type {string} */ -/// {{Optional}} url - Information about counting how many times a string appears in another string. -Blockly.Msg.TEXT_COUNT_HELPURL = 'https://github.com/google/blockly/wiki/Text#counting-substrings'; -/** @type {string} */ -/// tooltip - Short description of a block that counts how many times some text occurs within some other text. -Blockly.Msg.TEXT_COUNT_TOOLTIP = 'Count how many times some text occurs within some other text.'; - -/** @type {string} */ -/// block text - Title of a block that returns a copy of text (%3) with all -/// instances of some smaller text (%1) replaced with other text (%2). -Blockly.Msg.TEXT_REPLACE_MESSAGE0 = 'replace %1 with %2 in %3'; -/** @type {string} */ -/// {{Optional}} url - Information about replacing each copy text (or string, in computer lingo) with other text. -Blockly.Msg.TEXT_REPLACE_HELPURL = 'https://github.com/google/blockly/wiki/Text#replacing-substrings'; -/** @type {string} */ -/// tooltip - Short description of a block that replaces copies of text in a large text with other text. -Blockly.Msg.TEXT_REPLACE_TOOLTIP = 'Replace all occurances of some text within some other text.'; - -/** @type {string} */ -/// block text - Title of block that returns a copy of text (%1) with the order -/// of letters and characters reversed. -Blockly.Msg.TEXT_REVERSE_MESSAGE0 = 'reverse %1'; -/** @type {string} */ -/// {{Optional}} url - Information about reversing a letters/characters in text. -Blockly.Msg.TEXT_REVERSE_HELPURL = 'https://github.com/google/blockly/wiki/Text#reversing-text'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Text]. -Blockly.Msg.TEXT_REVERSE_TOOLTIP = 'Reverses the order of the characters in the text.'; - -// Lists Blocks. -/** @type {string} */ -/// {{Optional}} url - Information on empty lists. -Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-empty-list'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list]. -Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = 'create empty list'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list]. -Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = 'Returns a list, of length 0, containing no data records'; - -/** @type {string} */ -/// {{Optional}} url - Information on building lists. -Blockly.Msg.LISTS_CREATE_WITH_HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-list-with'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#create-list-with https://github.com/google/blockly/wiki/Lists#create-list-with]. -Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = 'Create a list with any number of items.'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Lists#create-list-with https://github.com/google/blockly/wiki/Lists#create-list-with]. -Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = 'create list with'; -/** @type {string} */ -/// block text - This appears in a sub-block when [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs changing the number of inputs in a ''''create list with'''' block].\n{{Identical|List}} -Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = 'list'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs]. -Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = 'Add, remove, or reorder sections to reconfigure this list block.'; -/** @type {string} */ -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs]. -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = 'Add an item to the list.'; - -/** @type {string} */ -/// {{Optional}} url - Information about [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item]. -Blockly.Msg.LISTS_REPEAT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-list-with'; -/** @type {string} */ -/// {{Optional}} url - See [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item]. -Blockly.Msg.LISTS_REPEAT_TOOLTIP = 'Creates a list consisting of the given value repeated the specified number of times.'; -/** @type {string} */ -/// 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 -Blockly.Msg.LISTS_REPEAT_TITLE = 'create list with item %1 repeated %2 times'; - -/** @type {string} */ -/// {{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). -Blockly.Msg.LISTS_LENGTH_HELPURL = 'https://github.com/google/blockly/wiki/Lists#length-of'; -/** @type {string} */ -/// 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 -Blockly.Msg.LISTS_LENGTH_TITLE = 'length of %1'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#length-of https://github.com/google/blockly/wiki/Lists#length-of Blockly:Lists:length of]. -Blockly.Msg.LISTS_LENGTH_TOOLTIP = 'Returns the length of a list.'; - -/** @type {string} */ -/// {{Optional}} url - See [https://github.com/google/blockly/wiki/Lists#is-empty https://github.com/google/blockly/wiki/Lists#is-empty]. -Blockly.Msg.LISTS_ISEMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Lists#is-empty'; -/** @type {string} */ -/// block text - See [https://github.com/google/blockly/wiki/Lists#is-empty -/// https://github.com/google/blockly/wiki/Lists#is-empty]. -/// \n\nParameters:\n* %1 - the list to test -Blockly.Msg.LISTS_ISEMPTY_TITLE = '%1 is empty'; -/** @type {string} */ -/// block tooltip - See [https://github.com/google/blockly/wiki/Lists#is-empty -/// https://github.com/google/blockly/wiki/Lists#is-empty]. -Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = 'Returns true if the list is empty.'; - -/** @type {string} */ -/// block text - Title of blocks operating on [https://github.com/google/blockly/wiki/Lists lists]. -Blockly.Msg.LISTS_INLIST = 'in list'; - -/** @type {string} */ -/// {{Optional}} url - See [https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list -/// https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list]. -Blockly.Msg.LISTS_INDEX_OF_HELPURL = 'https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list'; -/** @type {string} */ -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -/** @type {string} */ -/// dropdown - See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list -/// Lists#finding-items-in-a-list]. -/// [[File:Blockly-list-find.png]] -Blockly.Msg.LISTS_INDEX_OF_FIRST = 'find first occurrence of item'; -/** @type {string} */ -/// dropdown - See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list -/// https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list]. -/// [[File:Blockly-list-find.png]] -Blockly.Msg.LISTS_INDEX_OF_LAST = 'find last occurrence of item'; -/** @type {string} */ -/// tooltip - %1 will be replaced by either the number 0 or -1 depending on the indexing mode. See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list -/// https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list]. -/// [[File:Blockly-list-find.png]] -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = 'Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.'; - -/** @type {string} */ -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; -/** @type {string} */ -/// dropdown - Indicates that the user wishes to -/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item -/// get an item from a list] without removing it from the list. -Blockly.Msg.LISTS_GET_INDEX_GET = 'get'; -/** @type {string} */ -/// dropdown - Indicates that the user wishes to -/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item -/// get and remove an item from a list], as opposed to merely getting -/// it without modifying the list. -Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = 'get and remove'; -/** @type {string} */ -/// dropdown - Indicates that the user wishes to -/// [https://github.com/google/blockly/wiki/Lists#removing-an-item -/// remove an item from a list].\n{{Identical|Remove}} -Blockly.Msg.LISTS_GET_INDEX_REMOVE = 'remove'; -/** @type {string} */ -/// dropdown - Indicates that an index relative to the front of the list should be used to -/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get and/or remove -/// an item from a list]. Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will -/// automatically appear ''after'' this number (and any other ordinal numbers on this block). -/// See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. -/// [[File:Blockly-list-get-item.png]] -Blockly.Msg.LISTS_GET_INDEX_FROM_START = '#'; -/** @type {string} */ -/// dropdown - Indicates that an index relative to the end of the list should be used -/// to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item access an item in a list]. -/// [[File:Blockly-list-get-item.png]] -Blockly.Msg.LISTS_GET_INDEX_FROM_END = '# from end'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_INDEX_FIRST = 'first'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_INDEX_LAST = 'last'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_INDEX_RANDOM = 'random'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_INDEX_TAIL = ''; -/** @type {string} */ -Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = '%1 is the first item.'; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = '%1 is the last item.'; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = 'Returns the item at the specified position in a list.'; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = 'Returns the first item in a list.'; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = 'Returns the last item in a list.'; -/** @type {string} */ -/// 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. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = 'Returns a random item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for '#' or '# from end'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = 'Removes and returns the item at the specified position in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'first'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = 'Removes and returns the first item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'last'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = 'Removes and returns the last item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'random'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = 'Removes and returns a random item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for '#' or '# from end'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = 'Removes the item at the specified position in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'first'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = 'Removes the first item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'last'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = 'Removes the last item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'random'. -Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = 'Removes a random item in a list.'; -/** @type {string} */ -/// {{Optional}} url - Information about putting items in lists. -Blockly.Msg.LISTS_SET_INDEX_HELPURL = 'https://github.com/google/blockly/wiki/Lists#in-list--set'; -/** @type {string} */ -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -/** @type {string} */ -/// block text - [https://github.com/google/blockly/wiki/Lists#in-list--set -/// Replaces an item in a list]. -/// [[File:Blockly-in-list-set-insert.png]] -Blockly.Msg.LISTS_SET_INDEX_SET = 'set'; -/** @type {string} */ -/// block text - [https://github.com/google/blockly/wiki/Lists#in-list--insert-at -/// Inserts an item into a list]. -/// [[File:Blockly-in-list-set-insert.png]] -Blockly.Msg.LISTS_SET_INDEX_INSERT = 'insert at'; -/** @type {string} */ -/// block text - The word(s) after the position in the list and before the item to be set/inserted. -/// [[File:Blockly-in-list-set-insert.png]] -Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = 'as'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = 'Sets the item at the specified position in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = 'Sets the first item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = 'Sets the last item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = 'Sets a random item in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = 'Inserts the item at the specified position in a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = 'Inserts the item at the start of a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = 'Append the item to the end of a list.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block). -Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = 'Inserts the item randomly in a list.'; - -/** @type {string} */ -/// {{Optional}} url - Information describing extracting a sublist from an existing list. -Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = 'https://github.com/google/blockly/wiki/Lists#getting-a-sublist'; -/** @type {string} */ -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -/** @type {string} */ -/// dropdown - Indicates that an index relative to the front of the list should be used -/// to specify the beginning of the range from which to -/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. -/// [[File:Blockly-get-sublist.png]] -/// Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will -/// automatically appear ''after'' this number (and any other ordinal numbers on this block). -/// See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. -Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = 'get sub-list from #'; -/** @type {string} */ -/// dropdown - Indicates that an index relative to the end of the list should be used -/// to specify the beginning of the range from which to -/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. -Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = 'get sub-list from # from end'; -/** @type {string} */ -/// dropdown - Indicates that the -/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist sublist to extract] -/// should begin with the list's first item. -Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = 'get sub-list from first'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = 'to #'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = 'to # from end'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = 'to last'; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ''; -/** @type {string} */ -/// 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]] -Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = 'Creates a copy of the specified portion of a list.'; - -/** @type {string} */ -/// {{Optional}} url - Information describing sorting a list. -Blockly.Msg.LISTS_SORT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#sorting-a-list'; -/** @type {string} */ -/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.\n{{Identical|Sort}} -Blockly.Msg.LISTS_SORT_TITLE = 'sort %1 %2 %3'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#sorting-a-list]. -Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a copy of a list.'; -/** @type {string} */ -/// sorting order or direction from low to high value for numeric, or A-Z for alphabetic.\n{{Identical|Ascending}} -Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = 'ascending'; -/** @type {string} */ -/// sorting order or direction from high to low value for numeric, or Z-A for alphabetic.\n{{Identical|Descending}} -Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = 'descending'; -/** @type {string} */ -/// sort by treating each item as a number. -Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = 'numeric'; -/** @type {string} */ -/// sort by treating each item alphabetically, case-sensitive. -Blockly.Msg.LISTS_SORT_TYPE_TEXT = 'alphabetic'; -/** @type {string} */ -/// sort by treating each item alphabetically, ignoring differences in case. -Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = 'alphabetic, ignore case'; - -/** @type {string} */ -/// {{Optional}} url - Information describing splitting text into a list, or joining a list into text. -Blockly.Msg.LISTS_SPLIT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists'; -/** @type {string} */ -/// dropdown - Indicates that text will be split up into a list (e.g. "a-b-c" -> ["a", "b", "c"]). -Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = 'make list from text'; -/** @type {string} */ -/// dropdown - Indicates that a list will be joined together to form text (e.g. ["a", "b", "c"] -> "a-b-c"). -Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = 'make text from list'; -/** @type {string} */ -/// block text - Prompts for a letter to be used as a separator when splitting or joining text. -Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = 'with delimiter'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#make-list-from-text -/// https://github.com/google/blockly/wiki/Lists#make-list-from-text] for more information. -Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = 'Split text into a list of texts, breaking at each delimiter.'; -/** @type {string} */ -/// tooltip - See [https://github.com/google/blockly/wiki/Lists#make-text-from-list -/// https://github.com/google/blockly/wiki/Lists#make-text-from-list] for more information. -Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = 'Join a list of texts into one text, separated by a delimiter.'; - -/** @type {string} */ -/// {{Optional}} url - Information describing reversing a list. -Blockly.Msg.LISTS_REVERSE_HELPURL = 'https://github.com/google/blockly/wiki/Lists#reversing-a-list'; -/** @type {string} */ -/// block text - Title of block that returns a copy of a list (%1) with the order of items reversed. -Blockly.Msg.LISTS_REVERSE_MESSAGE0 = 'reverse %1'; -/** @type {string} */ -/// tooltip - Short description for a block that reverses a copy of a list. -Blockly.Msg.LISTS_REVERSE_TOOLTIP = 'Reverse a copy of a list.'; - -/** @type {string} */ -/// 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. -Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ''; - -// Variables Blocks. -/** @type {string} */ -/// {{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. -Blockly.Msg.VARIABLES_GET_HELPURL = 'https://github.com/google/blockly/wiki/Variables#get'; -/** @type {string} */ -/// tooltip - This gets the value of the named variable without modifying it. -Blockly.Msg.VARIABLES_GET_TOOLTIP = 'Returns the value of this variable.'; -/** @type {string} */ -/// context menu - Selecting this creates a block to set (change) the value of this variable. -/// \n\nParameters:\n* %1 - the name of the variable. -Blockly.Msg.VARIABLES_GET_CREATE_SET = 'Create "set %1"'; - -/** @type {string} */ -/// {{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. -Blockly.Msg.VARIABLES_SET_HELPURL = 'https://github.com/google/blockly/wiki/Variables#set'; -/** @type {string} */ -/// block text - Change the value of a mathematical variable: '''set [the value of] x to 7'''.\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the value to be assigned. -Blockly.Msg.VARIABLES_SET = 'set %1 to %2'; -/** @type {string} */ -/// tooltip - This initializes or changes the value of the named variable. -Blockly.Msg.VARIABLES_SET_TOOLTIP = 'Sets this variable to be equal to the input.'; -/** @type {string} */ -/// context menu - Selecting this creates a block to get (change) the value of -/// this variable.\n\nParameters:\n* %1 - the name of the variable. -Blockly.Msg.VARIABLES_SET_CREATE_GET = 'Create "get %1"'; - -// Procedures Blocks. -/** @type {string} */ -/// {{Optional}} url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that do not have return values. -Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = 'https://en.wikipedia.org/wiki/Subroutine'; -/** @type {string} */ -/// 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'; -/** @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'; -/** @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 -/// function with parameters]. -Blockly.Msg.PROCEDURES_BEFORE_PARAMS = 'with:'; -/** @type {string} */ -/// 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]. -Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = 'with:'; -/** @type {string} */ -/// 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]. -Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ''; -/** @type {string} */ -/// tooltip -Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = 'Creates a function with no output.'; -/** @type {string} */ -/// Placeholder text that the user is encouraged to replace with a description of what their function does. -Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = 'Describe this function...'; -/** @type {string} */ -/// {{Optional}} url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that have return values. -Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = 'https://en.wikipedia.org/wiki/Subroutine'; -/** @type {string} */ -Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -/** @type {string} */ -Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; -/** @type {string} */ -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; -/** @type {string} */ -Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT; -/** @type {string} */ -/// block text - This imperative or infinite verb precedes the value that is used as the return value -/// (output) of this function. See -/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#6ot5y5 this sample -/// function that returns a value]. -Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = 'return'; -/** @type {string} */ -/// tooltip -Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = 'Creates a function with an output.'; -/** @type {string} */ -/// Label for a checkbox that controls if statements are allowed in a function. -Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = 'allow statements'; - -/** @type {string} */ -/// alert - The user has created a function with two parameters that have the same name. Every parameter must have a different name. -Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = 'Warning: This function has duplicate parameters.'; - -/** @type {string} */ -/// {{Optional}} url - Information about calling [https://en.wikipedia.org/wiki/Subroutine functions] that do not return values. -Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = 'https://en.wikipedia.org/wiki/Subroutine'; -/** @type {string} */ -/// tooltip - This block causes the body (blocks inside) of the named function definition to be run. -Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = 'Run the user-defined function "%1".'; - -/** @type {string} */ -/// {{Optional}} url - Information about calling [https://en.wikipedia.org/wiki/Subroutine functions] that return values. -Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = 'https://en.wikipedia.org/wiki/Subroutine'; -/** @type {string} */ -/// tooltip - This block causes the body (blocks inside) of the named function definition to be run.\n\nParameters:\n* %1 - the name of the function. -Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = 'Run the user-defined function "%1" and use its output.'; - -/** @type {string} */ -/// block text - This text appears on a block in a window that appears when the user clicks -/// on the plus sign or star on a function definition block. It refers to the set of parameters -/// (referred to by the simpler term "inputs") to the function. See -/// [[Translating:Blockly#function_definitions]].\n{{Identical|Input}} -Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = 'inputs'; -/** @type {string} */ -/// tooltip -Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = 'Add, remove, or reorder inputs to this function.'; -/** @type {string} */ -/// block text - This text appears on a block in a window that appears when the user clicks -/// on the plus sign or star on a function definition block]. It appears on the block for -/// adding an individual parameter (referred to by the simpler term "inputs") to the function. -/// See [[Translating:Blockly#function_definitions]]. -Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = 'input name:'; -/** @type {string} */ -/// tooltip -Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = 'Add an input to the function.'; - -/** @type {string} */ -/// context menu - This appears on the context menu for function calls. Selecting -/// it causes the corresponding function definition to be highlighted (as shown at -/// [[Translating:Blockly#context_menus]]. -Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = 'Highlight function definition'; -/** @type {string} */ -/// context menu - This appears on the context menu for function definitions. -/// Selecting it creates a block to call the function.\n\nParameters:\n* %1 - the name of the function.\n{{Identical|Create}} -Blockly.Msg.PROCEDURES_CREATE_DO = 'Create "%1"'; - -/** @type {string} */ -/// tooltip - If the first value is true, this causes the second value to be returned -/// immediately from the enclosing function. -Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = 'If a value is true, then return a second value.'; -/** @type {string} */ -/// {{Optional}} url - Information about guard clauses. -Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = 'http://c2.com/cgi/wiki?GuardClause'; -/** @type {string} */ -/// warning - This appears if the user tries to use this block outside of a function definition. -Blockly.Msg.PROCEDURES_IFRETURN_WARNING = 'Warning: This block may be used only within a function definition.'; - -/** @type {string} */ -/// comment text - This text appears in a new workspace comment, to hint that -/// the user can type here. -Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT = 'Say something...'; - -/** @type {string} */ -/// workspace - This text is read out when a user navigates to the workspace while -/// using a screen reader. -Blockly.Msg.WORKSPACE_ARIA_LABEL = 'Blockly Workspace'; - -/** @type {string} */ -/// warning - This appears if the user collapses a block, and blocks inside -/// that block have warnings attached to them. It should inform the user that the -/// block they collapsed contains blocks that have warnings. -Blockly.Msg.COLLAPSED_WARNINGS_WARNING = 'Collapsed blocks contain warnings.'; - -/** @type {string} */ -/// button label - Pressing this button closes help information.\n{{Identical|OK}} -Blockly.Msg.DIALOG_OK = 'OK'; - -/** @type {string} */ -/// button label - Pressing this button cancels a proposed action.\n{{Identical|Cancel}} -Blockly.Msg.DIALOG_CANCEL = 'Cancel'; diff --git a/ejs/projects.ejs b/ejs/projects.ejs index 2855a0b..2701cde 100644 --- a/ejs/projects.ejs +++ b/ejs/projects.ejs @@ -9,13 +9,9 @@ MixIO - - - - @@ -30,12 +26,6 @@ - - - - - - diff --git a/js/projects.js b/js/projects.js index e88164e..ebfb2ab 100644 --- a/js/projects.js +++ b/js/projects.js @@ -4,9 +4,16 @@ var globalBLE = {} function copy(obj) { return JSON.parse(JSON.stringify(obj)) } +globalGottenScripts = []; (function () { $.getScript = function(url, callback, cache) { + if(globalGottenScripts.indexOf(url) != -1) + { + callback(); + return; + } + globalGottenScripts.push(url); $.ajax({ type: "GET", url: url, @@ -283,14 +290,18 @@ function edit_project(prjName, prjType) { d.showModal(); } -function run_project() { +async function run_project() { if ((typeof Notification) != "undefined") Notification.requestPermission(); isRunning = true $(".facial").attr("hidden", "hidden") try { var logicFunction = Function(globalCode); - logicFunction() + if(globalCode!="") + { + await init_codemirror(); + logicFunction() + } } catch (e) { MixIO.log(e) showtext(JSLang[lang].logicError) @@ -632,138 +643,160 @@ function workspaceToDom() { function view_project(projectName, projectType) { - var init_codemirror = function() { - if (!grid3.children()[0]) { - customTheme() - var mainDiv = $("
") - grid3.append(mainDiv) - var leftDiv = $("
") - leftDiv.css("width", mainDiv.width() / 7 * 4 + "px") - mainDiv.append(leftDiv) - workspace = Blockly.inject('block', { - toolbox: document.getElementById('toolbox'), - media: 'blockly/media/', - zoom: { - controls: true, - wheel: true, - startScale: 0.75, - maxScale: 4, - minScale: 0.25, - scaleSpeed: 1.1 - }, - }); - //Blockly.Variables.createVariable_(workspace,null,"topic") - //Blockly.Variables.createVariable_(workspace,null,"message") - var toJS = function() { - MixIO.triggersToPreCode() - MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace)) - } + init_codemirror = function() { + return new Promise(function(resolve, reject) { + var modald = showmodaltext("

加载逻辑引擎...

") + $.getScript("js/codemirror.min.js", function(){ + $.getScript("blockly/blockly_compressed.js", function() { + $.getScript("blockly/blocks_compressed.js", function() { + $.getScript("blockly/javascript_compressed.js", function() { + $.getScript("blockly/iot/IOT_Blocks.js?v=1", function() { + var currentProjectType = globalProjectType + globalProjectType = LOGIC_MODE + switch_mode() + + if (!grid3.children()[0]) { + Blockly.registry.register( + Blockly.registry.Type.TOOLBOX_ITEM, + Blockly.ToolboxCategory.registrationName, + CustomCategory, true); + var mainDiv = $("
") + grid3.append(mainDiv) + var leftDiv = $("
") + leftDiv.css("width", mainDiv.width() / 7 * 4 + "px") + mainDiv.append(leftDiv) + workspace = Blockly.inject('block', { + toolbox: document.getElementById('toolbox'), + media: 'blockly/media/', + zoom: { + controls: true, + wheel: true, + startScale: 0.75, + maxScale: 4, + minScale: 0.25, + scaleSpeed: 1.1 + }, + }); + var toJS = function() { + MixIO.triggersToPreCode() + MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace)) + } - function ast(event) { - toJS() - workspaceToDom() - } - workspace.addChangeListener(ast); - var rightDiv = $("
") - rightDiv.css("width", mainDiv.width() / 7 * 3 + "px") - mainDiv.append(rightDiv) - leftDiv.resizable({ - handles: "w,e", - onResize: function() { - MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') - rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") - Blockly.svgResize(workspace); - }, - onStopResize: function() { - MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') - rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") - } - }) - window.addEventListener('resize', function() { - MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') - rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") - Blockly.svgResize(workspace); - }) - var jTa = $("") - rightDiv.append(jTa) - if (globalXML != "") { - Blockly.Xml.domToWorkspace(Blockly.Xml.textToDom(stringendecoder.decodeHtml(globalXML).replaceAll("&", "&")), workspace); - } - MixIO.editor = CodeMirror.fromTextArea(jTa[0], { - mode: "text/javascript", - lineNumbers: true, - matchBrackets: true, - hintOptions: { - completeSingle: false - } - }); - MixIO.editor.on("inputRead", function(instance, changeObj) { - if (isRunning) { - showtext(JSLang[lang].pauseBeforeModify) - } - if (/^[a-zA-Z]/.test(changeObj.text[0])) { - var words = MixIO.editor.getValue() + ""; - words = words.replace(/[a-z]+[\-|\']+[a-z]+/ig, '').match(/([a-z]+)/ig); - CodeMirror.ukeys = words; - MixIO.editor.showHint(); - } - }); - MixIO.editor.on('change', function() { - globalCode = MixIO.editor.getValue() - }) - MixIO.editor.setSize('100%', '50%') - MixIO.editor.setValue(globalCode) - MixIO.editor.setCursor(MixIO.editor.lineCount(), 0); - var jTa2Div = $("
") - jTa2Div.append($('

' + JSLang[lang].console + '

')) - var jTa2 = $("
") - jTa2Div.append(jTa2) - rightDiv.append(jTa2Div) - $("#console_icon").click(function() { - if (typeof globalConsoleStyle == "undefined") { - $("#console_icon").removeClass("fa-unlock") - $("#console_icon").addClass("fa-lock") - globalConsoleStyle = jTa2Div.attr("style") - $("body").append(jTa2Div) - jTa2Div.css("z-index", 999) - jTa2Div.draggable({ - disabled: false - }) - jTa2Div.resizable({ - disabled: false - }) - jTa2Div.css("border", "solid black 1px") - jTa2Div.css("position", "absolute") - jTa2Div.css("left", "20px") - jTa2Div.css("top", "20px") - MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '100%') - } else { - jTa2Div.attr("style", globalConsoleStyle) - $("#console_icon").addClass("fa-unlock") - $("#console_icon").removeClass("fa-lock") - rightDiv.append(jTa2Div) - jTa2Div.draggable({ - disabled: true - }) - jTa2Div.resizable({ - disabled: true - }) - MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') - globalConsoleStyle = undefined - } - }) - MixIO.log = function(text) { - if(typeof text == "object") - text = JSON.stringify(text) - if (jTa2.html()) - jTa2.html(jTa2.html() + '
' + '[' + timeStamp2String().substring(11) + '] ' + text) - else - jTa2.html(jTa2.html() + '[' + timeStamp2String().substring(11) + '] ' + text) - jTa2.scrollTop(jTa2[0].scrollHeight) - } - MixIO.log("Version: " + globalVer) - MixIO.log("入门指南:dev-api") - } + function ast(event) { + toJS() + workspaceToDom() + } + workspace.addChangeListener(ast); + var rightDiv = $("
") + rightDiv.css("width", mainDiv.width() / 7 * 3 + "px") + mainDiv.append(rightDiv) + leftDiv.resizable({ + handles: "w,e", + onResize: function() { + MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') + rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") + Blockly.svgResize(workspace); + }, + onStopResize: function() { + MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') + rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") + } + }) + window.addEventListener('resize', function() { + MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') + rightDiv.css("width", (mainDiv.width() - leftDiv.width()) + "px") + Blockly.svgResize(workspace); + }) + var jTa = $("") + rightDiv.append(jTa) + if (globalXML != "") { + Blockly.Xml.domToWorkspace(Blockly.Xml.textToDom(stringendecoder.decodeHtml(globalXML).replaceAll("&", "&")), workspace); + } + MixIO.editor = CodeMirror.fromTextArea(jTa[0], { + mode: "text/javascript", + lineNumbers: true, + matchBrackets: true, + hintOptions: { + completeSingle: false + } + }); + MixIO.editor.on("inputRead", function(instance, changeObj) { + if (isRunning) { + showtext(JSLang[lang].pauseBeforeModify) + } + if (/^[a-zA-Z]/.test(changeObj.text[0])) { + var words = MixIO.editor.getValue() + ""; + words = words.replace(/[a-z]+[\-|\']+[a-z]+/ig, '').match(/([a-z]+)/ig); + CodeMirror.ukeys = words; + MixIO.editor.showHint(); + } + }); + MixIO.editor.on('change', function() { + globalCode = MixIO.editor.getValue() + }) + MixIO.editor.setSize('100%', '50%') + MixIO.editor.setValue(globalCode) + MixIO.editor.setCursor(MixIO.editor.lineCount(), 0); + var jTa2Div = $("
") + jTa2Div.append($('

' + JSLang[lang].console + '

')) + var jTa2 = $("
") + jTa2Div.append(jTa2) + rightDiv.append(jTa2Div) + $("#console_icon").click(function() { + if (typeof globalConsoleStyle == "undefined") { + $("#console_icon").removeClass("fa-unlock") + $("#console_icon").addClass("fa-lock") + globalConsoleStyle = jTa2Div.attr("style") + $("body").append(jTa2Div) + jTa2Div.css("z-index", 999) + jTa2Div.draggable({ + disabled: false + }) + jTa2Div.resizable({ + disabled: false + }) + jTa2Div.css("border", "solid black 1px") + jTa2Div.css("position", "absolute") + jTa2Div.css("left", "20px") + jTa2Div.css("top", "20px") + MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '100%') + } else { + jTa2Div.attr("style", globalConsoleStyle) + $("#console_icon").addClass("fa-unlock") + $("#console_icon").removeClass("fa-lock") + rightDiv.append(jTa2Div) + jTa2Div.draggable({ + disabled: true + }) + jTa2Div.resizable({ + disabled: true + }) + MixIO.editor.setSize((mainDiv.width() - leftDiv.width()) + "px", '50%') + globalConsoleStyle = undefined + } + }) + MixIO.log = function(text) { + if(typeof text == "object") + text = JSON.stringify(text) + if (jTa2.html()) + jTa2.html(jTa2.html() + '
' + '[' + timeStamp2String().substring(11) + '] ' + text) + else + jTa2.html(jTa2.html() + '[' + timeStamp2String().substring(11) + '] ' + text) + jTa2.scrollTop(jTa2[0].scrollHeight) + } + MixIO.log("Version: " + globalVer) + MixIO.log("入门指南:dev-api") + } + globalProjectType = currentProjectType + switch_mode() + modald.close().remove() + resolve(); + },true); + }, true); + }, true); + }, true); + }, true); + }) } var modald = showmodaltext("

" + JSLang[lang].downloading + "

") @@ -810,10 +843,11 @@ function view_project(projectName, projectType) { $("#logicMode").click(function() { if (globalProjectType != LOGIC_MODE) { globalProjectType = LOGIC_MODE - MixIO.triggersToPreCode() - MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace)) switch_mode() - init_codemirror() + init_codemirror().then(function() { + MixIO.triggersToPreCode() + MixIO.editor.setValue(MixIO.preCode + Blockly.JavaScript.workspaceToCode(workspace)) + }) } $(".blocklySvg").attr("height", "100%") $(".blocklyHtmlInput").removeAttr("hidden") @@ -824,10 +858,7 @@ function view_project(projectName, projectType) { globalCode = stringendecoder.decodeHtml(JSON.parse(prevLogic)['code']) globalXML = stringendecoder.decodeHtml(JSON.parse(prevLogic)['module']) } - globalProjectType = LOGIC_MODE globalProjectName = projectName - switch_mode() - init_codemirror() globalProjectType = projectType switch_mode() connectStatusDia = dialog({ @@ -3887,36 +3918,7 @@ var exit = function() { save_layout(true) } -class CustomCategory extends Blockly.ToolboxCategory { - // 自定义类别创造函数 - // categoryDef: 类别定义的信息 - // toolbox: 表示类别的父级toolbox - // opt_parent: 可选参数,表示其父类别 - constructor(categoryDef, toolbox, opt_parent) { - super(categoryDef, toolbox, opt_parent); - } - addColourBorder_(colour) { - super.addColourBorder_(colour); - // this.rowDiv_.style.backgroundColor = 'unset'; - this.iconDom_.style.color = colour; - } - setSelected(isSelected) { - super.setSelected(isSelected); - if (isSelected) { - // 设置icon的颜色和文本颜色相同 - this.iconDom_.style.color = 'white'; // ====本次新增代码==== - } else { - // 设置icon的颜色和文本颜色相同 - this.iconDom_.style.color = this.colour_; // ====本次新增代码==== - } - } -} -var customTheme = function() { - Blockly.registry.register( - Blockly.registry.Type.TOOLBOX_ITEM, - Blockly.ToolboxCategory.registrationName, - CustomCategory, true); -} + var uploadProjects = function() { var editForm = $('
') diff --git a/js/widgets.js b/js/widgets.js index d50ef29..5436fee 100644 --- a/js/widgets.js +++ b/js/widgets.js @@ -2400,7 +2400,11 @@ function add_magic(user_title, user_topic, user_content, user_style, title_style itemdiv.attr('style', user_style) } -function add_timer(user_title, user_topic, user_content, user_style, title_style, isObserve) { +async function add_timer(user_title, user_topic, user_content, user_style, title_style, isObserve) { + if(MixIO.editor == undefined) + { + await init_codemirror() + } var isAlive = true var contents = [] var title = $("

" + user_title + "

") @@ -2616,7 +2620,11 @@ function add_timer(user_title, user_topic, user_content, user_style, title_style itemdiv.attr('style', user_style) } -function add_trigger(user_title, user_topic, user_content, user_style, title_style, isObserve) { +async function add_trigger(user_title, user_topic, user_content, user_style, title_style, isObserve) { + if(MixIO.editor == undefined) + { + await init_codemirror() + } var isAlive = true var contents = [] var title = $("

" + user_title + "

") diff --git a/mixio.js b/mixio.js index 1a9854c..7192cf1 100644 --- a/mixio.js +++ b/mixio.js @@ -1861,6 +1861,50 @@ var mixioServer = function() { } else res.send('-1') }) + app.get('/api/getWeather', function(req, res) { + if (req.query.city_code && !configs["OFFLINE_MODE"]) { + req.query.dsc_code = req.query.city_code.replace("CH","") + if(globalWeather[req.query.dsc_code] && globalWeather[req.query.dsc_code].time && (new Date().getTime() - globalWeather[req.query.dsc_code].time) < 600000) { + res.send(globalWeather[req.query.dsc_code].data) + } else { + http.get('http://api.map.baidu.com/weather/v1/?district_id=' + req.query.dsc_code + '&data_type=now&ak=' + configs["BAIDU_MAP_SERVER_AK"], function(req2, res2) { + var html = '' + req2.on('data', function(data) { + html += data; + }); + req2.on('end', function() { + globalWeather[req.query.dsc_code] = { + time: new Date().getTime(), + data: html + } + res.send(html) + }); + }) + } + } else + res.send('-1') + }) + app.get("/api/getCurrentTime", function(req, res){ + var sysTime = new Date(); + var year = sysTime.getFullYear(); + var month = sysTime.getMonth() + 1; // getMonth() 返回的月份是从0开始的 + var day = sysTime.getDate(); + var hours = sysTime.getHours(); + var minutes = sysTime.getMinutes(); + var seconds = sysTime.getSeconds(); + + // 补零操作 + month = month < 10 ? '0' + month : month; + day = day < 10 ? '0' + day : day; + hours = hours < 10 ? '0' + hours : hours; + minutes = minutes < 10 ? '0' + minutes : minutes; + seconds = seconds < 10 ? '0' + seconds : seconds; + + sysTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; + res.send(JSON.stringify({ + "sysTime": sysTime + })); + }); app.post('/deleteProject', function(req, res) { if (req.session.userName && req.body.projectName) {