Since in Rails 3 form.error_messages is deprecated I’m using a partial in which I iterate over full_messages and structure my html like this:
<% model.errors.full_messages.each do |msg| %>
<p><%= msg %></p>
<% end %>
However the app’s default locale is not English and in my language the structure of the full_messages is kinda unnatural:
{{attribute}} {{message}}
I saw from the source of generate_full_messages that I can localize the format and so in my locale’s yml file (bg.yml) I added this:
bg:
activerecord:
errors:
full_messages:
format: "[...]"
However the format of the validation errors stays the same.
don’t know if it can help, but a locale file for Bulgarian is available on Github.
you may also try this (should work according to rails guides):
this blog post and this stack overflow issue also talk about weird
{{attribute}} {{message}}structures. Seems caused by a conflict between two I18n gems installed on the same server.