A possible bug in in i18n - how can I check if this is a bug and submit it

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...

Is this a bug?

Please let me know...

Cheers

Richard

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 at http://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

Thanks Fred for shining some light on that! I will just go along with the fix however odd it is..

Cheers

Richard