Improved account deletion grammar
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Jayden Chan 2021-10-16 14:09:09 -07:00
parent 50b65a517d
commit f34b7954ad
No known key found for this signature in database
GPG Key ID: 4F1A3E4490A56A14
1 changed files with 9 additions and 2 deletions

View File

@ -227,11 +227,18 @@ type AccountDeletionNotification struct {
// ToMail returns the mail notification for AccountDeletionNotification
func (n *AccountDeletionNotification) ToMail() *notifications.Mail {
numDays := strconv.Itoa(n.NotificationNumber)
dayString := "days"
if n.NotificationNumber == 1 {
dayString = "day"
}
return notifications.NewMail().
Subject("Your Vikunja account will be deleted in "+strconv.Itoa(n.NotificationNumber)+" days").
Subject("Your Vikunja account will be deleted in "+numDays+" "+dayString).
Greeting("Hi "+n.User.GetName()+",").
Line("You recently requested the deletion of your Vikunja account.").
Line("We will delete your account in "+strconv.Itoa(n.NotificationNumber)+" days.").
Line("We will delete your account in "+numDays+" "+dayString+".").
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!")