summaryrefslogtreecommitdiffstats
path: root/config/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/10-patches.rb1
-rw-r--r--config/initializers/30-redmine.rb9
2 files changed, 8 insertions, 2 deletions
diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
index 5788091b5..850ab460a 100644
--- a/config/initializers/10-patches.rb
+++ b/config/initializers/10-patches.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'active_record'
+require 'redmine/i18n'
module ActiveRecord
class Base
diff --git a/config/initializers/30-redmine.rb b/config/initializers/30-redmine.rb
index d6240f25d..568bcb741 100644
--- a/config/initializers/30-redmine.rb
+++ b/config/initializers/30-redmine.rb
@@ -1,11 +1,16 @@
# frozen_string_literal: true
+require 'redmine/i18n'
+require 'redmine/configuration'
+require 'redmine/plugin_loader'
+
I18n.backend = Redmine::I18n::Backend.new
# Forces I18n to load available locales from the backend
I18n.config.available_locales = nil
-require 'redmine'
-require 'redmine/plugin_loader'
+Rails.application.config.to_prepare do
+ Redmine::Preparation.prepare
+end
# Load the secret token from the Redmine configuration file
secret = Redmine::Configuration['secret_token']