mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-18 17:03:58 +00:00
tpl: Make it more clear on missing language string
This commit is contained in:
parent
43bf9ed38e
commit
9c5f2befc0
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,9 @@ func SetI18nTfuncs(bndl *bundle.Bundle) {
|
||||||
i18nWarningLogger.Printf("i18n|MISSING_TRANSLATION|%s|%s", currentLang, translationID)
|
i18nWarningLogger.Printf("i18n|MISSING_TRANSLATION|%s|%s", currentLang, translationID)
|
||||||
}
|
}
|
||||||
if defaultT != nil {
|
if defaultT != nil {
|
||||||
return defaultT(translationID, args...)
|
if translated := defaultT(translationID, args...); translated != translationID {
|
||||||
|
return translated
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("[i18n] %s", translationID)
|
return fmt.Sprintf("[i18n] %s", translationID)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue