问题
I try to figure out how I can localize the error item name in my rails application which appear when a user sign's up with uncorrect datas... I figured out how to override the messages but not the names of the messages like ("password", "login", "email", ...)
de:
activerecord:
errors:
models:
user:
attributes:
password_confirmation:
blank: ""
password:
confirmation: ""
blank: ""
too_short: ""
login:
taken: ""
blank: ""
too_short: ""
email:
taken: ""
blank: ""
too_short: ""
invalid: ""
template:
header: ""
body: ""
Thanks Markus
回答1:
From the i18n guide this should work:
de:
activerecord:
attributes:
user:
login: Anmeldung
来源:https://stackoverflow.com/questions/3501019/how-to-localize-the-active-record-error-messages