Allow translation of form error messages

This change would allow the translation of form error messages, such as the "Bad credentials" message in a login form.