1
0
Fork 0

Merge pull request #84 from paviliondev/fix-theme-i18n

FIX: explicitly lookup for translation overrides in wizard theme
Dieser Commit ist enthalten in:
Angus McLeod 2021-03-30 22:03:16 +11:00 committet von GitHub
Commit d3e34a5be2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -8,6 +8,7 @@ class CustomWizard::WizardController < ::ApplicationController
helper_method :wizard_page_title helper_method :wizard_page_title
helper_method :wizard_theme_ids helper_method :wizard_theme_ids
helper_method :wizard_theme_lookup helper_method :wizard_theme_lookup
helper_method :wizard_theme_translations_lookup
def wizard def wizard
CustomWizard::Wizard.create(params[:wizard_id].underscore, current_user) 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) Theme.lookup_field(wizard_theme_ids, mobile_view? ? :mobile : :desktop, name)
end end
def wizard_theme_translations_lookup
Theme.lookup_field(wizard_theme_ids, :translations, I18n.locale)
end
def index def index
respond_to do |format| respond_to do |format|
format.json do format.json do

Datei anzeigen

@ -21,7 +21,7 @@
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%- unless customization_disabled? %> <%- unless customization_disabled? %>
<%= theme_translations_lookup %> <%= wizard_theme_translations_lookup %>
<%= raw wizard_theme_lookup("head_tag") %> <%= raw wizard_theme_lookup("head_tag") %>
<%- end %> <%- end %>