This project is archived and is in readonly mode.
I18n 0.3.1 - Translation method allow nil in locale
Reported by Piotr Misiurek | January 18th, 2010 @ 01:25 PM
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
Comments and changes to this ticket
-
Prem Sichanugrist (sikachu) January 18th, 2010 @ 05:07 PM
- 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...
-
José Valim January 18th, 2010 @ 05:28 PM
- State changed from new to invalid
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>