mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
- Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages - Fixed bug with js_to_json.py script where it didn't recognize ' character
This commit is contained in:
parent
33355415df
commit
dfc50ba843
4 changed files with 63 additions and 15 deletions
|
@ -48,7 +48,7 @@ import re
|
|||
from common import write_files
|
||||
|
||||
|
||||
_INPUT_DEF_PATTERN = re.compile("""Blockly.Msg.(\w*)\s*=\s*'([^']*)';?$""")
|
||||
_INPUT_DEF_PATTERN = re.compile("""Blockly.Msg.(\w*)\s*=\s*'(.*)';?$""")
|
||||
|
||||
_INPUT_SYN_PATTERN = re.compile(
|
||||
"""Blockly.Msg.(\w*)\s*=\s*Blockly.Msg.(\w*);""")
|
||||
|
@ -91,7 +91,7 @@ def main():
|
|||
match = _INPUT_DEF_PATTERN.match(line)
|
||||
if match:
|
||||
key = match.group(1)
|
||||
value = match.group(2)
|
||||
value = match.group(2).replace("\\'", "'")
|
||||
if not description:
|
||||
print('Warning: No description for ' + result['meaning'])
|
||||
if (description and _CONSTANT_DESCRIPTION_PATTERN.search(description)):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
|
||||
"lastupdated": "2017-03-22 09:28:54.332746",
|
||||
"lastupdated": "2017-04-04 17:16:42.193032",
|
||||
"locale": "en",
|
||||
"messagedocumentation" : "qqq"
|
||||
},
|
||||
|
@ -32,6 +32,7 @@
|
|||
"NEW_VARIABLE_TITLE": "New variable name:",
|
||||
"VARIABLE_ALREADY_EXISTS": "A variable named '%1' already exists.",
|
||||
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the '%2' variable?",
|
||||
"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.",
|
||||
|
@ -82,6 +83,19 @@
|
|||
"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.",
|
||||
"IOS_OK": "OK",
|
||||
"IOS_CANCEL": "Cancel",
|
||||
"IOS_ERROR": "Error",
|
||||
"IOS_PROCEDURES_INPUTS": "INPUTS",
|
||||
"IOS_PROCEDURES_ADD_INPUT": "+ Add Input",
|
||||
"IOS_PROCEDURES_ALLOW_STATEMENTS": "Allow statements",
|
||||
"IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR": "This function has duplicate inputs.",
|
||||
"IOS_VARIABLES_ADD_VARIABLE": "+ Add Variable",
|
||||
"IOS_VARIABLES_ADD_BUTTON": "Add",
|
||||
"IOS_VARIABLES_RENAME_BUTTON": "Rename",
|
||||
"IOS_VARIABLES_DELETE_BUTTON": "Delete",
|
||||
"IOS_VARIABLES_VARIABLE_NAME": "Variable name",
|
||||
"IOS_VARIABLES_EMPTY_NAME_ERROR": "You can't use an empty variable name.",
|
||||
"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.",
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"authors": [
|
||||
"Espertus",
|
||||
"Liuxinyu970226",
|
||||
"Shirayuki"
|
||||
]
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "default name - A simple, general default name for a variable, preferably short. For more context, see [[Translating:Blockly#infrequent_message_types]].\n{{Identical|Item}}",
|
||||
"TODAY": "button text - Button that sets a calendar to today's date.\n{{Identical|Today}}",
|
||||
"DUPLICATE_BLOCK": "context menu - Make a copy of the selected block (and any blocks it contains).\n{{Identical|Duplicate}}",
|
||||
|
@ -33,7 +26,8 @@
|
|||
"NEW_VARIABLE_TITLE": "prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].",
|
||||
"VARIABLE_ALREADY_EXISTS": "alert - Tells the user that the name they entered is already in use.",
|
||||
"DELETE_VARIABLE_CONFIRMATION": "confirm - Ask the user to confirm their deletion of multiple uses of a variable.",
|
||||
"DELETE_VARIABLE": "alert - Tell the user that they can't delete a variable because it's part of the definition of a procedure. dropdown choice - Delete the currently selected variable.",
|
||||
"CANNOT_DELETE_VARIABLE_PROCEDURE": "alert - Tell the user that they can't delete a variable because it's part of the definition of a function.",
|
||||
"DELETE_VARIABLE": "dropdown choice - Delete the currently selected variable.",
|
||||
"COLOUR_PICKER_HELPURL": "url - Information about colour.",
|
||||
"COLOUR_PICKER_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette].",
|
||||
"COLOUR_RANDOM_HELPURL": "url - A link that displays a random colour each time you visit it.",
|
||||
|
@ -83,6 +77,19 @@
|
|||
"CONTROLS_IF_IF_TOOLTIP": "tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "tooltip - Describes the 'else if' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].",
|
||||
"IOS_OK": "button text - Text on a button inside a dialogue window, which will accept or acknowledge the contents of the dialogue when pressed.",
|
||||
"IOS_CANCEL": "button text - Text on a button inside a dialogue window, which will close or cancel the dialogue when pressed.",
|
||||
"IOS_ERROR": "alert - Title text for an error dialogue.",
|
||||
"IOS_PROCEDURES_INPUTS": "header text - Title of a section that displays a list of parameters (aka. 'inputs') that have been defined for a procedure. This is used inside a dialogue window to configure a procedure.",
|
||||
"IOS_PROCEDURES_ADD_INPUT": "button text - Text on a button which will add a parameter (aka. 'input') to a procedure. This is used inside a dialogue window to configure a procedure. NOTE: The '+' should be preserved at the beginning of the text.",
|
||||
"IOS_PROCEDURES_ALLOW_STATEMENTS": "option text - Text describing an option to allow statements to be added within a procedure. This is used inside a dialogue window to configure a procedure.",
|
||||
"IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR": "alert - Error message when duplicate parameters (aka. 'inputs') have been defined on a procedure. This is used inside a dialogue window to configure procedure parameters.",
|
||||
"IOS_VARIABLES_ADD_VARIABLE": "button text - Text on a button which will open a variable creation dialogue when pressed. NOTE: The '+' should be preserved at the beginning of the text.",
|
||||
"IOS_VARIABLES_ADD_BUTTON": "button text - Text on a button inside a variable creation dialogue, which will add a variable when pressed.",
|
||||
"IOS_VARIABLES_RENAME_BUTTON": "button text - Text on a button inside a variable rename dialogue, which will rename a variable when pressed.",
|
||||
"IOS_VARIABLES_DELETE_BUTTON": "button text - Text on a button inside a variable deletion dialogue, which will delete a variable when pressed.",
|
||||
"IOS_VARIABLES_VARIABLE_NAME": "placeholder text - Placeholder text used inside a text input, where a variable name should be entered.",
|
||||
"IOS_VARIABLES_EMPTY_NAME_ERROR": "alert - Error message that is displayed when the user attempts to create a variable without a name.",
|
||||
"LOGIC_COMPARE_HELPURL": "url - Information about comparisons.",
|
||||
"LOGIC_COMPARE_TOOLTIP_EQ": "tooltip - Describes the equals (=) block.",
|
||||
"LOGIC_COMPARE_TOOLTIP_NEQ": "tooltip - Describes the not equals (≠) block.",
|
||||
|
@ -260,7 +267,7 @@
|
|||
"TEXT_REPLACE_MESSAGE0": "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).",
|
||||
"TEXT_REPLACE_HELPURL": "url - Information about replacing each copy text (or string, in computer lingo) with other text.",
|
||||
"TEXT_REPLACE_TOOLTIP": "tooltip - Short description of a block that replaces copies of text in a large text with other text.",
|
||||
"TEXT_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of text (%1) with the order of letters and characters reversed.\n{{Identical|Reverse}}",
|
||||
"TEXT_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of text (%1) with the order of letters and characters reversed.",
|
||||
"TEXT_REVERSE_HELPURL": "url - Information about reversing a letters/characters in text.",
|
||||
"TEXT_REVERSE_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text].",
|
||||
"LISTS_CREATE_EMPTY_HELPURL": "url - Information on empty lists.",
|
||||
|
@ -345,7 +352,7 @@
|
|||
"LISTS_SPLIT_TOOLTIP_SPLIT": "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.",
|
||||
"LISTS_SPLIT_TOOLTIP_JOIN": "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.",
|
||||
"LISTS_REVERSE_HELPURL": "url - Information describing reversing a list.",
|
||||
"LISTS_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of a list (%1) with the order of items reversed.\n{{Identical|Reverse}}",
|
||||
"LISTS_REVERSE_MESSAGE0": "block text - Title of block that returns a copy of a list (%1) with the order of items reversed.",
|
||||
"LISTS_REVERSE_TOOLTIP": "tooltip - Short description for a block that reverses a copy of a list.",
|
||||
"ORDINAL_NUMBER_SUFFIX": "grammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.",
|
||||
"VARIABLES_GET_HELPURL": "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.",
|
||||
|
|
|
@ -129,8 +129,8 @@ Blockly.Msg.VARIABLE_ALREADY_EXISTS = 'A variable named "%1" already exists.'
|
|||
// Variable deletion.
|
||||
/// confirm - Ask the user to confirm their deletion of multiple uses of a variable.
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = 'Delete %1 uses of the "%2" variable?';
|
||||
/// alert - Tell the user that they can't delete a variable because it's part of the definition of a procedure.
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = 'Can\'t delete the variable "%1" because it is part of the definition of the procedure "%2"';
|
||||
/// 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"';
|
||||
/// dropdown choice - Delete the currently selected variable.
|
||||
Blockly.Msg.DELETE_VARIABLE = 'Delete the "%1" variable';
|
||||
|
||||
|
@ -256,6 +256,33 @@ Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
|
|||
/// 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.';
|
||||
|
||||
/// button text - Text on a button inside a dialogue window, which will accept or acknowledge the contents of the dialogue when pressed.
|
||||
Blockly.Msg.IOS_OK = 'OK';
|
||||
/// button text - Text on a button inside a dialogue window, which will close or cancel the dialogue when pressed.
|
||||
Blockly.Msg.IOS_CANCEL = 'Cancel';
|
||||
/// alert - Title text for an error dialogue.
|
||||
Blockly.Msg.IOS_ERROR = 'Error';
|
||||
/// header text - Title of a section that displays a list of parameters (aka. "inputs") that have been defined for a procedure. This is used inside a dialogue window to configure a procedure.
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = 'INPUTS';
|
||||
/// button text - Text on a button which will add a parameter (aka. "input") to a procedure. This is used inside a dialogue window to configure a procedure. NOTE: The "+" should be preserved at the beginning of the text.
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = '+ Add Input';
|
||||
/// option text - Text describing an option to allow statements to be added within a procedure. This is used inside a dialogue window to configure a procedure.
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = 'Allow statements';
|
||||
/// alert - Error message when duplicate parameters (aka. "inputs") have been defined on a procedure. This is used inside a dialogue window to configure procedure parameters.
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = 'This function has duplicate inputs.';
|
||||
/// button text - Text on a button which will open a variable creation dialogue when pressed. NOTE: The "+" should be preserved at the beginning of the text.
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = '+ Add Variable';
|
||||
/// button text - Text on a button inside a variable creation dialogue, which will add a variable when pressed.
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = 'Add';
|
||||
/// button text - Text on a button inside a variable rename dialogue, which will rename a variable when pressed.
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = 'Rename';
|
||||
/// button text - Text on a button inside a variable deletion dialogue, which will delete a variable when pressed.
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = 'Delete';
|
||||
/// placeholder text - Placeholder text used inside a text input, where a variable name should be entered.
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = 'Variable name';
|
||||
/// alert - Error message that is displayed when the user attempts to create a variable without a name.
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = 'You can\'t use an empty variable name.';
|
||||
|
||||
/// url - Information about comparisons.
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = 'https://en.wikipedia.org/wiki/Inequality_(mathematics)';
|
||||
/// tooltip - Describes the equals (=) block.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue