From f9ac5b327a2bfc03f1779c0baf344dcbced4931a Mon Sep 17 00:00:00 2001
From: 0ko <0ko@noreply.codeberg.org>
Date: Fri, 17 May 2024 10:10:33 +0000
Subject: [PATCH] Remove `title` from email heads (#3810)
One part of https://codeberg.org/forgejo/forgejo/pulls/3316, though it may have a little more files touched because I re-created the changes.
> Removed HTML `
` part in `` that was present inconsistently in these emails. It doesn't appear to be used by other websites. After all, these are emails, not webpages.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3810
Reviewed-by: Otto
---
options/locale/locale_en-US.ini | 4 ----
services/mailer/mail_test.go | 1 -
templates/mail/auth/activate.tmpl | 1 -
templates/mail/auth/activate_email.tmpl | 1 -
templates/mail/auth/register_notify.tmpl | 1 -
templates/mail/auth/reset_passwd.tmpl | 1 -
templates/mail/issue/assigned.tmpl | 1 -
templates/mail/issue/default.tmpl | 1 -
templates/mail/notify/admin_new_user.tmpl | 1 -
templates/mail/notify/collaborator.tmpl | 1 -
templates/mail/notify/repo_transfer.tmpl | 1 -
templates/mail/release.tmpl | 1 -
12 files changed, 15 deletions(-)
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 12c4197c67..2e4d154b7f 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -473,12 +473,10 @@ link_not_working_do_paste = Does the link not work? Try copying and pasting it i
hi_user_x = Hi %s,
activate_account = Please activate your account
-activate_account.title = %s, please activate your account
activate_account.text_1 = Hi %[1]s, thanks for registering at %[2]s!
activate_account.text_2 = Please click the following link to activate your account within %s:
activate_email = Verify your email address
-activate_email.title = %s, please verify your email address
activate_email.text = Please click the following link to verify your email address within %s:
admin.new_user.subject = New user %s just signed up
@@ -486,13 +484,11 @@ admin.new_user.user_info = User information
admin.new_user.text = Please click here to manage this user from the admin panel.
register_notify = Welcome to Forgejo
-register_notify.title = %[1]s, welcome to %[2]s
register_notify.text_1 = this is your registration confirmation email for %s!
register_notify.text_2 = You can sign into your account using your username: %s
register_notify.text_3 = If someone else made this account for you, you will need to set your password first.
reset_password = Recover your account
-reset_password.title = %s, we have received a request to recover your account
reset_password.text = If this was you, please click the following link to recover your account within %s:
register_success = Registration successful
diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go
index d87c57ffe7..528b11f16b 100644
--- a/services/mailer/mail_test.go
+++ b/services/mailer/mail_test.go
@@ -36,7 +36,6 @@ const bodyTpl = `
- {{.Subject}}
diff --git a/templates/mail/auth/activate.tmpl b/templates/mail/auth/activate.tmpl
index b1bb4cb463..eb7ea5a8ec 100644
--- a/templates/mail/auth/activate.tmpl
+++ b/templates/mail/auth/activate.tmpl
@@ -3,7 +3,6 @@
- {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}
{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
diff --git a/templates/mail/auth/activate_email.tmpl b/templates/mail/auth/activate_email.tmpl
index 3d32f80a4e..9ca54d3084 100644
--- a/templates/mail/auth/activate_email.tmpl
+++ b/templates/mail/auth/activate_email.tmpl
@@ -3,7 +3,6 @@
- {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}
{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl
index 62dbf7d927..d3a668b0ef 100644
--- a/templates/mail/auth/register_notify.tmpl
+++ b/templates/mail/auth/register_notify.tmpl
@@ -3,7 +3,6 @@
- {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}}
{{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}}
diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl
index 55b1ecec3f..b85b770d87 100644
--- a/templates/mail/auth/reset_passwd.tmpl
+++ b/templates/mail/auth/reset_passwd.tmpl
@@ -3,7 +3,6 @@
- {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}
{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl
index 5720319ee8..f8ad62ae56 100644
--- a/templates/mail/issue/assigned.tmpl
+++ b/templates/mail/issue/assigned.tmpl
@@ -5,7 +5,6 @@
.footer { font-size:small; color:#666;}
- {{.Subject}}
{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}
diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl
index 395b118d3e..a94a10e27b 100644
--- a/templates/mail/issue/default.tmpl
+++ b/templates/mail/issue/default.tmpl
@@ -2,7 +2,6 @@
- {{.Subject}}
- {{.Subject}}
diff --git a/templates/mail/notify/repo_transfer.tmpl b/templates/mail/notify/repo_transfer.tmpl
index 8c8b276484..bc4c4b3660 100644
--- a/templates/mail/notify/repo_transfer.tmpl
+++ b/templates/mail/notify/repo_transfer.tmpl
@@ -2,7 +2,6 @@
- {{.Subject}}
{{$url := HTMLFormat "%[2]s" .Link .Repo}}
diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl
index 92af3216bb..8c01aec209 100644
--- a/templates/mail/release.tmpl
+++ b/templates/mail/release.tmpl
@@ -2,7 +2,6 @@
- {{.Subject}}