Thanks Fred for shining some light on that! I will just go along with the fix however odd it is..
Cheers Richard On Dec 6, 7:46 pm, Frederick Cheung <[email protected]> wrote: > On Dec 5, 1:31 pm, Richard <[email protected]> wrote: > > > > > Whilst trying to localize the date/time tag 2009-12-01 21:49:59 +0900 > > I kept getting the error TypeError: can't convert nil into String > > coming from activesupport-2.3.4/lib/active_support/vendor/i18n-0.1.3/ > > lib/i18n/backend/simple.rb:62:in `gsub!' > > > The code happened to be > > > format.gsub!(/%b/, translate(locale, :"date.abbr_month_names") > > [object.mon]) > > format.gsub!(/%B/, translate(locale, :"date.month_names") > > [object.mon]) > > > object.mon was being called as 12, where the array index would have > > been 11 for the 12th item hence the error being made, > > > I added a dummy 0 month item in my localization file and it worked... > > Well looking at the various translation files > athttp://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/they > all have a dummy valye as the first month name, so it would certainly > seem that the rails i18n folks are aware of it. They've got a google > group which would be the sensible place to discuss this further > > Fred > > > > > Is this a bug? > > > Please let me know... > > > Cheers > > > Richard -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

