From: Bjørn Erik Pedersen Date: Fri, 9 Sep 2016 19:21:16 +0000 (+0200) Subject: tpl: Make it more clear on missing language string X-Git-Tag: v0.17~93 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9c5f2bef;p=brevno-suite%2Fhugo tpl: Make it more clear on missing language string --- diff --git a/tpl/template_i18n.go b/tpl/template_i18n.go index 7abe2998..b973f4cd 100644 --- a/tpl/template_i18n.go +++ b/tpl/template_i18n.go @@ -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) }