On Oct 17, 2011, at 10:07 PM, Paul wrote:
> Thanks Emmanuel.  I will test it out using your code.

You are among the few, the proud, the early adopters ;). Feedback most welcome!

> Can I assume the syntax is the following:
> 
> en:
>  datamapper:
>     errors:
>        messages:
>           blank: "%{attribute} is required"
>           …

The I18n support is built to be customizable. The default I18n support assumes 
messages are in:

en:
  errors:
    blank: ...
    not_a_number: …

etc.

That said, the current default transformer is not set in stone, and adjusting 
the default namespacing to lookup error messages more like AR does is probably 
a good idea (eg., 'en.datamapper.errors.messages.*').

If you have have the time, a pull request would be most welcome. You'd need to 
edit this: 
https://github.com/emmanuel/dm-validations/blob/feature/reorganize/lib/data_mapper/validation/message_transformer.rb#L104

Thanks,
Emmanuel

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to