Skip to content

Commit cece3f6

Browse files
authored
chore: Add messages from the keyboard experiment. (#8904)
* chore: Add messages from the keyboard experiment. * fix: Resolve duplicate message ID. * fix: Use placeholders for keyboard shortcuts.
1 parent 4fb054c commit cece3f6

File tree

3 files changed

+168
-3
lines changed

3 files changed

+168
-3
lines changed

msg/json/en.json

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"@metadata": {
33
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
4-
"lastupdated": "2024-04-16 23:19:53.668551",
4+
"lastupdated": "2025-04-21 08:25:34.842680",
55
"locale": "en",
66
"messagedocumentation" : "qqq"
77
},
@@ -396,5 +396,34 @@
396396
"WORKSPACE_ARIA_LABEL": "Blockly Workspace",
397397
"COLLAPSED_WARNINGS_WARNING": "Collapsed blocks contain warnings.",
398398
"DIALOG_OK": "OK",
399-
"DIALOG_CANCEL": "Cancel"
399+
"DIALOG_CANCEL": "Cancel",
400+
"DELETE_SHORTCUT": "Delete block (%1)",
401+
"DELETE_KEY": "Del",
402+
"EDIT_BLOCK_CONTENTS": "Edit Block contents (%1)",
403+
"INSERT_BLOCK": "Insert Block (%1)",
404+
"START_MOVE": "Start move",
405+
"FINISH_MOVE": "Finish move",
406+
"ABORT_MOVE": "Abort move",
407+
"MOVE_LEFT_CONSTRAINED": "Move left, constrained",
408+
"MOVE_RIGHT_CONSTRAINED": "Move right constrained",
409+
"MOVE_UP_CONSTRAINED": "Move up, constrained",
410+
"MOVE_DOWN_CONSTRAINED": "Move down constrained",
411+
"MOVE_LEFT_UNCONSTRAINED": "Move left, unconstrained",
412+
"MOVE_RIGHT_UNCONSTRAINED": "Move right, unconstrained",
413+
"MOVE_UP_UNCONSTRAINED": "Move up unconstrained",
414+
"MOVE_DOWN_UNCONSTRAINED": "Move down, unconstrained",
415+
"MOVE_BLOCK": "Move Block (%1)",
416+
"WINDOWS": "Windows",
417+
"MAC_OS": "macOS",
418+
"CHROME_OS": "ChromeOS",
419+
"LINUX": "Linux",
420+
"UNKNOWN": "Unknown",
421+
"CONTROL_KEY": "Ctrl",
422+
"COMMAND_KEY": "⌘ Command",
423+
"OPTION_KEY": "⌥ Option",
424+
"ALT_KEY": "Alt",
425+
"CUT_SHORTCUT": "Cut (%1)",
426+
"COPY_SHORTCUT": "Copy (%1)",
427+
"PASTE_SHORTCUT": "Paste (%1)",
428+
"HELP_PROMPT": "Press %1 for help on keyboard controls"
400429
}

msg/json/qqq.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,5 +402,34 @@
402402
"WORKSPACE_ARIA_LABEL": "workspace - This text is read out when a user navigates to the workspace while using a screen reader.",
403403
"COLLAPSED_WARNINGS_WARNING": "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.",
404404
"DIALOG_OK": "button label - Pressing this button closes help information.\n{{Identical|OK}}",
405-
"DIALOG_CANCEL": "button label - Pressing this button cancels a proposed action.\n{{Identical|Cancel}}"
405+
"DIALOG_CANCEL": "button label - Pressing this button cancels a proposed action.\n{{Identical|Cancel}}",
406+
"DELETE_SHORTCUT": "menu label - Contextual menu item that deletes the focused block.",
407+
"DELETE_KEY": "menu label - Keyboard shortcut for the Delete key, shown at the end of a menu item that deletes the focused block.",
408+
"EDIT_BLOCK_CONTENTS": "menu label - Contextual menu item that moves the keyboard navigation cursor into a subitem of the focused block.",
409+
"INSERT_BLOCK": "menu label - Contextual menu item that prompts the user to choose a block to insert into the program at the focused location.",
410+
"START_MOVE": "keyboard shortcut label - Contextual menu item that starts a keyboard-driven move of the focused block.",
411+
"FINISH_MOVE": "keyboard shortcut label - Contextual menu item that ends a keyboard-driven move of the focused block.",
412+
"ABORT_MOVE": "keyboard shortcut label - Contextual menu item that ends a keyboard-drive move of the focused block by returning it to its original location.",
413+
"MOVE_LEFT_CONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block to the next valid location to the left.",
414+
"MOVE_RIGHT_CONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block to the next valid location to the right.",
415+
"MOVE_UP_CONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block to the next valid location above it.",
416+
"MOVE_DOWN_CONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block to the next valid location below it.",
417+
"MOVE_LEFT_UNCONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block freely to the left.",
418+
"MOVE_RIGHT_UNCONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block freely to the right.",
419+
"MOVE_UP_UNCONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block freely upwards.",
420+
"MOVE_DOWN_UNCONSTRAINED": "keyboard shortcut label - Description of shortcut that moves a block freely downwards.",
421+
"MOVE_BLOCK": "menu label - Contextual menu item that starts a keyboard-driven block move.",
422+
"WINDOWS": "Name of the Microsoft Windows operating system displayed in a list of keyboard shortcuts.",
423+
"MAC_OS": "Name of the Apple macOS operating system displayed in a list of keyboard shortcuts,",
424+
"CHROME_OS": "Name of the Google ChromeOS operating system displayed in a list of keyboard shortcuts.",
425+
"LINUX": "Name of the GNU/Linux operating system displayed in a list of keyboard shortcuts.",
426+
"UNKNOWN": "Placeholder name for an operating system that can't be identified in a list of keyboard shortcuts.",
427+
"CONTROL_KEY": "Representation of the Control key used in keyboard shortcuts.",
428+
"COMMAND_KEY": "Representation of the Mac Command key used in keyboard shortcuts.",
429+
"OPTION_KEY": "Representation of the Mac Option key used in keyboard shortcuts.",
430+
"ALT_KEY": "Representation of the Alt key used in keyboard shortcuts.",
431+
"CUT_SHORTCUT": "menu label - Contextual menu item that cuts the focused item.",
432+
"COPY_SHORTCUT": "menu label - Contextual menu item that copies the focused item.",
433+
"PASTE_SHORTCUT": "menu label - Contextual menu item that pastes the previously copied item.",
434+
"HELP_PROMPT": "Alert message shown to prompt users to review available keyboard shortcuts."
406435
}

msg/messages.js

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,3 +1614,110 @@ Blockly.Msg.DIALOG_OK = 'OK';
16141614
/** @type {string} */
16151615
/// button label - Pressing this button cancels a proposed action.\n{{Identical|Cancel}}
16161616
Blockly.Msg.DIALOG_CANCEL = 'Cancel';
1617+
1618+
/** @type {string} */
1619+
/// menu label - Contextual menu item that deletes the focused block.
1620+
Blockly.Msg.DELETE_SHORTCUT = 'Delete block (%1)';
1621+
/** @type {string} */
1622+
/// menu label - Keyboard shortcut for the Delete key, shown at the end of a
1623+
/// menu item that deletes the focused block.
1624+
Blockly.Msg.DELETE_KEY = 'Del';
1625+
/** @type {string} */
1626+
/// menu label - Contextual menu item that moves the keyboard navigation cursor
1627+
/// into a subitem of the focused block.
1628+
Blockly.Msg.EDIT_BLOCK_CONTENTS = 'Edit Block contents (%1)';
1629+
/** @type {string} */
1630+
/// menu label - Contextual menu item that prompts the user to choose a block to
1631+
/// insert into the program at the focused location.
1632+
Blockly.Msg.INSERT_BLOCK = 'Insert Block (%1)';
1633+
/** @type {string} */
1634+
/// keyboard shortcut label - Contextual menu item that starts a keyboard-driven
1635+
/// move of the focused block.
1636+
Blockly.Msg.START_MOVE = 'Start move';
1637+
/** @type {string} */
1638+
/// keyboard shortcut label - Contextual menu item that ends a keyboard-driven
1639+
/// move of the focused block.
1640+
Blockly.Msg.FINISH_MOVE = 'Finish move';
1641+
/** @type {string} */
1642+
/// keyboard shortcut label - Contextual menu item that ends a keyboard-drive
1643+
/// move of the focused block by returning it to its original location.
1644+
Blockly.Msg.ABORT_MOVE = 'Abort move';
1645+
/** @type {string} */
1646+
/// keyboard shortcut label - Description of shortcut that moves a block to the
1647+
/// next valid location to the left.
1648+
Blockly.Msg.MOVE_LEFT_CONSTRAINED = 'Move left, constrained';
1649+
/** @type {string} */
1650+
/// keyboard shortcut label - Description of shortcut that moves a block to the
1651+
/// next valid location to the right.
1652+
Blockly.Msg.MOVE_RIGHT_CONSTRAINED = 'Move right constrained';
1653+
/** @type {string} */
1654+
/// keyboard shortcut label - Description of shortcut that moves a block to the
1655+
/// next valid location above it.
1656+
Blockly.Msg.MOVE_UP_CONSTRAINED = 'Move up, constrained';
1657+
/** @type {string} */
1658+
/// keyboard shortcut label - Description of shortcut that moves a block to the
1659+
/// next valid location below it.
1660+
Blockly.Msg.MOVE_DOWN_CONSTRAINED = 'Move down constrained';
1661+
/** @type {string} */
1662+
/// keyboard shortcut label - Description of shortcut that moves a block freely
1663+
/// to the left.
1664+
Blockly.Msg.MOVE_LEFT_UNCONSTRAINED = 'Move left, unconstrained';
1665+
/** @type {string} */
1666+
/// keyboard shortcut label - Description of shortcut that moves a block freely
1667+
/// to the right.
1668+
Blockly.Msg.MOVE_RIGHT_UNCONSTRAINED = 'Move right, unconstrained';
1669+
/** @type {string} */
1670+
/// keyboard shortcut label - Description of shortcut that moves a block freely
1671+
/// upwards.
1672+
Blockly.Msg.MOVE_UP_UNCONSTRAINED = 'Move up unconstrained';
1673+
/** @type {string} */
1674+
/// keyboard shortcut label - Description of shortcut that moves a block freely
1675+
/// downwards.
1676+
Blockly.Msg.MOVE_DOWN_UNCONSTRAINED = 'Move down, unconstrained';
1677+
/** @type {string} */
1678+
/// menu label - Contextual menu item that starts a keyboard-driven block move.
1679+
Blockly.Msg.MOVE_BLOCK = 'Move Block (%1)';
1680+
/** @type {string} */
1681+
/// Name of the Microsoft Windows operating system displayed in a list of
1682+
/// keyboard shortcuts.
1683+
Blockly.Msg.WINDOWS = 'Windows';
1684+
/** @type {string} */
1685+
/// Name of the Apple macOS operating system displayed in a list of keyboard
1686+
/// shortcuts,
1687+
Blockly.Msg.MAC_OS = 'macOS';
1688+
/** @type {string} */
1689+
/// Name of the Google ChromeOS operating system displayed in a list of keyboard
1690+
/// shortcuts.
1691+
Blockly.Msg.CHROME_OS = 'ChromeOS';
1692+
/** @type {string} */
1693+
/// Name of the GNU/Linux operating system displayed in a list of keyboard
1694+
/// shortcuts.
1695+
Blockly.Msg.LINUX = 'Linux';
1696+
/** @type {string} */
1697+
/// Placeholder name for an operating system that can't be identified in a list
1698+
/// of keyboard shortcuts.
1699+
Blockly.Msg.UNKNOWN = 'Unknown';
1700+
/** @type {string} */
1701+
/// Representation of the Control key used in keyboard shortcuts.
1702+
Blockly.Msg.CONTROL_KEY = 'Ctrl';
1703+
/** @type {string} */
1704+
/// Representation of the Mac Command key used in keyboard shortcuts.
1705+
Blockly.Msg.COMMAND_KEY = '⌘ Command';
1706+
/** @type {string} */
1707+
/// Representation of the Mac Option key used in keyboard shortcuts.
1708+
Blockly.Msg.OPTION_KEY = '⌥ Option';
1709+
/** @type {string} */
1710+
/// Representation of the Alt key used in keyboard shortcuts.
1711+
Blockly.Msg.ALT_KEY = 'Alt';
1712+
/** @type {string} */
1713+
/// menu label - Contextual menu item that cuts the focused item.
1714+
Blockly.Msg.CUT_SHORTCUT = 'Cut (%1)';
1715+
/** @type {string} */
1716+
/// menu label - Contextual menu item that copies the focused item.
1717+
Blockly.Msg.COPY_SHORTCUT = 'Copy (%1)';
1718+
/** @type {string} */
1719+
/// menu label - Contextual menu item that pastes the previously copied item.
1720+
Blockly.Msg.PASTE_SHORTCUT = 'Paste (%1)';
1721+
/** @type {string} */
1722+
/// Alert message shown to prompt users to review available keyboard shortcuts.
1723+
Blockly.Msg.HELP_PROMPT = 'Press %1 for help on keyboard controls';

0 commit comments

Comments
 (0)