-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add adapter for validation translations #757
Add adapter for validation translations #757
Conversation
I noticed this PR also includes the migration order changes (sloppy me). Sorry about that. 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool, and a great direction to move in. I love the use of String#% especially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dig it! This is a great step forward. Just a small note on your spec helper, but otherwise I think it's good.
Awesome! This looks great to me. I'll merge it in so we can start playing with it. Thanks! |
This PR adds the possibility to configure a custom i18n backed for validation translations, as discussed in #754. It also adds simple interpolation using format strings to create clearer error messages. For example in
validate_size_of
, the error message formin
used to be"is too short"
, and is now"must have at least %s characters"
.