From 93aad3c543828efca2adeb7f96cf50ae29878593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 18 Jun 2021 10:27:27 +0200 Subject: Split out the puthe path/filepath functions into common/paths So they can be used from the config package without cyclic troubles. Updates #8654 --- langs/i18n/translationProvider.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'langs/i18n/translationProvider.go') diff --git a/langs/i18n/translationProvider.go b/langs/i18n/translationProvider.go index 1151e6e1d..70bf3b5f3 100644 --- a/langs/i18n/translationProvider.go +++ b/langs/i18n/translationProvider.go @@ -17,12 +17,14 @@ import ( "encoding/json" "strings" + "github.com/gohugoio/hugo/common/paths" + "github.com/gohugoio/hugo/common/herrors" "golang.org/x/text/language" yaml "gopkg.in/yaml.v2" - "github.com/gohugoio/hugo/helpers" "github.com/gohugoio/go-i18n/v2/i18n" + "github.com/gohugoio/hugo/helpers" toml "github.com/pelletier/go-toml" "github.com/gohugoio/hugo/deps" @@ -88,7 +90,7 @@ func addTranslationFile(bundle *i18n.Bundle, r source.File) error { f.Close() name := r.LogicalName() - lang := helpers.Filename(name) + lang := paths.Filename(name) tag := language.Make(lang) if tag == language.Und { name = artificialLangTagPrefix + name -- cgit v1.2.3