From a7212e7fc5dac85120d19fc96b9653e27c0770ba Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Wed, 15 Mar 2023 20:41:48 +0000 Subject: [PATCH 1/7] Change `Close` to either `Close issue` or `Close pull request` Signed-off-by: Yarden Shoham --- options/locale/locale_en-US.ini | 3 ++- templates/repo/issue/view_content.tmpl | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index afcf9ade04da7..cda36e010f6df 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_issue = 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 f013317ca8be2..4eb0d13a3ef32 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -116,9 +116,15 @@ {{.locale.Tr "repo.issues.reopen_issue"}} {{else}} + {{if .Issue.IsPull}} + + {{else}} + {{end}} {{end}} {{end}} {{else}} + {{if .Issue.IsPull}} + + {{else}} + {{end}} {{end}} {{end}} {{else}} + {{$closeTranslationKey := "repo.issues.close_issue"}} {{if .Issue.IsPull}} - - {{else}} - + {{$closeTranslationKey = "repo.pulls.close"}} {{end}} + {{end}} {{end}} {{else}} - {{if .Issue.IsPull}} - - {{else}} - - {{end}} + {{$closeTranslationKey := "repo.issues.close_issue"}} + {{if .Issue.IsPull}} + {{$closeTranslationKey = "repo.pulls.close"}} + {{end}} + {{end}} {{end}} {{else}} - {{$closeTranslationKey := "repo.issues.close_issue"}} + {{$closeTranslationKey := "repo.issues.close"}} {{if .Issue.IsPull}} {{$closeTranslationKey = "repo.pulls.close"}} {{end}} @@ -171,7 +171,7 @@ {{.locale.Tr "repo.issues.reopen_issue"}} {{else}} - {{$closeTranslationKey := "repo.issues.close_issue"}} + {{$closeTranslationKey := "repo.issues.close"}} {{if .Issue.IsPull}} {{$closeTranslationKey = "repo.pulls.close"}} {{end}} From 57ed6bf962b137989c3ac1243d9e805f01210c96 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Thu, 16 Mar 2023 12:55:41 +0000 Subject: [PATCH 6/7] Trigger rebuild From 3f81451dc2536148c93fc24a4ec2a1785d83e883 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Thu, 16 Mar 2023 13:44:14 +0000 Subject: [PATCH 7/7] Trigger rebuild again (please pass)