From 39d3711f3036db42d7ddf73dbdb125be611bcbba Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Thu, 16 Mar 2023 17:11:31 +0200 Subject: [PATCH] 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 Co-authored-by: delvh --- options/locale/locale_en-US.ini | 3 ++- templates/repo/issue/view_content.tmpl | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index afcf9ade04..da925a27f5 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1369,7 +1369,7 @@ issues.context.reference_issue = Reference in New Issue issues.context.edit = Edit issues.context.delete = Delete issues.no_content = There is no content yet. -issues.close_issue = Close +issues.close = Close Issue issues.pull_merged_at = `merged commit %[2]s into %[3]s %[4]s` issues.manually_pull_merged_at = `merged commit %[2]s into %[3]s manually %[4]s` issues.close_comment_issue = Comment and Close @@ -1654,6 +1654,7 @@ pulls.update_branch_rebase = Update branch by rebase pulls.update_branch_success = Branch update was successful pulls.update_not_allowed = You are not allowed to update branch pulls.outdated_with_base_branch = This branch is out-of-date with the base branch +pulls.close = Close Pull Request pulls.closed_at = `closed this pull request %[2]s` pulls.reopened_at = `reopened this pull request %[2]s` pulls.merge_instruction_hint = `You can also view command line instructions.` diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index f013317ca8..1b3cbdbec2 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -116,8 +116,12 @@ {{.locale.Tr "repo.issues.reopen_issue"}} {{else}} - {{end}} {{end}} @@ -167,9 +171,13 @@ {{.locale.Tr "repo.issues.reopen_issue"}} {{else}} - + {{$closeTranslationKey := "repo.issues.close"}} + {{if .Issue.IsPull}} + {{$closeTranslationKey = "repo.pulls.close"}} + {{end}} + {{end}} {{end}}