There is such code (app / views / shared / _form_errors.html.haml):
%p= t('.errors', count: @user.errors.count) Its essence is to display a message about the number of errors found while filling out the form.
There is a file config / locales / views / shared / en.yml, in it such code:
en: shared: form_errors: prohibited: stop errors: one: Seems like one error doesn't allow you to move on other: Seems like %{count} errors don't allow you to move on Now this code is working. But if I only remove the words "Seems like" at the beginning (of the other: ), that is, I put the variable directly at the beginning of the line with the translation, as I get the following:
Okay, I'm really the owner of the application, now I read the logs.
Completed 500 Internal Server Error in 138ms (ActiveRecord: 1.2ms)
I18n :: InvalidLocaleData (can not load translation from /home/matt/workspace/www/rails/demo/config/locales/views/shared/en.yml:
found at this line at 7 column 16>):
app / controllers / account_controller.rb: 54: in `update_password '
Why is this happening? Even on RailsGuides, authors calmly place a variable in the first place. And here the whole application crashes. What's the matter?