From e79458f6ce5dc45500a22fb8517704cabc6b62c2 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Tue, 30 Mar 2021 13:04:52 +0530 Subject: [PATCH] FIX: explicitly lookup for translation overrides in wizard theme --- controllers/custom_wizard/wizard.rb | 5 +++++ views/layouts/wizard.html.erb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/controllers/custom_wizard/wizard.rb b/controllers/custom_wizard/wizard.rb index 51b15f09..5cbeb6e3 100644 --- a/controllers/custom_wizard/wizard.rb +++ b/controllers/custom_wizard/wizard.rb @@ -8,6 +8,7 @@ class CustomWizard::WizardController < ::ApplicationController helper_method :wizard_page_title helper_method :wizard_theme_ids helper_method :wizard_theme_lookup + helper_method :wizard_theme_translations_lookup def wizard CustomWizard::Wizard.create(params[:wizard_id].underscore, current_user) @@ -25,6 +26,10 @@ class CustomWizard::WizardController < ::ApplicationController Theme.lookup_field(wizard_theme_ids, mobile_view? ? :mobile : :desktop, name) end + def wizard_theme_translations_lookup + Theme.lookup_field(wizard_theme_ids, :translations, I18n.locale) + end + def index respond_to do |format| format.json do diff --git a/views/layouts/wizard.html.erb b/views/layouts/wizard.html.erb index 45551c59..efa09734 100644 --- a/views/layouts/wizard.html.erb +++ b/views/layouts/wizard.html.erb @@ -21,7 +21,7 @@ <%= csrf_meta_tags %> <%- unless customization_disabled? %> - <%= theme_translations_lookup %> + <%= wizard_theme_translations_lookup %> <%= raw wizard_theme_lookup("head_tag") %> <%- end %>