summaryrefslogtreecommitdiffstats
path: root/tpl/cast
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-07-28 12:28:52 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-07-29 16:40:06 +0200
commit7907d24ba16fc5a80930c1aabf5144e684ff7f29 (patch)
tree7f4a9500a0167f4ea5b9c41a1113288ffb8f1c95 /tpl/cast
parent726fe9c3c97a9c979dc7862e7f226fc5ec1341de (diff)
tpl/lang: Add new localized versions of lang.FormatNumber etc.
Fixes #8820
Diffstat (limited to 'tpl/cast')
-rw-r--r--tpl/cast/docshelper.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/tpl/cast/docshelper.go b/tpl/cast/docshelper.go
index a3cc26de5..9a5d55b3d 100644
--- a/tpl/cast/docshelper.go
+++ b/tpl/cast/docshelper.go
@@ -18,6 +18,7 @@ import (
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/docshelper"
+ "github.com/gohugoio/hugo/langs"
"github.com/gohugoio/hugo/resources/page"
"github.com/gohugoio/hugo/tpl/internal"
)
@@ -25,10 +26,12 @@ import (
// This file provides documentation support and is randomly put into this package.
func init() {
docsProvider := func() docshelper.DocProvider {
+ cfg := config.New()
d := &deps.Deps{
- Cfg: config.New(),
+ Cfg: cfg,
Log: loggers.NewErrorLogger(),
BuildStartListeners: &deps.Listeners{},
+ Language: langs.NewDefaultLanguage(cfg),
Site: page.NewDummyHugoSite(newTestConfig()),
}