Improved account deletion email grammar #1006

Merged
konrad merged 2 commits from :main into main 2021-10-16 21:53:34 +00:00
1 changed files with 4 additions and 5 deletions
Showing only changes of commit 99c2e30462 - Show all commits

View File

@ -227,18 +227,17 @@ type AccountDeletionNotification struct {
// ToMail returns the mail notification for AccountDeletionNotification
func (n *AccountDeletionNotification) ToMail() *notifications.Mail {
numDays := strconv.Itoa(n.NotificationNumber)
durationString := "in " + strconv.Itoa(n.NotificationNumber) + " days"
dayString := "days"
if n.NotificationNumber == 1 {
dayString = "day"
durationString = "tomorrow"
}
Ghost marked this conversation as resolved
Review

Maybe it makes sense to change this to "tomorrow" instead?

Maybe it makes sense to change this to "tomorrow" instead?
return notifications.NewMail().
Subject("Your Vikunja account will be deleted in "+numDays+" "+dayString).
Subject("Your Vikunja account will be deleted "+durationString).
Greeting("Hi "+n.User.GetName()+",").
Line("You recently requested the deletion of your Vikunja account.").
Line("We will delete your account in "+numDays+" "+dayString+".").
Line("We will delete your account "+durationString+".").
Line("If you changed your mind, simply click the link below to cancel the deletion and follow the instructions there:").
Action("Abort the deletion", config.ServiceFrontendurl.GetString()).
Line("Have a nice day!")