1
0
Fork 0

Merge branch 'main' into pro-release

Dieser Commit ist enthalten in:
Angus McLeod 2022-07-15 15:14:57 +01:00
Commit c107ee2375

Datei anzeigen

@ -12,6 +12,7 @@ class CustomWizard::WizardController < ::ActionController::Base
before_action :preload_wizard_json
before_action :ensure_plugin_enabled
before_action :ensure_logged_in, only: [:skip]
around_action :with_resolved_locale
helper_method :wizard_page_title
helper_method :wizard_theme_id
@ -115,6 +116,13 @@ class CustomWizard::WizardController < ::ActionController::Base
@preloaded[key] = json.gsub("</", "<\\/")
end
## Simplified version of with_resolved_locale in ApplicationController
def with_resolved_locale
locale = current_user ? current_user.effective_locale : SiteSetting.default_locale
I18n.ensure_all_loaded!
I18n.with_locale(locale) { yield }
end
private
def ensure_plugin_enabled