Validate HTML for suggested translations

Created on 6 November 2023, 11 months ago

Problem/Motivation

Today I installed Drupal 10.2 alpha1 with Umami demo and got an error message for bad HTML in one of the imported translations.
This happened in the installation dialogue and thus felt like it is a bigger thing that it really is. There was an extra space inside one of the HTML tags and that was enough to pop up a red error message.

I think it would be much better if we could validate the HTML already as the string is suggested as a translation. This shouldn't be too hard I think and would improve user experience, as error prevention is also part of usability. It's better to fail manual input than automated import.

Steps to reproduce

The live string that had the error was fixed, but to replicate would be adding a space between in some Spanish string that includes HTML. Umami demo imports Spanish during the installation. Probably would also happen with any string that had similar typo if it was selected for site language.

Proposed resolution

Add validating HTML-tags in all suggestions/edits for translations.

User interface changes

Failing validation for HTML there should be an error message, preferably an inline error message.

Feature request
Status

Active

Version

2.0

Component

User interface

Created by

🇫🇮Finland simohell

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024