diff --git a/app/email/email_batching.go b/app/email/email_batching.go index bb0cf7d284..7fd54006ee 100644 --- a/app/email/email_batching.go +++ b/app/email/email_batching.go @@ -328,7 +328,7 @@ func (es *Service) sendBatchedEmailNotification(userID string, notifications []* data := es.NewEmailTemplateData(user.Locale) data.Props["SiteURL"] = siteURL - data.Props["Title"] = translateFunc("api.email_batching.send_batched_email_notification.title") + data.Props["Title"] = translateFunc("api.email_batching.send_batched_email_notification.title", len(notifications)-1) data.Props["SubTitle"] = translateFunc("api.email_batching.send_batched_email_notification.subTitle") data.Props["Button"] = translateFunc("api.email_batching.send_batched_email_notification.button") data.Props["ButtonURL"] = siteURL diff --git a/go.mod b/go.mod index cafb35b688..65e001bc08 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/ledongthuc/pdf v0.0.0-20210621053716-e28cb8259002 github.com/lib/pq v1.10.3 github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattermost/go-i18n v1.11.0 + github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 github.com/mattermost/gorp v1.6.2-0.20210714143452-8b50f5209a7f github.com/mattermost/gosaml2 v0.3.3 github.com/mattermost/gziphandler v0.0.1 diff --git a/go.sum b/go.sum index fc854f6756..4923117b70 100644 --- a/go.sum +++ b/go.sum @@ -746,8 +746,8 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/pkger v0.15.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/mattermost/go-i18n v1.11.0 h1:1hLKqn/ZvhZ80OekjVPGYcCrBfMz+YxNNgqS+beL7zE= -github.com/mattermost/go-i18n v1.11.0/go.mod h1:RyS7FDNQlzF1PsjbJWHRI35exqaKGSO9qD4iv8QjE34= +github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 h1:Khvh6waxG1cHc4Cz5ef9n3XVCxRWpAKUtqg9PJl5+y8= +github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404/go.mod h1:RyS7FDNQlzF1PsjbJWHRI35exqaKGSO9qD4iv8QjE34= github.com/mattermost/gorp v1.6.2-0.20210714143452-8b50f5209a7f h1:J47te5ubXIEbEaXi/nwStKQ/sLniXACgZ7LhK365YIY= github.com/mattermost/gorp v1.6.2-0.20210714143452-8b50f5209a7f/go.mod h1:QCQ3U0M9T/BlAdjKFJo0I1oe/YAgbyjNdhU8bpOLafk= github.com/mattermost/gosaml2 v0.3.3 h1:ysWrjp08tpWmo6rV2MQ88Eag/Ttjuj91fZsvibF4/Tg= diff --git a/i18n/bg.json b/i18n/bg.json index f2f881ea93..f0feff0549 100644 --- a/i18n/bg.json +++ b/i18n/bg.json @@ -8887,13 +8887,6 @@ "id": "api.error_get_first_admin_visit_marketplace_status", "translation": "Грешка при опит за извличане от хранилището статуса първо администраторско посещение на пазара ." }, - { - "id": "api.email_batching.send_batched_email_notification.title", - "translation": { - "one": "{{ .SenderName }} Ви изпрати ново съобщение", - "other": "{{ .SenderName }} и {{.Count}} други Ви изпратиха ново съобщение" - } - }, { "id": "api.email_batching.send_batched_email_notification.time", "translation": "{{.Hour}}:{{.Minute}} {{.TimeZone}}" diff --git a/i18n/hu.json b/i18n/hu.json index e89eb1885e..e4fc616b8f 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -8955,13 +8955,6 @@ "id": "api.server.warn_metric.support_email_not_configured.notification_title", "translation": "Állítsa be a támogatási email címét" }, - { - "id": "api.email_batching.send_batched_email_notification.title", - "translation": { - "one": "Önnek új üzenetei vannak", - "other": "{{ .SenderName }} és {{.Count}} másvalaki új üzenetet kültek Önnek" - } - }, { "id": "api.email_batching.send_batched_email_notification.subTitle", "translation": "Az új üzenetek összefoglalását lásd alább." diff --git a/vendor/github.com/mattermost/go-i18n/i18n/bundle/bundle.go b/vendor/github.com/mattermost/go-i18n/i18n/bundle/bundle.go index c80512d740..9c572c070f 100644 --- a/vendor/github.com/mattermost/go-i18n/i18n/bundle/bundle.go +++ b/vendor/github.com/mattermost/go-i18n/i18n/bundle/bundle.go @@ -386,12 +386,13 @@ func (b *Bundle) translate(lang *language.Language, translationID string, args . countInt, ok := count.(int) if ok && countInt > 1 { template = translation.Template(language.Other) - if template == nil { - return translationID - } } } + if template == nil { + return translationID + } + s := template.Execute(data) if s == "" { return translationID diff --git a/vendor/modules.txt b/vendor/modules.txt index 405736f52f..0db3fca424 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -374,7 +374,7 @@ github.com/mailru/easyjson github.com/mailru/easyjson/buffer github.com/mailru/easyjson/jlexer github.com/mailru/easyjson/jwriter -# github.com/mattermost/go-i18n v1.11.0 +# github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 ## explicit github.com/mattermost/go-i18n/i18n github.com/mattermost/go-i18n/i18n/bundle