Search code examples
ruby-on-railsrubyrubyminerails-i18n

Rails I18n add new locale file


I am trying to add new file to

/home/user/Project/blog/config/locales/ru.yml

So, I do just right click no the locales folder and add file ru.yml

BUT RubyMine show me exeption:

Rails i18n locale file should have single root!

enter image description here

Should I do some additional actions?


Solution

  • That error is because you have two "root level" nodes in that .yml file.

    ru:
      foo:
    bad_root:
    

    Also your file appears to be named ry.yml instead of your expected ru.yml not sure if that is what you intended.