Email types not translated

I have noticed that email types in Administration -> E-Mails are not translated:

This one is a bit trickier, but here’s what I found out.

  1. The displayed email type comes from this line in the template (for the Sent page):
  2. The list shows EmailLog records, which have an email_type field defined here:
  3. EmailLog records are created in the jobs NotifyMailingListSubscribers and UserEmail.
  4. UserEmail jobs (and CriticalUserEmail jobs, which are a subtype) are queued at different locations with mostly hardcoded email types (found via grep -R "user_email" .):

(This should be it.)

In general, it would be a good idea to collect the complete list of valid email types (not to be confused with the email template types) at a central place and make these translatable (even though plugins may send emails as well, I suppose, therefore we probably cannot reject email keys that are not in this list, which would assert that this list is to be kept complete).

3 个赞

我也对所有可能的 email_type 感到好奇,因为我正在研究如何禁用某些类型的邮件。\n\n到目前为止,我看到的包括:\n\n\nsignup\nforgot_password\nmailing_list\ntest_message\n\n\n但代码中还显示了一些更不常见的类型,例如 blah

类型列表:

  • email_reject_reply_user_not_matching
  • email_reject_old_destination
  • email_reject_inactive_user
  • email_login
  • user_quoted
  • user_mentioned
  • email_reject_screened_email
  • user_invited_to_private_message
  • confirm_old_email
  • email_reject_invalid_post_specified
  • mailing_list
  • admin_confirmation_message
  • download_backup_message
  • user_private_message
  • forgot_password
  • admin_login
  • email_reject_topic_not_found
  • notify_old_email
  • invite
  • user_replied
  • suspicious_login
  • email_reject_empty
  • confirm_new_email
  • user_invited_to_topic
  • activation_reminder
  • account_suspended
  • email_reject_post_too_short
  • group_mentioned
  • account_second_factor_disabled
  • test_message
  • signup
  • user_watching_first_post
  • email_reject_topic_closed
  • email_reject_bad_destination_address
  • user_posted
  • digest
  • user_linked
3 个赞