diff options
author | Yarden Shoham <hrsi88@gmail.com> | 2023-03-16 17:11:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 23:11:31 +0800 |
commit | 39d3711f3036db42d7ddf73dbdb125be611bcbba (patch) | |
tree | 39fe3b88eb6dbf7b9ed563d9f3d31abc9e0fc910 /templates | |
parent | 19bfea6d7dd7a541a097a403937f8c66ccfa3adf (diff) | |
download | gitea-39d3711f3036db42d7ddf73dbdb125be611bcbba.tar.gz gitea-39d3711f3036db42d7ddf73dbdb125be611bcbba.zip |
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>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 18 |
1 files changed, 13 insertions, 5 deletions
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"}} </button> {{else}} - <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"> - {{.locale.Tr "repo.issues.close_issue"}} + {{$closeTranslationKey := "repo.issues.close"}} + {{if .Issue.IsPull}} + {{$closeTranslationKey = "repo.pulls.close"}} + {{end}} + <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"> + {{.locale.Tr $closeTranslationKey}} </button> {{end}} {{end}} @@ -167,9 +171,13 @@ {{.locale.Tr "repo.issues.reopen_issue"}} </button> {{else}} - <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"> - {{.locale.Tr "repo.issues.close_issue"}} - </button> + {{$closeTranslationKey := "repo.issues.close"}} + {{if .Issue.IsPull}} + {{$closeTranslationKey = "repo.pulls.close"}} + {{end}} + <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"> + {{.locale.Tr $closeTranslationKey}} + </button> {{end}} {{end}} <button class="ui green button loading-button" tabindex="5"> |