diff --git a/app/notification_email_test.go b/app/notification_email_test.go index 7dcf1ff874..b7d1b0a133 100644 --- a/app/notification_email_test.go +++ b/app/notification_email_test.go @@ -109,8 +109,8 @@ func TestGetNotificationEmailBodyFullNotificationPublicChannel(t *testing.T) { if !strings.Contains(body, "Channel: "+channel.DisplayName) { t.Fatal("Expected email text 'Channel: " + channel.DisplayName + "'. Got " + body) } - if !strings.Contains(body, "@"+senderName+" - ") { - t.Fatal("Expected email text '@" + senderName + " - '. Got " + body) + if !strings.Contains(body, senderName+" - ") { + t.Fatal("Expected email text '" + senderName + " - '. Got " + body) } if !strings.Contains(body, post.Message) { t.Fatal("Expected email text '" + post.Message + "'. Got " + body) @@ -146,8 +146,8 @@ func TestGetNotificationEmailBodyFullNotificationGroupChannel(t *testing.T) { if !strings.Contains(body, "Channel: ChannelName") { t.Fatal("Expected email text 'Channel: ChannelName'. Got " + body) } - if !strings.Contains(body, "@"+senderName+" - ") { - t.Fatal("Expected email text '@" + senderName + " - '. Got " + body) + if !strings.Contains(body, senderName+" - ") { + t.Fatal("Expected email text '" + senderName + " - '. Got " + body) } if !strings.Contains(body, post.Message) { t.Fatal("Expected email text '" + post.Message + "'. Got " + body) @@ -183,8 +183,8 @@ func TestGetNotificationEmailBodyFullNotificationPrivateChannel(t *testing.T) { if !strings.Contains(body, "Channel: "+channel.DisplayName) { t.Fatal("Expected email text 'Channel: " + channel.DisplayName + "'. Got " + body) } - if !strings.Contains(body, "@"+senderName+" - ") { - t.Fatal("Expected email text '@" + senderName + " - '. Got " + body) + if !strings.Contains(body, senderName+" - ") { + t.Fatal("Expected email text '" + senderName + " - '. Got " + body) } if !strings.Contains(body, post.Message) { t.Fatal("Expected email text '" + post.Message + "'. Got " + body) @@ -217,8 +217,8 @@ func TestGetNotificationEmailBodyFullNotificationDirectChannel(t *testing.T) { if !strings.Contains(body, "You have a new Direct Message.") { t.Fatal("Expected email text 'You have a new Direct Message. Got " + body) } - if !strings.Contains(body, "@"+senderName+" - ") { - t.Fatal("Expected email text '@" + senderName + " - '. Got " + body) + if !strings.Contains(body, senderName+" - ") { + t.Fatal("Expected email text '" + senderName + " - '. Got " + body) } if !strings.Contains(body, post.Message) { t.Fatal("Expected email text '" + post.Message + "'. Got " + body) @@ -386,8 +386,8 @@ func TestGetNotificationEmailBodyGenericNotificationPublicChannel(t *testing.T) translateFunc := utils.GetUserTranslations("en") body := th.App.getNotificationEmailBody(recipient, post, channel, channelName, senderName, teamName, teamURL, emailNotificationContentsType, true, translateFunc) - if !strings.Contains(body, "You have a new notification from @"+senderName) { - t.Fatal("Expected email text 'You have a new notification from @" + senderName + "'. Got " + body) + if !strings.Contains(body, "You have a new notification from "+senderName) { + t.Fatal("Expected email text 'You have a new notification from " + senderName + "'. Got " + body) } if strings.Contains(body, "Channel: "+channel.DisplayName) { t.Fatal("Did not expect email text 'Channel: " + channel.DisplayName + "'. Got " + body) @@ -420,8 +420,8 @@ func TestGetNotificationEmailBodyGenericNotificationGroupChannel(t *testing.T) { translateFunc := utils.GetUserTranslations("en") body := th.App.getNotificationEmailBody(recipient, post, channel, channelName, senderName, teamName, teamURL, emailNotificationContentsType, true, translateFunc) - if !strings.Contains(body, "You have a new Group Message from @"+senderName) { - t.Fatal("Expected email text 'You have a new Group Message from @" + senderName + "'. Got " + body) + if !strings.Contains(body, "You have a new Group Message from "+senderName) { + t.Fatal("Expected email text 'You have a new Group Message from " + senderName + "'. Got " + body) } if strings.Contains(body, "CHANNEL: "+channel.DisplayName) { t.Fatal("Did not expect email text 'CHANNEL: " + channel.DisplayName + "'. Got " + body) @@ -454,8 +454,8 @@ func TestGetNotificationEmailBodyGenericNotificationPrivateChannel(t *testing.T) translateFunc := utils.GetUserTranslations("en") body := th.App.getNotificationEmailBody(recipient, post, channel, channelName, senderName, teamName, teamURL, emailNotificationContentsType, true, translateFunc) - if !strings.Contains(body, "You have a new notification from @"+senderName) { - t.Fatal("Expected email text 'You have a new notification from @" + senderName + "'. Got " + body) + if !strings.Contains(body, "You have a new notification from "+senderName) { + t.Fatal("Expected email text 'You have a new notification from " + senderName + "'. Got " + body) } if strings.Contains(body, "CHANNEL: "+channel.DisplayName) { t.Fatal("Did not expect email text 'CHANNEL: " + channel.DisplayName + "'. Got " + body) @@ -488,8 +488,8 @@ func TestGetNotificationEmailBodyGenericNotificationDirectChannel(t *testing.T) translateFunc := utils.GetUserTranslations("en") body := th.App.getNotificationEmailBody(recipient, post, channel, channelName, senderName, teamName, teamURL, emailNotificationContentsType, true, translateFunc) - if !strings.Contains(body, "You have a new Direct Message from @"+senderName) { - t.Fatal("Expected email text 'You have a new Direct Message from @" + senderName + "'. Got " + body) + if !strings.Contains(body, "You have a new Direct Message from "+senderName) { + t.Fatal("Expected email text 'You have a new Direct Message from " + senderName + "'. Got " + body) } if strings.Contains(body, "CHANNEL: "+channel.DisplayName) { t.Fatal("Did not expect email text 'CHANNEL: " + channel.DisplayName + "'. Got " + body) diff --git a/i18n/en.json b/i18n/en.json index 1901d6bcb6..7a417a6d99 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -3376,7 +3376,7 @@ }, { "id": "app.notification.body.intro.direct.generic", - "translation": "You have a new Direct Message from @{{.SenderName}}" + "translation": "You have a new Direct Message from {{.SenderName}}" }, { "id": "app.notification.body.intro.group_message.full", @@ -3384,7 +3384,7 @@ }, { "id": "app.notification.body.intro.group_message.generic", - "translation": "You have a new Group Message from @{{.SenderName}}" + "translation": "You have a new Group Message from {{.SenderName}}" }, { "id": "app.notification.body.intro.notification.full", @@ -3392,11 +3392,11 @@ }, { "id": "app.notification.body.intro.notification.generic", - "translation": "You have a new notification from @{{.SenderName}}" + "translation": "You have a new notification from {{.SenderName}}" }, { "id": "app.notification.body.text.direct.full", - "translation": "@{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" + "translation": "{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" }, { "id": "app.notification.body.text.direct.generic", @@ -3408,7 +3408,7 @@ }, { "id": "app.notification.body.text.group_message.full2", - "translation": "@{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" + "translation": "{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" }, { "id": "app.notification.body.text.group_message.generic", @@ -3420,7 +3420,7 @@ }, { "id": "app.notification.body.text.notification.full2", - "translation": "@{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" + "translation": "{{.SenderName}} - {{.Hour}}:{{.Minute}} {{.TimeZone}}, {{.Month}} {{.Day}}" }, { "id": "app.notification.body.text.notification.generic",