diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-03-04 14:43:23 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-03-04 17:19:14 +0100 |
commit | 6c798eba607a7e019cc1dfce6fd68be7f770c5bd (patch) | |
tree | deb10a398953f85ecc509585934fe4e0e8445e55 /deps | |
parent | ec1c97e7e9d62ce5245135e0906fdedf14af0cae (diff) |
Page context handling in i18n
This is a workaround. We need to improve on this, but not today.
Fixes #10782
Diffstat (limited to 'deps')
-rw-r--r-- | deps/deps.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/deps.go b/deps/deps.go index 6842c7331..7b252d020 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -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 |