summaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-08-04 07:07:15 +0900
committerGitHub <noreply@github.com>2023-08-03 22:07:15 +0000
commit6832a8eb06e382841e2cf5e52a9624bbd66a6acc (patch)
tree4270cd1100ececc0922b70bce73d140f7de0b19b /routers/web
parent70647bd04ccabcedc32bb92a0dd24502b93a4f59 (diff)
downloadgitea-6832a8eb06e382841e2cf5e52a9624bbd66a6acc.tar.gz
gitea-6832a8eb06e382841e2cf5e52a9624bbd66a6acc.zip
Add locale for deleted head branch (#26296)
As title. It will be displayed in: ![image](https://github.com/go-gitea/gitea/assets/18380374/e8507a3b-14f4-4418-a347-a36689707a16)
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/repo/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index d76e90bf24..0be8bede74 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -610,7 +610,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
if pull.IsSameRepo() {
ctx.Data["HeadTarget"] = pull.HeadBranch
} else if pull.HeadRepo == nil {
- ctx.Data["HeadTarget"] = "<deleted>:" + pull.HeadBranch
+ ctx.Data["HeadTarget"] = ctx.Locale.Tr("repo.pull.deleted_branch", pull.HeadBranch)
} else {
ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
}
@@ -654,7 +654,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
if pull.IsSameRepo() {
ctx.Data["HeadTarget"] = pull.HeadBranch
} else if pull.HeadRepo == nil {
- ctx.Data["HeadTarget"] = "<deleted>:" + pull.HeadBranch
+ ctx.Data["HeadTarget"] = ctx.Locale.Tr("repo.pull.deleted_branch", pull.HeadBranch)
} else {
ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
}