diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 5545c1a1a..aad7a68ff 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -345,8 +345,8 @@ reset_password.text = Please click the following link to recover your account wi register_success = Registration successful -issue_assigned.pull = @%[1]s assigned you to the pull request %[2]s in repository %[3]s. -issue_assigned.issue = @%[1]s assigned you to the issue %[2]s in repository %[3]s. +issue_assigned.pull = @%[1]s assigned you to pull request %[2]s in repository %[3]s. +issue_assigned.issue = @%[1]s assigned you to issue %[2]s in repository %[3]s. issue.x_mentioned_you = @%s mentioned you: issue.action.force_push = %[1]s force-pushed the %[2]s from %[3]s to %[4]s. diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index c9343e8b5..22b3cbcf4 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -345,7 +345,7 @@ reset_password.text=Пожалуйста, перейдите по ссылке, register_success=Регистрация прошла успешно -issue_assigned.pull=@%[1] назначил вам запрос на слияние %[2] в репозитории %[3]. +issue_assigned.pull=@%[1]s назначил вам запрос на слияние %[2]s в репозитории %[3]s. issue_assigned.issue=@%[1]s назначил вам задачу %[2]s в репозитории %[3]s. issue.x_mentioned_you=@%s упомянул вас: diff --git a/services/mailer/mail.go b/services/mailer/mail.go index 14512d7d6..bf9004636 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -344,6 +344,16 @@ func sanitizeSubject(subject string) string { // SendIssueAssignedMail composes and sends issue assigned email func SendIssueAssignedMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, recipients []*models.User) error { + if setting.MailService == nil { + // No mail service configured + return nil + } + + if err := issue.LoadRepo(); err != nil { + log.Error("Unable to load repo [%d] for issue #%d [%d]. Error: %v", issue.RepoID, issue.Index, issue.ID, err) + return err + } + langMap := make(map[string][]*models.User) for _, user := range recipients { langMap[user.Language] = append(langMap[user.Language], user) diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl index 61e4a44f0..1c3b93097 100644 --- a/templates/mail/issue/assigned.tmpl +++ b/templates/mail/issue/assigned.tmpl @@ -8,7 +8,7 @@