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.
- The displayed email type comes from this line in the template (for the Sent page):
- The list shows
EmailLogrecords, which have anemail_typefield defined here: EmailLogrecords are created in the jobsNotifyMailingListSubscribersandUserEmail.UserEmailjobs (andCriticalUserEmailjobs, which are a subtype) are queued at different locations with mostly hardcoded email types (found viagrep -R "user_email" .):
- app/controllers/finish_installation_controller.rb:
signupandsignup - app/controllers/admin/users_controller.rb:
account_created - app/controllers/session_controller.rb:
forgot_password - app/controllers/users_controller.rb:
admin_loginandsignup - app/jobs/scheduled/enqueue_digest_emails.rb:
digest - app/jobs/scheduled/enqueue_mailing_list_emails:
mailing_list - app/models/user.rb:
signup_after_approval - app/services/user_activator.rb:
signup - app/services/notification_emailer.rb:
user_email - lib/tasks/admin.rake:
account_created - lib/email_updater.rb:
notify_old_email - lib/email_updater.rb:
confirm_new_email,confirm_old_emailandconfirm_new_emailonce more via this helper method - any email type passed to
Email::Sender.new(...)(which creates anEmailLoghere), namely (as indicated bygrep -R "Email::Sender.new" .):- app/controllers/admin/email_controller.rb:
digest - app/jobs/regular/invite_email.rb:
invite - app/jobs/regular/invite_password_instructions_email.rb:
invite_password_instructions - app/jobs/regular/notify_mailing_list_subscribers.rb:
mailing_list - app/jobs/regular/test_email.rb:
test_message - app/jobs/regular/user_email.rb: any email type passed
- app/jobs/scheduled/version_check.rb:
new_version - app/jobs/scheduled/pending_queued_posts_reminder.rb:
pending_queued_posts_reminder - lib/email/processor.rb:
email_reject_* - lib/email/receiver.rb:
subscription
- app/controllers/admin/email_controller.rb:
(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 curtidas
Também estou curioso sobre todos os possíveis email_types, pois estou investigando como desabilitar certos tipos de e-mail.
Até agora, vi:
signup
forgot_password
mailing_list
test_message
Mas o código também mostra outros mais incomuns, como blah.
Lista de tipos:
- 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 curtidas
