Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

I18n 0.3.1 - Translation method allow nil in locale

#3740

Line 206 in i18n.rb, translate method:

locale = options.key?(:locale) ? options.delete(:locale) : I18n.locale

This allow assign nil value to locale, if there is options[:key], but it's value is nil. It is possible when you are using, for example, to_sentence method without args. As a result you have InvalidLocale raised in I18n.backend.translate

Reported by Piotr Misiurek · January 18th, 2010 @ 01:25 PM

State: invalid
Milestone: none
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. José Valim
    José Valim

    Is this available in I18n 0.3.3?

    January 18th, 2010 @ 03:33 PM

  2. Prem Sichanugrist (sikachu)
    Prem Sichanugrist (sikachu)
    • Assigned user set to José Valim

    Please update your i18n gem. It's already fixed in 0.3.3

    http://github.com/svenfuchs/i18n/commit/2af8ec56f458ff0d4e3ef5b4af8...

    January 18th, 2010 @ 05:07 PM

  3. José Valim
    José Valim
    • State changed from new to invalid

    January 18th, 2010 @ 05:28 PM