mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 07:57:50 +01:00
Backport #17183 There was a mistake in the template file: `templates/mail/issue/assigned.tmpl` where the repourl was generated from a non-existent release instead of the issue. This PR changes this to use the issue but also ensure that the issue repo is loaded. It also slightly improves the English and the Russian locale string. Fix #17160 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
766272b154
commit
5b6b7e79cf
@ -345,8 +345,8 @@ reset_password.text = Please click the following link to recover your account wi
|
|||||||
|
|
||||||
register_success = Registration successful
|
register_success = Registration successful
|
||||||
|
|
||||||
issue_assigned.pull = @%[1]s assigned you to the pull request %[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 the issue %[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 = <b>@%s</b> mentioned you:
|
issue.x_mentioned_you = <b>@%s</b> mentioned you:
|
||||||
issue.action.force_push = <b>%[1]s</b> force-pushed the <b>%[2]s</b> from %[3]s to %[4]s.
|
issue.action.force_push = <b>%[1]s</b> force-pushed the <b>%[2]s</b> from %[3]s to %[4]s.
|
||||||
|
@ -345,7 +345,7 @@ reset_password.text=Пожалуйста, перейдите по ссылке,
|
|||||||
|
|
||||||
register_success=Регистрация прошла успешно
|
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_assigned.issue=@%[1]s назначил вам задачу %[2]s в репозитории %[3]s.
|
||||||
|
|
||||||
issue.x_mentioned_you=<b>@%s</b> упомянул вас:
|
issue.x_mentioned_you=<b>@%s</b> упомянул вас:
|
||||||
|
@ -344,6 +344,16 @@ func sanitizeSubject(subject string) string {
|
|||||||
|
|
||||||
// SendIssueAssignedMail composes and sends issue assigned email
|
// SendIssueAssignedMail composes and sends issue assigned email
|
||||||
func SendIssueAssignedMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, recipients []*models.User) error {
|
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)
|
langMap := make(map[string][]*models.User)
|
||||||
for _, user := range recipients {
|
for _, user := range recipients {
|
||||||
langMap[user.Language] = append(langMap[user.Language], user)
|
langMap[user.Language] = append(langMap[user.Language], user)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<title>{{.Subject}}</title>
|
<title>{{.Subject}}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{{$repo_url := printf "<a href='%s'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
|
{{$repo_url := printf "<a href='%s'>%s</a>" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}
|
||||||
{{$link := printf "<a href='%s'>#%d</a>" .Link .Issue.Index}}
|
{{$link := printf "<a href='%s'>#%d</a>" .Link .Issue.Index}}
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
|
Loading…
Reference in New Issue
Block a user