replase <u> with <em> in ui strings

Created on 4 January 2025, 26 days ago

Problem/Motivation

Dear Leaflet developers,
The release of Drupal CMS is getting closer and closer and Leaflet is part of this new standard download for Drupal.
Unfortunately, when translating all modules used in Drupal CMS into German, I could not avoid Leaflet either.
Since we have a great interest in ensuring that additional modules provided by the community can be translated 100%, I hereby request that the strings, the originals of which can be found at the following link, be modified.
https://localize.drupal.org/translate/languages/de/translate?project=lea...
The reason why their import fails is that they contain the tag < u>. However, this is not part of locale_string_is_safe and other functions in Drupal Core that are designed to prevent xxs cross-site scripting.

As a result, all 16 strings containing the tag u remain untranslated because they are rejected by the above function during import. So, to give leaflet a chance of being 100% translated, all u tags here must be replaced by em tags, for example.

Personally, I find this awful, but it is even more awful for Drupal users if translations of the user interface cannot be imported.
A mix of display languages also looks rather ugly and does not make a good impression on the outside world. Since I don't believe that we will suddenly revise the language system in the Drupal core - even if I would like to - I ask you to change the corresponding strings in the next release.

After that, I will pray that no one ever again comes up with the idea of translating the strings that contain the U-tag and that we don't have to manually reject the translation suggestions for them every 6 months.

Thank you for creating a corresponding patch.

https://localize.drupal.org/translate/languages/de/translate?project=lea...

Steps to reproduce

Install Drupal CMS /Drupal Core(+leaflet)
Enable leaflet, and Interface Translation
Add German as additional display language
check translation updates and import translations for m l.d.o
see current log messages - locale
you'll find that every string containing an underlining HTML tag gets skipped while the translation import

Proposed resolution

change all strings containing an u tag and replace u with em

Remaining tasks

create a patch
release a new version

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🐛 Bug report
Status

Active

Version

10.2

Component

Code

Created by

🇩🇪Germany joachim namyslo Kulmbach 🇩🇪 🇪🇺

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

Comments & Activities

  • Issue created by @joachim namyslo
  • 🇩🇪Germany joachim namyslo Kulmbach 🇩🇪 🇪🇺
  • 🇩🇪Germany joachim namyslo Kulmbach 🇩🇪 🇪🇺

    For the German translation of Drupal I have now replaced the tag u with em or b, so that there are no warning messages when importing the translations. However, as there are 114 other languages for Drupal, the source code of the module should still be adapted promptly in the relevant places.

Production build 0.71.5 2024