Translate email subject

This commit is contained in:
ricola 2026-01-13 20:01:29 -06:00
parent 382c6d6831
commit eb835bcebe
3 changed files with 12 additions and 8 deletions

View file

@ -579,7 +579,7 @@ def close_expired_votes
mail = Mail.new
mail.from = settings.admin_email
mail.to = user.email
mail.subject = _("Results of the vote: #{vote.title}")
mail.subject = _("Results of the vote: %{t}") % { t: vote.title }
template = ERB.new(File.read("views/votes_close_email.erb"))
mail.body = template.result(binding)
mail.deliver