Can't get untranslated WorkflowState label or TranslatableMarkup

Created on 22 September 2023, about 1 year ago
Updated 15 March 2024, 8 months ago

Problem/Motivation

In https://www.drupal.org/project/state_machine/issues/3100871 the return type of WorkflowState::getLabel changed from TranslatableMarkup to string.

I want to use a WorkflowState's label as TranslatableMarkup but now it is not possible to get the untranslated label or the TranslatableMarkup.

Proposed resolution

Could we either add a function that returns the label as TranslatableMarkup or change the return type of getLabel back to TranslatableMarkup? The translated string is already provided by __toString().

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany Harlor Berlin

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

Comments & Activities

Production build 0.71.5 2024