"Tomorrow" instead of "in 1 days"
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
f34b7954ad
commit
99c2e30462
|
@ -227,18 +227,17 @@ type AccountDeletionNotification struct {
|
||||||
|
|
||||||
// ToMail returns the mail notification for AccountDeletionNotification
|
// ToMail returns the mail notification for AccountDeletionNotification
|
||||||
func (n *AccountDeletionNotification) ToMail() *notifications.Mail {
|
func (n *AccountDeletionNotification) ToMail() *notifications.Mail {
|
||||||
numDays := strconv.Itoa(n.NotificationNumber)
|
durationString := "in " + strconv.Itoa(n.NotificationNumber) + " days"
|
||||||
|
|
||||||
dayString := "days"
|
|
||||||
if n.NotificationNumber == 1 {
|
if n.NotificationNumber == 1 {
|
||||||
dayString = "day"
|
durationString = "tomorrow"
|
||||||
}
|
}
|
||||||
|
|
||||||
return notifications.NewMail().
|
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()+",").
|
Greeting("Hi "+n.User.GetName()+",").
|
||||||
Line("You recently requested the deletion of your Vikunja account.").
|
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:").
|
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()).
|
Action("Abort the deletion", config.ServiceFrontendurl.GetString()).
|
||||||
Line("Have a nice day!")
|
Line("Have a nice day!")
|
||||||
|
|
Loading…
Reference in New Issue