Strings passed to the messenger aren't translated

Created on 26 October 2022, about 2 years ago
Updated 24 October 2023, about 1 year ago

There are calls to \Drupal::messenger()->addMessage() in /src/Plugin/views/filter/Selective.php where the message isn't translated, as the following code.

\Drupal::messenger()->addMessage('Selective filter "@name": relationship of field and filter must match.',
  [
    '@name' => $ui_name,
    '@type' => $base_field,
  ],
  'error');

It should be changed to the following.

\Drupal::messenger()->addMessage(t('Selective filter "@name": relationship of field and filter must match.',
  [
    '@name' => $ui_name,
    '@type' => $base_field,
  ]),
  'error');
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium pablovos

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

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024