Initialize I18n.backend translations
We were getting a 500 error because the translations had not been initialized https://stackoverflow.com/a/4054527
This commit is contained in:
@@ -67,6 +67,7 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
|
|||||||
|
|
||||||
def append_or_create_keys
|
def append_or_create_keys
|
||||||
@content = {}
|
@content = {}
|
||||||
|
I18n.backend.send(:init_translations) unless I18n.backend.initialized?
|
||||||
translations = if params[:locale].present?
|
translations = if params[:locale].present?
|
||||||
I18n.backend.send(:translations)[params[:locale].to_sym]
|
I18n.backend.send(:translations)[params[:locale].to_sym]
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user