# Email types not translated

**URL:** https://meta.discourse.org/t/email-types-not-translated/55758
**Category:** Translations
**Created:** [January 14, 2017, 11:50am UTC](https://meta.discourse.org/t/email-types-not-translated/55758 "2017-01-14T11:50:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)
#### Post date: [January 14, 2017, 11:50am UTC](https://meta.discourse.org/t/email-types-not-translated/55758/1 "2017-01-14T11:50:02Z")

</div>

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

 ![](https://global.discourse-cdn.com/meta/original/3X/c/0/c08ec348f51a9fb93bca32a479f855c8a6806ca3.png)

---

<div class="post-metadata">

### Author: ![claas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claas/32/71725_2.png) [@claas](https://meta.discourse.org/u/claas)
#### Post date: [January 14, 2017, 2:08pm UTC](https://meta.discourse.org/t/email-types-not-translated/55758/2 "2017-01-14T14:08:22Z")

</div>

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

1. The displayed email type comes [from this line](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/assets/javascripts/admin/templates/email-sent.hbs#L36) in the template (for the _Sent_ page):
2. The list shows `EmailLog` records, which have an `email_type` field [defined here](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/models/email_log.rb#L8):
3. `EmailLog` records are created in the jobs [`NotifyMailingListSubscribers`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/regular/notify_mailing_list_subscribers.rb#L64-L71) and [`UserEmail`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/regular/user_email.rb#L193-L202).
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" .`):

- _app/controllers/finish\_installation\_controller.rb_: [`signup`](https://github.com/discourse/discourse/blob/d379f57c58d12e2e10443508b6349d5f1181fa08/app/controllers/finish_installation_controller.rb#L27) and [`signup`](https://github.com/discourse/discourse/blob/d379f57c58d12e2e10443508b6349d5f1181fa08/app/controllers/finish_installation_controller.rb#L44)
- _app/controllers/admin/users\_controller.rb_: [`account_created`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/controllers/admin/users_controller.rb#L341)
- _app/controllers/session\_controller.rb_: [`forgot_password`](https://github.com/discourse/discourse/blob/7918d99a2e053ee43dbd928e11873fba69acdd57/app/controllers/session_controller.rb#L228)
- _app/controllers/users\_controller.rb_: [`admin_login`](https://github.com/discourse/discourse/blob/43671b1fdac10817b89b4f2c8c96cf29c6dbf5d1/app/controllers/users_controller.rb#L466) and [`signup`](https://github.com/discourse/discourse/blob/43671b1fdac10817b89b4f2c8c96cf29c6dbf5d1/app/controllers/users_controller.rb#L553)
- _app/jobs/scheduled/enqueue\_digest\_emails.rb_: [`digest`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/scheduled/enqueue_digest_emails.rb#L10)
- _app/jobs/scheduled/enqueue\_mailing\_list\_emails_: [`mailing_list`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/scheduled/enqueue_mailing_list_emails.rb#L9)
- _app/models/user.rb_: [`signup_after_approval`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/models/user.rb#L963)
- _app/services/user\_activator.rb_: [`signup`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/services/user_activator.rb#L50)
- _app/services/notification\_emailer.rb_: [`user_email`](https://github.com/discourse/discourse/blob/c531f4ded5604fe0335284f12149322c16931cb7/app/services/notification_emailer.rb#L86)
- _lib/tasks/admin.rake_: [`account_created`](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/tasks/admin.rake#L27)
- _lib/email\_updater.rb_: [`notify_old_email`](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email_updater.rb#L105)
- _lib/email\_updater.rb_: [`confirm_new_email`](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email_updater.rb#L53), [`confirm_old_email`](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email_updater.rb#L55) and [`confirm_new_email`](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email_updater.rb#L80) once more via [this helper method](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email_updater.rb#L112)
- any email type passed to `Email::Sender.new(...)` (which creates an `EmailLog` [here](https://github.com/discourse/discourse/blob/a03287f2ee2a2f2d7ae363cad9ebc04c6586318c/lib/email/sender.rb#L66)), namely (as indicated by `grep -R "Email::Sender.new" .`):
  - _app/controllers/admin/email\_controller.rb_: [`digest`](https://github.com/discourse/discourse/blob/f885e5b5e65d0f1443f746f02d7a5ad2ebfcd687/app/controllers/admin/email_controller.rb#L62)
  - _app/jobs/regular/invite\_email.rb_: [`invite`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/regular/invite_email.rb#L13)
  - _app/jobs/regular/invite\_password\_instructions\_email.rb_: [`invite_password_instructions`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/regular/invite_password_instructions_email.rb#L12)
  - _app/jobs/regular/notify\_mailing\_list\_subscribers.rb_: [`mailing_list`](https://github.com/discourse/discourse/blob/664feca199cf1f4c76945a48a4d5b964de7d064d/app/jobs/regular/notify_mailing_list_subscribers.rb#L56)
  - _app/jobs/regular/test\_email.rb_: [`test_message`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/regular/test_email.rb#L15)
  - _app/jobs/regular/user\_email.rb_: [any email type passed](https://github.com/discourse/discourse/blob/7a1ff59822b3ad22c17b86745755ceff519b841f/app/jobs/regular/user_email.rb#L41)
  - _app/jobs/scheduled/version\_check.rb_: [`new_version`](https://github.com/discourse/discourse/blob/5dbd6a304bed5400be481d71061d3e3ebb4d6785/app/jobs/scheduled/version_check.rb#L27)
  - _app/jobs/scheduled/pending\_queued\_posts\_reminder.rb_: `pending_queued_posts_reminder`
  - _lib/email/processor.rb_: [`email_reject_*`](https://github.com/discourse/discourse/blob/ae560f343cc15fd751f1a0e71ba5fbbdf72e0248/lib/email/processor.rb#L37-L77)
  - _lib/email/receiver.rb_: [`subscription`](https://github.com/discourse/discourse/blob/ae560f343cc15fd751f1a0e71ba5fbbdf72e0248/lib/email/receiver.rb#L89)

(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).

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [February 11, 2020, 2:50am UTC](https://meta.discourse.org/t/email-types-not-translated/55758/3 "2020-02-11T02:50:16Z")

</div>

I’m also curious about all possible `email_type`s, because I’m looking into [disabling certain email types](https://meta.discourse.org/t/reduce-the-number-of-emails-sent-by-discourse/141245).

So far, I’ve seen:

```plaintext
signup
forgot_password
mailing_list
test_message

```

But the code also shows more unusual ones like [`blah`](https://github.com/discourse/discourse/blob/e219588142929c74bb0ef988f35337075f35e6d0/spec/models/email_log_spec.rb#L26).

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 11, 2020, 3:02am UTC](https://meta.discourse.org/t/email-types-not-translated/55758/4 "2020-02-11T03:02:59Z")

</div>

List of types:

- 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
