File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -990,6 +990,17 @@ func (issue *Issue) GetLastEventLabel() string {
990
990
return "repo.issues.opened_by"
991
991
}
992
992
993
+ // GetLastEventLabelFake returns the localization label for the current issue without providing a link in the username.
994
+ func (issue * Issue ) GetLastEventLabelFake () string {
995
+ if issue .IsClosed {
996
+ if issue .IsPull && issue .PullRequest .HasMerged {
997
+ return "repo.pulls.merged_by_fake"
998
+ }
999
+ return "repo.issues.closed_by_fake"
1000
+ }
1001
+ return "repo.issues.opened_by_fake"
1002
+ }
1003
+
993
1004
// NewIssueOptions represents the options of a new issue.
994
1005
type NewIssueOptions struct {
995
1006
Repo * Repository
Original file line number Diff line number Diff line change @@ -770,8 +770,10 @@ issues.action_assignee = Assignee
770
770
issues.action_assignee_no_select = No assignee
771
771
issues.opened_by = opened %[1]s by <a href="%[2]s">%[3]s</a>
772
772
pulls.merged_by = merged %[1]s by <a href="%[2]s">%[3]s</a>
773
+ pulls.merged_by_fake = merged %[1]s by %[2]s
773
774
issues.closed_by = closed %[1]s by <a href="%[2]s">%[3]s</a>
774
775
issues.opened_by_fake = opened %[1]s by %[2]s
776
+ issues.closed_by_fake = closed %[1]s by %[2]s
775
777
issues.previous = Previous
776
778
issues.next = Next
777
779
issues.open_title = Open
Original file line number Diff line number Diff line change 222
222
{{ $timeStr := TimeSinceUnix .GetLastEventTimestamp $.Lang }}
223
223
224
224
{{if gt .Poster.ID 0}}
225
- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
225
+ {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
226
226
{{else}}
227
- {{$.i18n.Tr "repo.issues.opened_by_fake" $timeStr .Poster.Name | Safe}}
227
+ {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}}
228
228
{{end}}
229
229
230
230
{{$tasks := .GetTasks}}
Original file line number Diff line number Diff line change 87
87
88
88
<p class="desc">
89
89
{{if gt .Poster.ID 0}}
90
- {{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
90
+ {{$.i18n.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.Name | Safe}}
91
91
{{else}}
92
- {{$.i18n.Tr "repo.issues.opened_by_fake" $timeStr .Poster.Name | Safe}}
92
+ {{$.i18n.Tr .GetLastEventLabelFake $timeStr .Poster.Name | Safe}}
93
93
{{end}}
94
94
{{if .Assignee}}
95
95
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
You can’t perform that action at this time.
0 commit comments