:default option with a \n char inside doesn't have expected output #81

christian opened this Issue Feb 21, 2011 · 1 comment


None yet

2 participants



I'm trying to do something like this:

I18n.t(:unknown, :default => "Hello,\n world")

When I'm having a fallback mechanism in place:

I18n.backend.class.send(:include, I18n::Backend::Fallbacks)
I18n.fallbacks.map('de' => 'en')

the above fails, i.e. the result is "Hello,\n" instead of "Hello,\n world" .
I believe there is something wrong with the "\n" character.
Is this normal behaviour or I am doing something wrong ?


knapo commented Feb 24, 2011

Good catch. Thank you! It happened in Fallbacks backend in ruby 1.8.7, as Array(string) splits string on new line char. Fixed in 1c53c5d

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment