summaryrefslogtreecommitdiff
path: root/internal/templatemanager/templatemanager.go
diff options
from:
to:
context:
space:
mode:
Diffstat (limited to 'internal/templatemanager/templatemanager.go')
-rw-r--r--internal/templatemanager/templatemanager.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/templatemanager/templatemanager.go b/internal/templatemanager/templatemanager.go
index 9d14e15..5c84418 100644
--- a/internal/templatemanager/templatemanager.go
+++ b/internal/templatemanager/templatemanager.go
@@ -8,6 +8,8 @@ import (
"path/filepath"
"strings"
"time"
+
+ "github.com/SayaAndy/saya-today-web/l10n"
)
type TemplateManager struct {
@@ -38,6 +40,9 @@ var templateFuncMap = template.FuncMap{
"fdiv": func(a, b int) float64 {
return float64(a) / float64(b)
},
+ "l": func(path ...any) any {
+ return l10n.T.GetPath(path...)
+ },
}
func NewTemplateManager(templates ...TemplateManagerTemplates) (*TemplateManager, error) {