Skip to content

Commit 39d3711

Browse files
yardenshohamdelvh
andauthored
Change Close to either Close issue or Close pull request (#23506)
Following [a discord discussion](https://discord.com/channels/322538954119184384/977026554909581334/1085560443919147138), the close button in the issue comment box is more descriptive. # Before For both issue and pull request ![image](https://user-images.githubusercontent.com/20454870/225449237-20c3a036-4b0f-40ab-b2f9-e72eff213165.png) # After ## Issue ![image](https://user-images.githubusercontent.com/20454870/225550855-aa138ee5-e620-4f8c-b17b-91281677ecab.png) ## Pull request ![image](https://user-images.githubusercontent.com/20454870/225550750-4dd0906d-39a9-4678-9aee-e97e5e8c302d.png) --------- Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
1 parent 19bfea6 commit 39d3711

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

options/locale/locale_en-US.ini

+2-1
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ issues.context.reference_issue = Reference in New Issue
13691369
issues.context.edit = Edit
13701370
issues.context.delete = Delete
13711371
issues.no_content = There is no content yet.
1372-
issues.close_issue = Close
1372+
issues.close = Close Issue
13731373
issues.pull_merged_at = `merged commit <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> into <b>%[3]s</b> %[4]s`
13741374
issues.manually_pull_merged_at = `merged commit <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> into <b>%[3]s</b> manually %[4]s`
13751375
issues.close_comment_issue = Comment and Close
@@ -1654,6 +1654,7 @@ pulls.update_branch_rebase = Update branch by rebase
16541654
pulls.update_branch_success = Branch update was successful
16551655
pulls.update_not_allowed = You are not allowed to update branch
16561656
pulls.outdated_with_base_branch = This branch is out-of-date with the base branch
1657+
pulls.close = Close Pull Request
16571658
pulls.closed_at = `closed this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
16581659
pulls.reopened_at = `reopened this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
16591660
pulls.merge_instruction_hint = `You can also view <a class="show-instruction">command line instructions</a>.`

templates/repo/issue/view_content.tmpl

+13-5
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,12 @@
116116
{{.locale.Tr "repo.issues.reopen_issue"}}
117117
</button>
118118
{{else}}
119-
<button id="status-button" class="ui red basic button" tabindex="6" data-status="{{.locale.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.locale.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
120-
{{.locale.Tr "repo.issues.close_issue"}}
119+
{{$closeTranslationKey := "repo.issues.close"}}
120+
{{if .Issue.IsPull}}
121+
{{$closeTranslationKey = "repo.pulls.close"}}
122+
{{end}}
123+
<button id="status-button" class="ui red basic button" tabindex="6" data-status="{{.locale.Tr $closeTranslationKey}}" data-status-and-comment="{{.locale.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
124+
{{.locale.Tr $closeTranslationKey}}
121125
</button>
122126
{{end}}
123127
{{end}}
@@ -167,9 +171,13 @@
167171
{{.locale.Tr "repo.issues.reopen_issue"}}
168172
</button>
169173
{{else}}
170-
<button id="status-button" class="ui red basic button" tabindex="6" data-status="{{.locale.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.locale.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
171-
{{.locale.Tr "repo.issues.close_issue"}}
172-
</button>
174+
{{$closeTranslationKey := "repo.issues.close"}}
175+
{{if .Issue.IsPull}}
176+
{{$closeTranslationKey = "repo.pulls.close"}}
177+
{{end}}
178+
<button id="status-button" class="ui red basic button" tabindex="6" data-status="{{.locale.Tr $closeTranslationKey}}" data-status-and-comment="{{.locale.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
179+
{{.locale.Tr $closeTranslationKey}}
180+
</button>
173181
{{end}}
174182
{{end}}
175183
<button class="ui green button loading-button" tabindex="5">

0 commit comments

Comments
 (0)