forked from forgejo/forgejo
Get locales directly from context like the other code; add translations for subtitle
This commit is contained in:
parent
6721cba75b
commit
562e5cdf32
5 changed files with 25 additions and 33 deletions
|
@ -19,7 +19,6 @@ import (
|
|||
"code.gitea.io/gitea/modules/markup"
|
||||
"code.gitea.io/gitea/modules/markup/markdown"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/translation"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -684,9 +683,6 @@ func TestRender_FilePreview(t *testing.T) {
|
|||
buf := []byte("A\nB\nC\nD\n")
|
||||
return highlight.PlainText(buf), nil
|
||||
},
|
||||
GetLocale: func(ctx context.Context) (translation.Locale, error) {
|
||||
return translation.NewLocale("en-US"), nil
|
||||
},
|
||||
})
|
||||
|
||||
sha := "b6dd6210eaebc915fd5be5579c58cce4da2e2579"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue