Ok first phase is done - gettext support for plugins. (No models extraction yet). To test this you need my discovery branch (changing the :path here) plus fast_gettext with this patch: https://github.com/grosser/fast_gettext/pull/58 (hopefuly to be merged soon).

This patch adds support for multi domains and also instroduces support helper methods for plugins so they are easy to add support:

    initializer 'foreman_discovery.register_gettext', :after => :load_config_initializers do |app|
      locale_dir = File.join(File.expand_path('../../..', __FILE__), 'locale')
      locale_domain = 'discovery'

      Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
    end

And that's it. There is also a Rake task that configures foreman app in a .foreman_app directory so rake gettext:find can be used. More about this in https://github.com/theforeman/foreman_discovery/pull/30