I am introducing a new locale to my application, and copy all existing files in config/locales/.locale1.yml to config/locales/.locale2.yml.
At first I expect that I18n.backend.send(:translations)['locale1']
would equal I18n.backend.send(:translations)['locale2']
, but when I diff both hashes I realise that my new new 'locale2' is missing a bunch of translations.
I figure that for locale1 additional translations have been loaded from gems like for instance the popular rails-i18n gem.
As there is no (easy) way to find out in which .yml file a translation was defined, I want to get a list of all locale-files loaded from any gems.
Any suggestions how to get that information?
Even more interesting would be if I could actually implement a way to figure out from which file a translation was loaded, but I guess that would require writing a custom i18n backend that somehow stores where each key was loaded from.