diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-28 14:42:41 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-28 14:42:41 +0100 |
commit | 95e72f5e8e4634fbbb2ea7ece2156487230ad1d4 (patch) | |
tree | f501257aad97baf07d8ebe23ac45037c1b00b994 /i18n | |
parent | 1c7b7b4ef293aa133e5b55f3ebb2d37d8839532f (diff) |
i18n: Avoid using the global logger
See #4414
Diffstat (limited to 'i18n')
-rw-r--r-- | i18n/i18n.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/i18n/i18n.go b/i18n/i18n.go index 09f4b63f0..d395bbf62 100644 --- a/i18n/i18n.go +++ b/i18n/i18n.go @@ -19,7 +19,6 @@ import ( "github.com/gohugoio/hugo/helpers" "github.com/nicksnyder/go-i18n/i18n/bundle" - jww "github.com/spf13/jwalterweatherman" ) var ( @@ -62,7 +61,7 @@ func (t Translator) initFuncs(bndl *bundle.Bundle) { defaultT, err := bndl.Tfunc(defaultContentLanguage) if err != nil { - jww.WARN.Printf("No translation bundle found for default language %q", defaultContentLanguage) + t.logger.WARN.Printf("No translation bundle found for default language %q", defaultContentLanguage) } enableMissingTranslationPlaceholders := t.cfg.GetBool("enableMissingTranslationPlaceholders") @@ -72,7 +71,7 @@ func (t Translator) initFuncs(bndl *bundle.Bundle) { t.translateFuncs[currentLang] = func(translationID string, args ...interface{}) string { tFunc, err := bndl.Tfunc(currentLang) if err != nil { - jww.WARN.Printf("could not load translations for language %q (%s), will use default content language.\n", lang, err) + t.logger.WARN.Printf("could not load translations for language %q (%s), will use default content language.\n", lang, err) } translated := tFunc(translationID, args...) |