The message shown to the user when his password has expired can't be translated because the t function is not used.

\Drupal\password_policy\EventSubscriber\PasswordPolicyEventSubscriber::checkForUserPasswordExpiration

      if ($user_expired && !$ignore_route && !$is_ajax) {
        $url = new Url('entity.user.edit_form', ['user' => $user->id()]);
        $url = $url->setAbsolute()->toString();
        $event->setResponse(new RedirectResponse($url));
        $this->messenger->addError('Your password has expired, please update it');
      }

Comments

tucho created an issue. See original summary.

tucho’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

The attached patch uses the t function to allow the translation of the message for the user.

lamp5’s picture

Status: Needs review » Reviewed & tested by the community
nerdstein’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

This looks good - thanks for catching it. Merging it in.

  • nerdstein committed 16ebb74 on 8.x-3.x authored by tucho
    Issue #3131292 by tucho, lamp5: Expired password message not...
nerdstein’s picture

Status: Patch (to be ported) » Fixed

Fixed - thanks again

Status: Fixed » Closed (fixed)

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