I have an existing codebase and I want to support internationalization for all the validations on the models. It should be as easy as adding the appropriate lines in each locale file like es.yml
and de.yml
in the format of
activerecord:
errors:
models:
user:
attributes:
some_property:
inclusion: 'must be one of [foo, bar]'
, except I have a lot of models and it'd take a very long time to comb through them by hand. Is there a tool out there that can go through my models and generate the appropriate lines for the validations in each model for me?