Interesting strangeness with I18n.t

Hi all,

I have a locale en.yml file like this: https://gist.github.com/1707858

If you launch a rails console and ask for:

irb(main):003:0> I18n.t("country.ES") => "Spain"

Cool. Expected response, but what if you do:

irb(main):004:0> I18n.t("country.NO") => "translation missing: en.country.NO"

Despite it exists (check it on the paste). I have tried to add a "fake" country with code "YES", and shows the same problem as "NO". Any other country code seems to be translated correctly.

Anyone can throw a bit of light onto this matter ?

Best regards and thanks in advance, Rafael Fernández López

Forgot to specify valuable info:

irb(main):001:0> Rails.version => "3.1.3"

Running Ruby 1.9.3

Pretty sure that YES and NO are reserved words.

Try putting the definition in quotes:

"NO": Norway

That actually did it. Don't know how I missed stringify'in them.

Thanks !