Minor documentation and code improvements

- fix name of certificate in README
- avoid unneeded variable declaration in internal/services/i18n.go
main
Jan Dittberner 9 months ago
parent 9821d34939
commit c727bc39d7

@ -20,7 +20,7 @@ certificates used to verify client certificates to run `cacert-idp`.
An easy way to generate server certificate and key for local testing is
[`mkcert`](https://github.com/FiloSottile/mkcert/releases).
1. Run `mkcert` to generate `idp.cacert.localhost.pem` and
1. Run `mkcert` to generate `idp.cacert.localhost+1.pem` and
`idp.cacert.localhost+1-key.pem`:
```shell

@ -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 {
var message *i18n.Message
message, ok := m.messages[fmt.Sprintf("%s-%s", field, tag)]
if !ok {
m.logger.Infof("no specific error message %s-%s", field, tag)
@ -200,7 +198,7 @@ func (m *MessageCatalog) LookupMessage(
return translation
}
m.logger.Warnf("no translation found for %s", id)
m.logger.WithField("id", id).Warn("no translation found for id")
return id
}

Loading…
Cancel
Save