mirror of
https://github.com/gohugoio/hugo.git
synced 2025-01-14 17:10:55 +00:00
parent
1c7b7b4ef2
commit
95e72f5e8e
1 changed files with 2 additions and 3 deletions
|
@ -19,7 +19,6 @@ import (
|
||||||
"github.com/gohugoio/hugo/helpers"
|
"github.com/gohugoio/hugo/helpers"
|
||||||
|
|
||||||
"github.com/nicksnyder/go-i18n/i18n/bundle"
|
"github.com/nicksnyder/go-i18n/i18n/bundle"
|
||||||
jww "github.com/spf13/jwalterweatherman"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -62,7 +61,7 @@ func (t Translator) initFuncs(bndl *bundle.Bundle) {
|
||||||
|
|
||||||
defaultT, err := bndl.Tfunc(defaultContentLanguage)
|
defaultT, err := bndl.Tfunc(defaultContentLanguage)
|
||||||
if err != nil {
|
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")
|
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 {
|
t.translateFuncs[currentLang] = func(translationID string, args ...interface{}) string {
|
||||||
tFunc, err := bndl.Tfunc(currentLang)
|
tFunc, err := bndl.Tfunc(currentLang)
|
||||||
if err != nil {
|
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...)
|
translated := tFunc(translationID, args...)
|
||||||
|
|
Loading…
Reference in a new issue