5
11
Fork
You've already forked tomato
1

Send emails in user's language (where possible) #169

Merged
edwardloveall merged 4 commits from el-i18n-emails into main 2026年06月17日 15:13:57 +02:00

If we send a mail message to an individual (as opposed to an organization) we
want it to be in whatever language they have set. To do this, we can wrap the
mail in I18n.with_locale(user.locale) and it will translate everything for us.

This wraps mailers in our application and devise.

This blog post was helpful: https://niallburkley.com/blog/localize-rails-emails/

If we send a mail message to an individual (as opposed to an organization) we want it to be in whatever language they have set. To do this, we can wrap the mail in `I18n.with_locale(user.locale)` and it will translate everything for us. This wraps mailers in our application and devise. This blog post was helpful: https://niallburkley.com/blog/localize-rails-emails/
This used to be `ApplicationMailer#volunteer_overflow_flag_email`. It's now
`ShiftOccurrenceMailer#volunteer_overlap_email`
Translate mailers that go to volunteers
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
88d234fa7e
If we send a mail message to an individual (as opposed to an organization) we
want it to be in whatever language they have set. To do this, we can wrap the
mail in `I18n.with_locale(user.locale)` and it will translate everything for us.
This wraps mailers in our application and devise.
This blog post was helpful: https://niallburkley.com/blog/localize-rails-emails/ 
edwardloveall force-pushed el-i18n-emails from 88d234fa7e
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 6fe02e71c4
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2026年06月11日 15:50:48 +02:00
Compare
edwardloveall force-pushed el-i18n-emails from 6fe02e71c4
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 614784f0fe
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2026年06月11日 17:59:54 +02:00
Compare
edwardloveall force-pushed el-i18n-emails from 614784f0fe
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
to 0f3e4a0677
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
2026年06月11日 18:14:38 +02:00
Compare
@ -90,0 +90,4 @@
application_mailer:
organization_onboarded:
body:"%{organization_name} just signed up. Contact them at %{organization_email}."
subject:"%{organization_name} just signed up for Rootable"
First-time contributor
Copy link

These two lines don’t appear to be in Spanish. I assume that is intentional?

These two lines don’t appear to be in Spanish. I assume that is intentional?
Author
Owner
Copy link

Yeah, we want them in English because those emails get sent to the people running the Rootable website, not a volunteer or admin. Maybe we do something in the future where we set the language for the operations users, but that's for a later time.

Yeah, we want them in English because those emails get sent to the people running the Rootable website, not a volunteer or admin. Maybe we do something in the future where we set the language for the operations users, but that's for a later time.
edwardloveall changed target branch from el-spanish to main 2026年06月17日 15:11:17 +02:00
edwardloveall deleted branch el-i18n-emails 2026年06月17日 15:13:59 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!169
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-i18n-emails"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?