mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-2687 sending email on upgrade and moving profile pic to new location (#2808)
* Fixing CLI and adding unit tests * Adding the upgrade_db_30 to the help text * Adding the upgrade_db_30 to the help text * Adding the upgrade_db_30 to the help text * Fixing CLI tests * PLT-2687 sending email on upgrade and moving profile pic to new location * Fixing img move * Fixing moving of profile image * making upgrade email localizable * Fixing email template
This commit is contained in:
committed by
Christopher Speller
parent
b49dc28d7e
commit
9fecf96d3b
@@ -9,6 +9,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/nicksnyder/go-i18n/i18n"
|
||||
"gopkg.in/fsnotify.v1"
|
||||
)
|
||||
|
||||
@@ -77,9 +78,15 @@ func NewHTMLTemplate(templateName string, locale string) *HTMLTemplate {
|
||||
}
|
||||
|
||||
func (t *HTMLTemplate) addDefaultProps() {
|
||||
T := GetUserTranslations(t.Locale)
|
||||
t.Props["Footer"] = T("api.templates.email_footer")
|
||||
t.Html["EmailInfo"] = template.HTML(T("api.templates.email_info",
|
||||
var localT i18n.TranslateFunc
|
||||
if len(t.Locale) > 0 {
|
||||
localT = GetUserTranslations(t.Locale)
|
||||
} else {
|
||||
localT = T
|
||||
}
|
||||
|
||||
t.Props["Footer"] = localT("api.templates.email_footer")
|
||||
t.Html["EmailInfo"] = template.HTML(localT("api.templates.email_info",
|
||||
map[string]interface{}{"SupportEmail": Cfg.SupportSettings.SupportEmail, "SiteName": Cfg.TeamSettings.SiteName}))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user