I am struggling with an error that I’ve seen discussed in a few places.
When
a potential user of my app creates a new login, an error in their
sign-up
form generates a very ugly message, starting like so: {{count}} errors
prohibited this {{model}} from being saved
A search of the web lead me to suspect this is an internationalization
problem, but the proposed remedy (reverting to an earlier i18n gem)
hasn’t
helped. The curious thing is that I only see this error in the new-user
signup form.
IN locales files rails substituted text between {{ and }} that has
changed
to %{ and }, if your en.yml file as sentences with {{model}} change it
to
%{model} so it will get properly interpolated.
What is baffling to me is that it works once the user logs in, but not when
creating a new user …
What do you mean by ‘works’? Do you mean you do not get the error, or
you do get an error but the text is ok. If the former then you have
not fixed the {{…}} problem, it is just that the message is not being
generated (or displayed) for some reason.
Can someone explain this in en? Perhaps you mean en.yml should have the
error message translations … which I tried but got a passenger error
when
I did so. And why does all work well once the user logs in?
The error text is correct once the user logs in. All model errors are
correctly explained inside the app. But the model errors do not show
correctly if the user is at the signup screen.
Its as if the language setting isn’t set at one point, then it is set…