MM-26052: Translate footer text in invite emails (#14956)

* MM-26052: Translate footer text in invite emails

We pass the user locale instead of the default locale to translate
the footer text too.

* Use default server locale
This commit is contained in:
Agniva De Sarker
2020-07-22 09:41:30 +05:30
committed by GitHub
parent 7e59f311a3
commit fea28821e3

View File

@@ -350,7 +350,7 @@ func (es *EmailService) SendInviteEmails(team *model.Team, senderName string, se
"TeamDisplayName": team.DisplayName,
"SiteName": es.srv.Config().TeamSettings.SiteName})
bodyPage := es.newEmailTemplate("invite_body", model.DEFAULT_LOCALE)
bodyPage := es.newEmailTemplate("invite_body", "")
bodyPage.Props["SiteURL"] = siteURL
bodyPage.Props["Title"] = utils.T("api.templates.invite_body.title")
bodyPage.Html["Info"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body.info",
@@ -411,7 +411,7 @@ func (es *EmailService) sendGuestInviteEmails(team *model.Team, channels []*mode
"TeamDisplayName": team.DisplayName,
"SiteName": es.srv.Config().TeamSettings.SiteName})
bodyPage := es.newEmailTemplate("invite_body", model.DEFAULT_LOCALE)
bodyPage := es.newEmailTemplate("invite_body", "")
bodyPage.Props["SiteURL"] = siteURL
bodyPage.Props["Title"] = utils.T("api.templates.invite_body.title")
bodyPage.Html["Info"] = utils.TranslateAsHtml(utils.T, "api.templates.invite_body_guest.info",