mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05: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)
|
||||
}
|
||||
if defaultT != nil {
|
||||
return defaultT(translationID, args...)
|
||||
if translated := defaultT(translationID, args...); translated != translationID {
|
||||
return translated
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("[i18n] %s", translationID)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue