Only the part where the Form object was implemented in the Rails flea market app did not go well in Japanese, so I will describe how to solve it.
The creation of the ja.yml file is complete. Error messages other than Form objects can be translated into Japanese.
Even if I write Japanese input in ja.yml
, it doesn't become Japanese
config/locales/ja.yml
ja:
activerecord:
attributes:
user:
nickname:nickname
item:
text:text
image:image
name:Product name
card_address:
postal_code:Postal code
city:Municipality
address:address
phone_number:phone number
It has been corrected and resolved as follows.
ja:
activerecord:
attributes:
user:
nickname:nickname
item:
text:text
image:image
name:Product name
activemodel:
attributes:
card_address:
postal_code:Postal code
city:Municipality
address:address
phone_number:phone number
Since the forms / card_address file that describes the form object is a file that inherits ʻActiveModel, it seems that it was not reflected in ʻactiverecord: (second line)
.
Recommended Posts