0
votes

I'm running Rails 3.0.9

I have this:

<%= t time_ago_in_words(i.created_at) %>

And it prints:

<span title="translation missing: pt-BR.2 minutos" class="translation_missing">2 Minutos</span>

The translations is working but the "translation missing" keeps showing up. Does anybody know why?

I'm using the rails-i18n pt-BR.yml from here: https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/pt-BR.yml

And in my application.rb:

config.i18n.default_locale = "pt-BR"

Even if I remove the line above from aplication.rb the "translation missing" keeps showing up!

It is making crazy. =[

1

1 Answers

2
votes

The translation is already being handled by the time_ago_in_words helper, returning "2 minutos". You don't need to pass the result back to the t method again. When you call t on the already translated string, i18n is treating it as a key and trying to look it up again.