1
0
Fork 0
forked from forgejo/forgejo

Get locales directly from context like the other code; add translations for subtitle

This commit is contained in:
Mai-Lapyst 2024-03-16 01:17:04 +01:00
parent 6721cba75b
commit 562e5cdf32
No known key found for this signature in database
GPG key ID: F88D929C09E239F8
5 changed files with 25 additions and 33 deletions

View file

@ -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"