Why I18n.translate method accepts null values but no empty string?
If translate method raise an exception with empty string, so nil key should raise too?
This works:
> I18n.t(nil) "translation missing: pt-BR.no key"
but this not:
> I18n.t("") I18n::ArgumentError: I18n::ArgumentError
See also: https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb#L151 https://github.com/svenfuchs/i18n/pull/136
I think you're right, nil key should raise an I18n::ArgumentError.
Pull requests welcome, just sayin' :)
On 12 Jun 2013, at 16:24, Pedro Souza [email protected] wrote:
If translate method raise an exception with empty string, so nil key should raise too?
This works:
I18n.t(nil) "translation missing: pt-BR.no key" but this not: I18n.t("") I18n::ArgumentError: I18n::ArgumentError
See also: https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb#L151 #136
— Reply to this email directly or view it on GitHub.
:+1:
This will be fixed by #236.