simple_form: I18n "translation missing for en.date.order"
Hi, i think i might have stumbled upon a bug.
I have the following field declaration on a simple_form: <%= f.input :start_date %>
My application is internationalized and i’m getting the following error in that line while rendering the template: undefined method `-’ for “translation missing: en.date.order”:String
The last lines of the stack trace are the following:
actionpack (3.1.0) lib/action_view/helpers/date_helper.rb:651:in select_datetime' actionpack (3.1.0) lib/action_view/helpers/date_helper.rb:979:into_datetime_select_tag’
actionpack (3.1.0) lib/action_view/helpers/date_helper.rb:290:in datetime_select' actionpack (3.1.0) lib/action_view/helpers/date_helper.rb:1035:indatetime_select’
simple_form (1.5.1) lib/simple_form/inputs/date_time_input.rb:5:in input' simple_form (1.5.1) lib/simple_form/components/label_input.rb:11:inlabel_input’
simple_form (1.5.1) lib/simple_form/inputs/base.rb:68:in block in render' simple_form (1.5.1) lib/simple_form/inputs/base.rb:66:ineach’
simple_form (1.5.1) lib/simple_form/inputs/base.rb:66:in render' simple_form (1.5.1) lib/simple_form/form_builder.rb:95:ininput’
app/views/jump_events/_form.html.erb:12:in `block in _app_views_jump_events__form_html_erb__3886609086613822031_70186987996920’
Can you guys give me a hand in figuring out what might be wrong? 😃 Thanks a lot
About this issue
- Original URL
- State: closed
- Created 13 years ago
- Comments: 15 (1 by maintainers)
You can try to use
In your Gemfile
It’s a bit outdated but i had the same problem and i’ve found a solution. Maybe someone who will be googling for this error will find this thread. Here is my solution:
I was using custom locale file (
pl.ymlin my case) and all i needed to do was to add those lines in it:Good luck !
I had also problem with ‘month’ drop-down control. It was showing some text not months numbers or names and fix in my case for Bosnian bs_BA localization was:
Sorry about that … actually i was stupidly overriding the “date” key in my translation file 😃