Subject seems not to be translatable

Created on 10 April 2025, 14 days ago

Hi, in one_time_login_link_admin/one_time_login_link_admin.module we find:

      $message['subject'] = t('Your one time login link for @title', array('@title' => $params['title']), $options);

I added a German translation for the string - but it seems not to work.
Although the body text in the e-mail is translated correctly, the subject is not translated.

Is this maybe not the correct place to translate subjects? The body is translated within emailLoginLink() in one_time_login_link_admin/src/Controller/OneTimeLoginLinkController.php

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany vistree

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

Comments & Activities

  • Issue created by @vistree
  • 🇩🇪Germany vistree

    Ok, I found the problem. It seems, that the body language translation is taken from user interface and the subject from users preferred admin language.
    I can solve the problem for me by changing the preferred language for all users to DE and by sending the links from German interface.

Production build 0.71.5 2024