mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 05:01:47 +02: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
|
@ -236,7 +236,7 @@ func TestBlockActions(t *testing.T) {
|
|||
// Ensures that comment creation on doer's owned repositories and doer's
|
||||
// posted issues are blocked.
|
||||
t.Run("Comment creation", func(t *testing.T) {
|
||||
expectedMessage := locale.Tr("repo.issues.comment.blocked_by_user")
|
||||
expectedMessage := locale.Tr("repo.comment.blocked_by_user")
|
||||
|
||||
t.Run("Blocked by repository owner", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
@ -258,7 +258,7 @@ func TestBlockActions(t *testing.T) {
|
|||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
msg := htmlDoc.doc.Find("div .warning").Text()
|
||||
assert.Contains(t, msg, "You cannot comment on this issue because you are blocked")
|
||||
assert.Contains(t, msg, expectedMessage)
|
||||
})
|
||||
|
||||
t.Run("Blocked by issue poster", func(t *testing.T) {
|
||||
|
@ -285,7 +285,7 @@ func TestBlockActions(t *testing.T) {
|
|||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
msg := htmlDoc.doc.Find("div .warning").Text()
|
||||
assert.Contains(t, msg, "You cannot comment on this issue because you are blocked")
|
||||
assert.Contains(t, msg, expectedMessage)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue