Problem/Motivation

Translations error's

>  [notice] nl -vertaling gedownload voor webform_workflows_element.
>  [error]  Import of string "</div>" was skipped because of disallowed or malformed HTML. 
>  [error]  Import of string "<div><b>Beginstatus voor nieuwe inzendingen: </b>" was skipped because of disallowed or malformed HTML. 

Steps to reproduce

Instal Drupal Core & Webform Workflow elements.
Use a different interface language. Get the translated interface translation, for example Dutch.

Proposed resolution

Don't use structured HTML in a translation. So remove <div>'s.

WorkflowsSummaryController.php
row 451:

        'initial_state' => [
          '#type' => 'markup',
          '#prefix' => t('<div><b>Initial state for new submissions: </b>'),
          '#markup' => '<span class="webform-workflow-state-label with-color ' . webform_workflows_element_get_color_class_for_state_from_element($element, $initialState->id()) . '">' . $initialState->label() . '</span>',
          '#suffix' => t('</div>'),
        ],

Remaining tasks

Write patch / merge request

User interface changes

-

API changes

-

Data model changes

-

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Martijn de Wit created an issue. See original summary.

martijn de wit’s picture

Status: Active » Needs review

Moved the t() to the #markup and removed translation from prefix and suffix

maxwellkeeble’s picture

Status: Needs review » Fixed

Thanks, this has been fixed in the latest dev.

  • maxwellkeeble committed bd4c083e on 1.0.x
    Issue #3341508 by Martijn de Wit:  Import of string "</div>" was skipped...
martijn de wit’s picture

Thank you for the quick response!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.