Error messages moved to locale file

This commit is contained in:
kolaente 2017-12-29 15:43:12 +01:00 committed by Konrad
parent 5dc9c22972
commit f48d6cdecd
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
3 changed files with 5 additions and 3 deletions

View File

@ -742,6 +742,8 @@ issues.dependency.issue_closing_blockedby = Closing this pull request is blocked
issues.dependency.pr_closing_blockedby = Closing this issue is blocked by the following issues.
issues.dependency.issue_close_blocks = This issue blocks closing of the following issues.
issues.dependency.pr_close_blocks = This pull request blocks closing of the following issues.
issues.dependency.issue_close_blocked = You need to close all issues blocking this issue before you can close it!
issues.dependency.pr_close_blocked = You need to close all issues blocking this pull request before you can merge it!
issues.dependency.blocks_short = Blocks
issues.dependency.blocked_by_short = Blocked by
issues.dependency.remove_header = Remove Dependency

View File

@ -975,10 +975,10 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
if form.Status == "close" && !noDeps {
if issue.IsPull {
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
ctx.Flash.Error(ctx.Tr("issues.dependency.pr_close_blocked"))
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
} else {
ctx.Flash.Error("You need to close all issues blocking this issue before you can close it!")
ctx.Flash.Error(ctx.Tr("issues.dependency.issue_close_blocked"))
ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issue.Index))
}
return

View File

@ -527,7 +527,7 @@ func MergePullRequest(ctx *context.Context) {
}
if !noDeps {
ctx.Flash.Error("You need to close all issues blocking this pull request before you can merge it!")
ctx.Flash.Error(ctx.Tr("issues.dependency.pr_close_blocked"))
ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(pr.Index))
return
}