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');
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

pablovos created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review

Committed in accordance to the proposed resolution

avpaderno’s picture

Title: Translate function not being used in \Drupal::messenger()->addMessage » Strings passed to the messenger aren't translated
Issue summary: View changes
Issue tags: +Novice
juancec’s picture

Assigned: Unassigned » juancec

Hi, I'll review it.

juancec’s picture

Assigned: juancec » Unassigned
Status: Needs review » Reviewed & tested by the community

I reviewed the MR and the \Drupal::messenger()->addMessage() calls have their messages translated as the proposed solution shows. Hence I move the issue to RTBC. Good job @immaculatexavier.

philosurfer’s picture

Bump. RBTC++

joelpittet made their first commit to this issue’s fork.

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks I've committed this.

Status: Fixed » Closed (fixed)

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