Skip to content

Commit

Permalink
Fixes #36384 - Use plugin dsl for gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
adamruzicka authored and stejskalleos committed May 15, 2023
1 parent 74a20ba commit 177e86f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/foreman_discovery/engine.rb
Expand Up @@ -21,13 +21,6 @@ class Engine < ::Rails::Engine
end
end

initializer 'foreman_discovery.register_gettext', :after => :load_config_initializers do |app|
locale_dir = File.join(File.expand_path('../../..', __FILE__), 'locale')
locale_domain = 'foreman_discovery'

Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
end

# Add any db migrations
initializer "foreman_discovery.load_app_instance_data" do |app|
ForemanDiscovery::Engine.paths['db/migrate'].existent.each do |path|
Expand All @@ -37,7 +30,8 @@ class Engine < ::Rails::Engine

initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
Foreman::Plugin.register :foreman_discovery do
requires_foreman '>= 3.3'
requires_foreman '>= 3.7'
register_gettext

# settings
settings do
Expand Down

0 comments on commit 177e86f

Please sign in to comment.