diff options
author | Bjørn Erik Pedersen <[email protected]> | 2021-06-18 10:27:27 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-06-18 10:55:00 +0200 |
commit | 93aad3c543828efca2adeb7f96cf50ae29878593 (patch) | |
tree | 6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /langs | |
parent | 5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff) | |
download | hugo-93aad3c543828efca2adeb7f96cf50ae29878593.tar.gz hugo-93aad3c543828efca2adeb7f96cf50ae29878593.zip |
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles.
Updates #8654
Diffstat (limited to 'langs')
-rw-r--r-- | langs/i18n/translationProvider.go | 6 |
1 files changed, 4 insertions, 2 deletions
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 |