工作 [当区域设置为en
时有效]当我点击“发送”按钮时,会显示错误消息name is blank
,email is blank
等(当字段为空时)这很好。输出如下:
3 errors prohibited this message from being sent:
Email can't be blank
Email is invalid
Subject can't be blank
无法正常工作但[当区域设置为es
时不起作用]当我点击“发送”按钮时,它会显示错误消息,如下所示:
3 errors prohibited this message from being sent:
Email translation missing: es.activemodel.errors.models.message.attributes.email.blank
Email translation missing: es.activemodel.errors.models.message.attributes.email.invalid
Subject translation missing: es.activemodel.errors.models.message.attributes.subject.blank
问题所以如何让这个翻译工作需要帮助,时间不多了。
感谢。
答案 0 :(得分:2)
您的es语言环境文件中是否设置了es.activemodel.errors.models.message.attributes.email.blank值?
es.yml
中的这个:
es:
activemodel:
errors:
models:
message:
attributes:
email:
blank: "I don't speak spanish I can't give an example ... Shame on me!"