Skip to content

Commit 28e5e7f

Browse files
silverwindlafriks
andauthored
Add a 'this' to issue close/reopened messages (#11204)
* add a 'this' to issue close/reopened messages * add 'this issue/pull request' and create new localization entries Co-authored-by: Lauris BH <[email protected]>
1 parent 4468b0b commit 28e5e7f

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

options/locale/locale_en-US.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,8 +935,8 @@ issues.close_comment_issue = Comment and Close
935935
issues.reopen_issue = Reopen
936936
issues.reopen_comment_issue = Comment and Reopen
937937
issues.create_comment = Comment
938-
issues.closed_at = `closed <a id="%[1]s" href="#%[1]s">%[2]s</a>`
939-
issues.reopened_at = `reopened <a id="%[1]s" href="#%[1]s">%[2]s</a>`
938+
issues.closed_at = `closed this issue <a id="%[1]s" href="#%[1]s">%[2]s</a>`
939+
issues.reopened_at = `reopened this issue <a id="%[1]s" href="#%[1]s">%[2]s</a>`
940940
issues.commit_ref_at = `referenced this issue from a commit <a id="%[1]s" href="#%[1]s">%[2]s</a>`
941941
issues.ref_issue_from = `<a href="%[3]s">referenced this issue %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
942942
issues.ref_pull_from = `<a href="%[3]s">referenced this pull request %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
@@ -1152,6 +1152,8 @@ pulls.update_branch = Update branch
11521152
pulls.update_branch_success = Branch update was successful
11531153
pulls.update_not_allowed = You are not allowed to update branch
11541154
pulls.outdated_with_base_branch = This branch is out-of-date with the base branch
1155+
pulls.closed_at = `closed this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
1156+
pulls.reopened_at = `reopened this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
11551157
11561158
milestones.new = New Milestone
11571159
milestones.open_tab = %d Open

templates/repo/issue/view_content/comments.tmpl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@
7575
</a>
7676
<span class="text grey">
7777
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
78-
{{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
78+
{{if .Issue.IsPull }}
79+
{{$.i18n.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
80+
{{else}}
81+
{{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
82+
{{end}}
7983
</span>
8084
</div>
8185
{{else if eq .Type 2}}
@@ -86,7 +90,11 @@
8690
</a>
8791
<span class="text grey">
8892
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
89-
{{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
93+
{{if .Issue.IsPull }}
94+
{{$.i18n.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
95+
{{else}}
96+
{{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
97+
{{end}}
9098
</span>
9199
</div>
92100
{{else if eq .Type 28}}

0 commit comments

Comments
 (0)