mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Page context handling in i18n
This is a workaround. We need to improve on this, but not today. Fixes #10782
This commit is contained in:
3
deps/deps.go
vendored
3
deps/deps.go
vendored
@@ -1,6 +1,7 @@
|
||||
package deps
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -71,7 +72,7 @@ type Deps struct {
|
||||
FileCaches filecache.Caches
|
||||
|
||||
// The translation func to use
|
||||
Translate func(translationID string, templateData any) string `json:"-"`
|
||||
Translate func(ctx context.Context, translationID string, templateData any) string `json:"-"`
|
||||
|
||||
// The language in use. TODO(bep) consolidate with site
|
||||
Language *langs.Language
|
||||
|
Reference in New Issue
Block a user