From f3eb772265671e07b8d150c5af3ea071966fc3d3 Mon Sep 17 00:00:00 2001 From: Mike Harvey <43474485+mikeharv@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:12:40 -0400 Subject: [PATCH] chore: add translations for accessibility messages for bitmap fields --- packages/blockly/msg/json/en.json | 4 ++++ packages/blockly/msg/json/qqq.json | 4 ++++ packages/blockly/msg/messages.js | 14 ++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/packages/blockly/msg/json/en.json b/packages/blockly/msg/json/en.json index 3f9675924e4..bcb9daf2311 100644 --- a/packages/blockly/msg/json/en.json +++ b/packages/blockly/msg/json/en.json @@ -638,6 +638,10 @@ "ARIA_TYPE_FIELD_GRID": "grid dropdown", "FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE": "Randomize", "FIELD_BITMAP_BUTTON_LABEL_CLEAR": "Clear", + "FIELD_BITMAP_PIXEL_ON": "on", + "FIELD_BITMAP_PIXEL_OFF": "off", + "FIELD_BITMAP_PIXEL_LABEL": "%1, row %2, column %3", + "FIELD_BITMAP_ARIA_VALUE": "%1 by %2, %3 pixels on", "OPEN_BACKPACK": "Open backpack", "CLOSE_BACKPACK": "Close backpack", "COPY_ALL_TO_BACKPACK": "Copy All Blocks to Backpack", diff --git a/packages/blockly/msg/json/qqq.json b/packages/blockly/msg/json/qqq.json index f443795a734..17ed5a01f71 100644 --- a/packages/blockly/msg/json/qqq.json +++ b/packages/blockly/msg/json/qqq.json @@ -643,6 +643,10 @@ "ARIA_TYPE_FIELD_GRID": "ARIA type name for the grid field.", "FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE": "Label for the 'Randomize' button in the bitmap field editor.", "FIELD_BITMAP_BUTTON_LABEL_CLEAR": "Label for the 'Clear' button in the bitmap field editor.", + "FIELD_BITMAP_PIXEL_ON": "Word used in bitmap pixel ARIA labels when a pixel is filled/on.", + "FIELD_BITMAP_PIXEL_OFF": "Word used in bitmap pixel ARIA labels when a pixel is empty/off.", + "FIELD_BITMAP_PIXEL_LABEL": "ARIA label for a single pixel in the bitmap field editor. \n\nParameters:\n* %1 - on/off state\n* %2 - 1-based row index\n* %3 - 1-based column index", + "FIELD_BITMAP_ARIA_VALUE": "ARIA value summarising the bitmap field contents. \n\nParameters:\n* %1 - width in pixels\n* %2 - height in pixels\n* %3 - number of filled pixels", "OPEN_BACKPACK": "ARIA label for the button that opens the backpack flyout.", "CLOSE_BACKPACK": "ARIA label for the button that closes the backpack flyout.", "COPY_ALL_TO_BACKPACK": "Context menu item to copy all blocks on the workspace to the backpack.", diff --git a/packages/blockly/msg/messages.js b/packages/blockly/msg/messages.js index 9c3c961d129..d88df44ca61 100644 --- a/packages/blockly/msg/messages.js +++ b/packages/blockly/msg/messages.js @@ -2427,6 +2427,20 @@ Blockly.Msg.FIELD_BITMAP_BUTTON_LABEL_RANDOMIZE = 'Randomize'; /// Label for the 'Clear' button in the bitmap field editor. Blockly.Msg.FIELD_BITMAP_BUTTON_LABEL_CLEAR = 'Clear'; /** @type {string} */ +/// Word used in bitmap pixel ARIA labels when a pixel is filled/on. +Blockly.Msg.FIELD_BITMAP_PIXEL_ON = 'on'; +/** @type {string} */ +/// Word used in bitmap pixel ARIA labels when a pixel is empty/off. +Blockly.Msg.FIELD_BITMAP_PIXEL_OFF = 'off'; +/** @type {string} */ +/// ARIA label for a single pixel in the bitmap field editor. +/// \n\nParameters:\n* %1 - on/off state\n* %2 - 1-based row index\n* %3 - 1-based column index +Blockly.Msg.FIELD_BITMAP_PIXEL_LABEL = '%1, row %2, column %3'; +/** @type {string} */ +/// ARIA value summarising the bitmap field contents. +/// \n\nParameters:\n* %1 - width in pixels\n* %2 - height in pixels\n* %3 - number of filled pixels +Blockly.Msg.FIELD_BITMAP_ARIA_VALUE = '%1 by %2, %3 pixels on'; +/** @type {string} */ /// ARIA label for the button that opens the backpack flyout. Blockly.Msg.OPEN_BACKPACK = 'Open backpack'; /** @type {string} */