|
|
@ -149,8 +149,6 @@ func (m *MessageCatalog) AddMessages(messages map[string]*i18n.Message) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (m *MessageCatalog) LookupErrorMessage(tag, field string, value interface{}, localizer *i18n.Localizer) string {
|
|
|
|
func (m *MessageCatalog) LookupErrorMessage(tag, field string, value interface{}, localizer *i18n.Localizer) string {
|
|
|
|
var message *i18n.Message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message, ok := m.messages[fmt.Sprintf("%s-%s", field, tag)]
|
|
|
|
message, ok := m.messages[fmt.Sprintf("%s-%s", field, tag)]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
m.logger.Infof("no specific error message %s-%s", field, tag)
|
|
|
|
m.logger.Infof("no specific error message %s-%s", field, tag)
|
|
|
@ -200,7 +198,7 @@ func (m *MessageCatalog) LookupMessage(
|
|
|
|
return translation
|
|
|
|
return translation
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m.logger.Warnf("no translation found for %s", id)
|
|
|
|
m.logger.WithField("id", id).Warn("no translation found for id")
|
|
|
|
|
|
|
|
|
|
|
|
return id
|
|
|
|
return id
|
|
|
|
}
|
|
|
|
}
|
|
|
|