0

Converted my Pfoodler app to an engine. The Pfoodler engine is mounted in a test app. So far so good. Rails server launches and test app loads.

When I start the Pfoodler engine, it throws an error:

translation missing: en.pfoodler.static_pages.home.page_title

As a sidebar, in the app version, the i18n string is searched for and located as

en.static_pages.home.page_title

Converting the app to an engine has added the engine namespace to the i18n file search params. This has broken all the locale YAMLs, and there are dozens of files. I could fix the error by adding the pfoodler namespace to every file, but that seems like the wrong way to solve this problem.

I get the feeling there is a very simple solution, but I have not found it. What is the best way to solve this problem?

Thanks for your help.

Elvn
  • 3,021
  • 1
  • 14
  • 27
  • After researching this at some length, I think by using the i18n-tasks gem/utility I can remap all of my existing locale YAMLs to the engine's namespace with a simple command line with params. If this works, it would be super cool, and then I'll post it as an answer. – Elvn Sep 04 '15 at 22:36
  • This was very hlepful at resolving issues with porting app ActiveRecord validation error message translations to an engine: http://stackoverflow.com/questions/14886629/inheriting-rails-i18n-validation-error-messages-in-the-subclass – Elvn Sep 10 '15 at 20:02

0 Answers0