mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
feat(repo,locale): merge PR/issues cases for some repo/issue strings (#7092)
- Merge `archive.nocomment` and `comment.blocked_by_user`'s variants for issue and pull request to a unified string and no longer have a issue and pull request variant. - Fixes #6443 Signed-off-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7092 Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de> Co-committed-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
This commit is contained in:
parent
3769259c93
commit
b0dd490ae1
5 changed files with 11 additions and 29 deletions
|
@ -3255,11 +3255,7 @@ func NewComment(ctx *context.Context) {
|
|||
comment, err := issue_service.CreateIssueComment(ctx, ctx.Doer, ctx.Repo.Repository, issue, form.Content, attachments)
|
||||
if err != nil {
|
||||
if errors.Is(err, user_model.ErrBlockedByUser) {
|
||||
if issue.IsPull {
|
||||
ctx.JSONError(ctx.Tr("repo.pulls.comment.blocked_by_user"))
|
||||
} else {
|
||||
ctx.JSONError(ctx.Tr("repo.issues.comment.blocked_by_user"))
|
||||
}
|
||||
ctx.JSONError(ctx.Tr("repo.comment.blocked_by_user"))
|
||||
} else {
|
||||
ctx.ServerError("CreateIssueComment", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue