For test reasons i tried:
I18n.locale = "fehler_ausgabe"
puts I18n.translate "activerecord.attributes.diagnosis.sicherheit"
What worked correctly and returned E-mail addresse
for this yaml-file:
fehler_ausgabe:
activerecord:
attributes:
diagnosis:
sicherheit: "E-mail addresse"
Next i tried to test a error that is in my model defined like this:
validates :sicherheit, inclusion: { in: ["U","V"]}, unless: :skip_fehler
I changed my yaml file:
fehler_ausgabe:
activerecord:
attributes:
diagnosis:
sicherheit: "E-mail addresse"
inclusion: "muss zugeorndet werden"
I tried again:
puts I18n.translate "activerecord.attributes.diagnosis.sicherheit"
But now somehow get this error:
I18n::InvalidLocaleData (can not load translations from C:/Sites/heroku
2/config/locales/fehler_ausgabe.yml: #<Psych::SyntaxError: (C:/Sites/heroku2/config/locales/fehler_ausgabe.yml):
did not find expected key while parsin
g a block mapping at line 5 column 9>):
What do i wrong? I dont understand why my code now throws a error! THANKS