mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -24,7 +24,6 @@ import (
|
||||
"github.com/gohugoio/hugo/common/hreflect"
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
"github.com/gohugoio/hugo/config"
|
||||
"github.com/gohugoio/hugo/helpers"
|
||||
"github.com/gohugoio/hugo/resources/page"
|
||||
|
||||
"github.com/gohugoio/go-i18n/v2/i18n"
|
||||
@@ -32,8 +31,6 @@ import (
|
||||
|
||||
type translateFunc func(ctx context.Context, translationID string, templateData any) string
|
||||
|
||||
var i18nWarningLogger = helpers.NewDistinctErrorLogger()
|
||||
|
||||
// Translator handles i18n translations.
|
||||
type Translator struct {
|
||||
translateFuncs map[string]translateFunc
|
||||
@@ -123,7 +120,7 @@ func (t Translator) initFuncs(bndl *i18n.Bundle) {
|
||||
}
|
||||
|
||||
if t.cfg.LogI18nWarnings() {
|
||||
i18nWarningLogger.Printf("i18n|MISSING_TRANSLATION|%s|%s", currentLangStr, translationID)
|
||||
t.logger.Warnf("i18n|MISSING_TRANSLATION|%s|%s", currentLangStr, translationID)
|
||||
}
|
||||
|
||||
if enableMissingTranslationPlaceholders {
|
||||
|
Reference in New Issue
Block a user