Make 'Simple Link' labels translatable

Created on 4 April 2025, 3 days ago

Problem/Motivation

Looks like the speakeasy.js script in the module uses hardcoded strings "Listen" and "Stop Listening" for the 'Simple Link' toggle button. These are not translatable through Drupal’s localization system, which limits accessibility for multilingual sites.

Steps to reproduce

1. Enable multiple languages on a Drupal site.
2. Enable and place the SpeakEasy block.
3. Switch the interface language to something other than English.
4. Observe that the button text is still in English after pressing it and no translatable strings for “Listen” or “Stop Listening” appear in the Interface Translation admin UI.

Proposed resolution

Update the speakeasy.js updateLinkState logic to use Drupal.t() for button labels, like this: link.textContent = Drupal.t('Stop Listening');

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇫🇮Finland juemiv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024