Skip to content

Commit 4913eda

Browse files
SunnyWan596543
and
6543
authored
Display app name in the registration email title (go-gitea#31562)
I changed the title of the registation email from "Welcome to Gitea" to "Welcome to (appname)". I did this by substituting 'Gitea' in register_notify to %s and formating the registration title in mail.go. I changed this for all the languages I could, but I struggled to changed the translation file for Farsi. I have attached the screenshots of before and after and the related issue below. Related issue: go-gitea#31108 Before change: ![Screenshot from 2024-07-04 22-32-17](https://github.com/go-gitea/gitea/assets/94445569/4178b51c-1acc-45f4-9750-dff41564a709) After: ![Screenshot from 2024-07-04 22-32-01](https://github.com/go-gitea/gitea/assets/94445569/9cd7a58d-c0f5-4a3c-a66c-805c55411eaa) --------- Signed-off-by: Sunny Wan <[email protected]> Co-authored-by: 6543 <[email protected]>
1 parent fa160b9 commit 4913eda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

options/locale/locale_en-US.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ activate_email = Verify your email address
477477
activate_email.title = %s, please verify your email address
478478
activate_email.text = Please click the following link to verify your email address within <b>%s</b>:
479479
480-
register_notify = Welcome to Gitea
480+
register_notify = Welcome to %s
481481
register_notify.title = %[1]s, welcome to %[2]s
482482
register_notify.text_1 = this is your registration confirmation email for %s!
483483
register_notify.text_2 = You can now login via username: %s.

services/mailer/mail.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func SendRegisterNotifyMail(u *user_model.User) {
158158
return
159159
}
160160

161-
msg := NewMessage(u.EmailTo(), locale.TrString("mail.register_notify"), content.String())
161+
msg := NewMessage(u.EmailTo(), locale.TrString("mail.register_notify", setting.AppName), content.String())
162162
msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID)
163163

164164
SendAsync(msg)

0 commit comments

Comments
 (0)