diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-06-18 11:27:27 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-06-18 11:55:00 +0300 |
commit | 93aad3c543828efca2adeb7f96cf50ae29878593 (patch) | |
tree | 6a3dd4f6f878f8f36be9cef03a15b78b19d1f3da /langs/i18n | |
parent | 5af045ebab109d3e5501b8b6d9fd448840c96c9a (diff) |
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/i18n')
-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 |