You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like it doesn't find locale YMLs of the gem. So as a temp fix I copied it's contents into my project en.yml (and other locales) like this:
en:
...here be project tranlsation strings...
errors:
messages:
not_a_date: "is not a date"
after: "must be after %{date}"
after_or_equal_to: "must be after or equal to %{date}"
before: "must be before %{date}"
before_or_equal_to: "must be before or equal to %{date}"
just stumbled across this. Since @gauthier-delacroix solution does not work with ruby > 2.1 and ruby 4, here is the adapted solution for ruby 2.1.5 with rails 4.x
Activity
andrew2005 commentedon Oct 26, 2013
I'm also getting this error in my unit tests. Did you find a fix?
gipnokote commentedon Oct 30, 2013
Looks like it doesn't find locale YMLs of the gem. So as a temp fix I copied it's contents into my project en.yml (and other locales) like this:
gdlx commentedon Aug 29, 2014
We shouldn't have to do that (as said in #20) but here's a small initializer to load
enlocale dynamically without including locale files in the app.config/initializers/date_validator_i18n.rb:You can also load all gem's locales with:
bryanrite commentedon Nov 14, 2014
👍
Uepsilon commentedon Jan 6, 2015
just stumbled across this. Since @gauthier-delacroix solution does not work with ruby > 2.1 and ruby 4, here is the adapted solution for ruby 2.1.5 with rails 4.x
Single:
All
Loads all gem locales files.
Loads all gem locales files.
vjustov commentedon May 19, 2015
This is fixed in #60
oriolgual commentedon May 23, 2015
Released https://github.com/codegram/date_validator/tree/v0.8.0 with this fix.