Fix translation string in ConfigFormBase.php

Created on 21 June 2024, 3 months ago
Updated 13 August 2024, 26 days ago

Problem/Motivation

This string should not be passed through the translation system. It should maybe be FormattableMarkup. Needs a follow-up filed to fix and discuss.

from alexpott in https://git.drupalcode.org/project/drupal/-/merge_requests/8393/diffs#no...

From core/lib/Drupal/Core/Form/ConfigFormBase.php,
$this->t(implode("\n", $transformed_message_parts));

$this->t(implode("\n", $transformed_message_parts)); shouldn't be use t(). Instead, it should be handled as FormattableMarkup() to ensure proper handling of content and prevent unintended translation.

Follow up from #3123067: Fix 'Drupal.Semantics.FunctionT.NotLiteralString' coding standard β†’

Steps to reproduce

Proposed resolution

can use FormattableMarkup() instead of t(), see: core/includes/errors.inc

Remaining tasks


Review

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

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