From 1bf4cbbe3e1437546c3e64c3f2700fa2c54ceaeb Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Wed, 25 Aug 2021 22:50:58 +0200 Subject: [PATCH] Add missing temp 'language' tpl function --- auth/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/auth.go b/auth/auth.go index 0d8c76ab1..9d5c46d0c 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -29,6 +29,7 @@ import ( "github.com/go-chi/chi" oauth2def "github.com/go-oauth2/oauth2/v4" "go.uber.org/zap" + "golang.org/x/text/language" ) type ( @@ -168,7 +169,8 @@ func New(ctx context.Context, log *zap.Logger, s store.Storer, opt options.AuthO "links": handlers.GetLinks, // temp, will be replaced - "tr": func(key string, pp ...string) string { return key }, + "language": func() string { return language.Tag{}.String() }, + "tr": func(key string, pp ...string) string { return key }, }) useEmbedded = len(opt.AssetsPath) == 0