tpl: Make it more clear on missing language string

This commit is contained in:
Bjørn Erik Pedersen 2016-09-09 21:21:16 +02:00
parent 43bf9ed38e
commit 9c5f2befc0

View file

@ -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)
}