From 91b0474aadd7cfd8c56e652eb5347344c4d06b5d Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 17 Jan 2020 07:05:06 +0100 Subject: [PATCH] localice Merge message and a nit --- options/locale/locale_en-US.ini | 1 + routers/repo/pull.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9a4f0535e8c67..7d11617b77fa3 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -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 diff --git a/routers/repo/pull.go b/routers/repo/pull.go index fc0012ffbe559..fe29d5daea2cc 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -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 @@ -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 {