diff --git a/Changelog.md b/Changelog.md index 36235613c..84f822686 100644 --- a/Changelog.md +++ b/Changelog.md @@ -25,6 +25,7 @@ * Update the configurate gem to avoid issues by missed missing settings keys [#5934](https://github.com/diaspora/diaspora/pull/5934) * ContactPresenter#full_hash_with_person did not contain relationship information [#5936](https://github.com/diaspora/diaspora/pull/5936) * Fix inactive user removal not respecting configuration for daily limits [#5953](https://github.com/diaspora/diaspora/pull/5953) +* Fix missing localization of inactive user removal warning emails [#5950](https://github.com/diaspora/diaspora/issues/5950) ## Features * Hide post title of limited post in comment notification email [#5843](https://github.com/diaspora/diaspora/pull/5843) diff --git a/app/mailers/maintenance.rb b/app/mailers/maintenance.rb index 052fd7c78..6b0f2e07b 100644 --- a/app/mailers/maintenance.rb +++ b/app/mailers/maintenance.rb @@ -7,9 +7,12 @@ class Maintenance < ActionMailer::Base @pod_url = AppConfig.environment.url @after_days = AppConfig.settings.maintenance.remove_old_users.after_days.to_s @remove_after = @user.remove_after - mail(:to => @user.email, :subject => I18n.t('notifier.remove_old_user.subject')) do |format| - format.text - format.html + + I18n.with_locale(@user.language) do + mail(to: @user.email, subject: I18n.t("notifier.remove_old_user.subject")) do |format| + format.text + format.html + end end end end