This project is archived and is in readonly mode.

#3740 ✓invalid
Piotr Misiurek

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

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>

People watching this ticket

Pages