From 1f4d6c43aff756e04dc018248a66378f801813eb Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Fri, 18 Sep 2026 16:31:10 +0900 Subject: [PATCH] Localize the subject and body of the test email --- app/models/mailer.rb | 2 +- app/views/mailer/test_email.html.erb | 2 +- app/views/mailer/test_email.text.erb | 2 +- config/locales/en.yml | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 53c01e1cd..073b3074a 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -557,7 +557,7 @@ class Mailer < ActionMailer::Base def test_email(user) @url = url_for(:controller => 'welcome') mail :to => user, - :subject => 'Redmine test' + :subject => l(:mail_subject_test_email) end # Send a test email to user. Will raise error that may occur during delivery. diff --git a/app/views/mailer/test_email.html.erb b/app/views/mailer/test_email.html.erb index c73f0e341..f4a101926 100644 --- a/app/views/mailer/test_email.html.erb +++ b/app/views/mailer/test_email.html.erb @@ -1,2 +1,2 @@ -

This is a test email sent by Redmine.
+

<%= l(:mail_body_test_email) %>
Redmine URL: <%= link_to @url, @url %>

diff --git a/app/views/mailer/test_email.text.erb b/app/views/mailer/test_email.text.erb index 790d6ab22..45684ce3c 100644 --- a/app/views/mailer/test_email.text.erb +++ b/app/views/mailer/test_email.text.erb @@ -1,2 +1,2 @@ -This is a test email sent by Redmine. +<%= l(:mail_body_test_email) %> Redmine URL: <%= @url %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 91890c4ac..b869c37bf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -278,6 +278,8 @@ en: mail_body_security_notification_notify_disabled: "Email address %{value} no longer receives notifications." mail_body_settings_updated: "The following settings were changed:" mail_body_password_updated: "Your password has been changed." + mail_subject_test_email: "Redmine test" + mail_body_test_email: "This is a test email sent by Redmine." mail_destroy_project_failed: Project %{value} could not be deleted. mail_destroy_project_successful: Project %{value} was deleted successfully. mail_destroy_project_with_subprojects_successful: Project %{value} and its subprojects were deleted successfully. -- 2.55.0