|
16 | 16 | </head>
|
17 | 17 |
|
18 | 18 | <body>
|
19 |
| - {{if .IsMention}}<p><b>@{{.Doer.Name}}</b> mentioned you:</p>{{end}} |
| 19 | + {{if .IsMention}}<p>{{.i18n.Tr "mail.issue.x_mentioned_you" .Doer.Name | Str2html}}</p>{{end}} |
20 | 20 | {{if eq .ActionName "push"}}
|
21 | 21 | <p>
|
22 |
| - <b>{{.Doer.Name}}</b> |
23 | 22 | {{if .Comment.IsForcePush}}
|
24 |
| - {{ $oldCommitLink:= printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.OldCommit}} |
25 |
| - {{ $newCommitLink:= printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.NewCommit}} |
26 |
| - force-pushed the <b>{{.Comment.Issue.PullRequest.HeadBranch}}</b> from |
27 |
| - <a href="{{$oldCommitLink}}"><b>{{ShortSha .Comment.OldCommit}}</b></a> |
28 |
| - to |
29 |
| - <a href="{{$newCommitLink}}"><b>{{ShortSha .Comment.NewCommit}}</b></a>. |
| 23 | + {{$oldCommitLink := printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.OldCommit}} |
| 24 | + {{$oldShortSha := ShortSha .Comment.OldCommit}} |
| 25 | + {{$newCommitLink := printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.NewCommit}} |
| 26 | + {{$newShortSha := ShortSha .Comment.NewCommit}} |
| 27 | + {{.i18n.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $oldShortSha $newCommitLink $newShortSha | Str2html}} |
30 | 28 | {{else}}
|
31 | 29 | {{if eq .Comment.Commits.Len 1}}
|
32 |
| - {{printf "pushed 1 commit to %s:" .Comment.Issue.PullRequest.HeadBranch}} |
| 30 | + {{.i18n.Tr "mail.issue.action.push_1" .Doer.Name .Comment.Issue.PullRequest.HeadBranch | Str2html}} |
33 | 31 | {{else}}
|
34 |
| - {{printf "pushed %d commits to %s:" .Comment.Commits.Len .Comment.Issue.PullRequest.HeadBranch}} |
| 32 | + {{.i18n.Tr "mail.issue.action.push_1" .Doer.Name .Comment.Issue.PullRequest.HeadBranch .Comment.Commits.Len | Str2html}} |
35 | 33 | {{end}}
|
36 | 34 | {{end}}
|
37 | 35 | </p>
|
38 | 36 | {{end}}
|
39 | 37 | <p>
|
40 | 38 | {{if eq .ActionName "close"}}
|
41 |
| - Closed #{{.Issue.Index}}. |
| 39 | + {{.i18n.Tr "mail.issue.action.close" .Doer.Name .Issue.Index | Str2html}} |
42 | 40 | {{else if eq .ActionName "reopen"}}
|
43 |
| - Reopened #{{.Issue.Index}}. |
| 41 | + {{.i18n.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index | Str2html}} |
44 | 42 | {{else if eq .ActionName "merge"}}
|
45 |
| - Merged #{{.Issue.Index}} into {{.Issue.PullRequest.BaseBranch}}. |
| 43 | + {{.i18n.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch | Str2html}} |
46 | 44 | {{else if eq .ActionName "approve"}}
|
47 |
| - <b>@{{.Doer.Name}}</b> approved this pull request. |
| 45 | + {{.i18n.Tr "mail.issue.action.approve" .Doer.Name | Str2html}} |
48 | 46 | {{else if eq .ActionName "reject"}}
|
49 |
| - <b>@{{.Doer.Name}}</b> requested changes on this pull request. |
| 47 | + {{.i18n.Tr "mail.issue.action.reject" .Doer.Name | Str2html}} |
50 | 48 | {{else if eq .ActionName "review"}}
|
51 |
| - <b>@{{.Doer.Name}}</b> commented on this pull request. |
| 49 | + {{.i18n.Tr "mail.issue.action.review" .Doer.Name | Str2html}} |
52 | 50 | {{else if eq .ActionName "review_dismissed"}}
|
53 |
| - <b>@{{.Doer.Name}}</b> dismissed last review from {{.Comment.Review.Reviewer.Name}} for this pull request. |
| 51 | + {{.i18n.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name | Str2html}} |
54 | 52 | {{end}}
|
55 | 53 |
|
56 | 54 | {{- if eq .Body ""}}
|
57 | 55 | {{if eq .ActionName "new"}}
|
58 |
| - Created #{{.Issue.Index}}. |
| 56 | + {{.i18n.Tr "mail.issue.action.new" .Doer.Name .Issue.Index | Str2html}} |
59 | 57 | {{end}}
|
60 | 58 | {{else}}
|
61 | 59 | {{.Body | Str2html}}
|
62 | 60 | {{end -}}
|
63 | 61 | {{- range .ReviewComments}}
|
64 | 62 | <hr>
|
65 |
| - In {{.TreePath}}: |
| 63 | + {{.i18n.Tr "mail.issue.in_tree_path" .TreePath}} |
66 | 64 | <div class="review">
|
67 | 65 | <pre>{{.Patch}}</pre>
|
68 | 66 | <div>{{.RenderedContent | Safe}}</div>
|
|
0 commit comments