mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Add locale for deleted head branch (#26296)
As title. It will be displayed in: 
This commit is contained in:
		@@ -1784,6 +1784,8 @@ pulls.delete.text = Do you really want to delete this pull request? (This will p
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pulls.recently_pushed_new_branches = You pushed on branch <strong>%[1]s</strong> %[2]s
 | 
					pulls.recently_pushed_new_branches = You pushed on branch <strong>%[1]s</strong> %[2]s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pull.deleted_branch = (deleted):%s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
milestones.new = New Milestone
 | 
					milestones.new = New Milestone
 | 
				
			||||||
milestones.closed = Closed %s
 | 
					milestones.closed = Closed %s
 | 
				
			||||||
milestones.update_ago = Updated %s
 | 
					milestones.update_ago = Updated %s
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -610,7 +610,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
 | 
				
			|||||||
			if pull.IsSameRepo() {
 | 
								if pull.IsSameRepo() {
 | 
				
			||||||
				ctx.Data["HeadTarget"] = pull.HeadBranch
 | 
									ctx.Data["HeadTarget"] = pull.HeadBranch
 | 
				
			||||||
			} else if pull.HeadRepo == nil {
 | 
								} else if pull.HeadRepo == nil {
 | 
				
			||||||
				ctx.Data["HeadTarget"] = "<deleted>:" + pull.HeadBranch
 | 
									ctx.Data["HeadTarget"] = ctx.Locale.Tr("repo.pull.deleted_branch", pull.HeadBranch)
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
 | 
									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() {
 | 
							if pull.IsSameRepo() {
 | 
				
			||||||
			ctx.Data["HeadTarget"] = pull.HeadBranch
 | 
								ctx.Data["HeadTarget"] = pull.HeadBranch
 | 
				
			||||||
		} else if pull.HeadRepo == nil {
 | 
							} else if pull.HeadRepo == nil {
 | 
				
			||||||
			ctx.Data["HeadTarget"] = "<deleted>:" + pull.HeadBranch
 | 
								ctx.Data["HeadTarget"] = ctx.Locale.Tr("repo.pull.deleted_branch", pull.HeadBranch)
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
 | 
								ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user