Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discusion] Localize Commit Message for PullRequest Update #9823

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ pulls.update_branch = Update branch
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.update_commit_message = Merge branch '%s' into %s

milestones.new = New Milestone
milestones.open_tab = %d Open
Expand Down
4 changes: 2 additions & 2 deletions routers/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
ctx.Data["Divergence"] = divergence
allowUpdate, err := pull_service.IsUserAllowedToUpdate(pull, ctx.User)
if err != nil {
ctx.ServerError("GetDiverging", err)
ctx.ServerError("IsUserAllowedToUpdate", err)
return nil
}
ctx.Data["UpdateAllowed"] = allowUpdate
Expand Down Expand Up @@ -639,7 +639,7 @@ func UpdatePullRequest(ctx *context.Context) {
}

// default merge commit message
message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch)
message := ctx.Tr("repo.pulls.update_commit_message", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch)

if err = pull_service.Update(issue.PullRequest, ctx.User, message); err != nil {
sanitize := func(x string) string {
Expand Down