diff --git a/lib/foreman_ansible/engine.rb b/lib/foreman_ansible/engine.rb index 4415ea701..fad1a4c8e 100644 --- a/lib/foreman_ansible/engine.rb +++ b/lib/foreman_ansible/engine.rb @@ -19,14 +19,6 @@ class Engine < ::Rails::Engine config.autoload_paths += Dir["#{config.root}/app/views"] config.autoload_paths += Dir["#{config.root}/app/lib"] - initializer 'foreman_ansible.register_gettext', - :after => :load_config_initializers do - locale_dir = File.join(File.expand_path('../..', __dir__), 'locale') - locale_domain = 'foreman_ansible' - - Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir - end - initializer 'foreman_ansible.register_plugin', :before => :finisher_hook do require 'foreman_ansible/register' end diff --git a/lib/foreman_ansible/register.rb b/lib/foreman_ansible/register.rb index 40d80d8db..6ef4418a1 100644 --- a/lib/foreman_ansible/register.rb +++ b/lib/foreman_ansible/register.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true Foreman::Plugin.register :foreman_ansible do - requires_foreman '>= 3.6' + requires_foreman '>= 3.7' + register_gettext settings do category :ansible, N_('Ansible') do