diff --git a/app/helpers/globalize_helper.rb b/app/helpers/globalize_helper.rb index 94fb26365..8bdef2b7a 100644 --- a/app/helpers/globalize_helper.rb +++ b/app/helpers/globalize_helper.rb @@ -11,7 +11,7 @@ module GlobalizeHelper end def display_translation?(locale) - same_locale?(neutral_locale(I18n.locale), neutral_locale(locale)) ? "" : "display: none" + same_locale?(neutral_locale(I18n.locale), neutral_locale(locale)) ? "" : "display: none;" end def translation_enabled_tag(locale, enabled) @@ -19,7 +19,7 @@ module GlobalizeHelper end def css_to_display_translation?(resource, locale) - enable_locale?(resource, locale) ? "" : "display: none" + enable_locale?(resource, locale) ? "" : "display: none;" end def enable_locale?(resource, locale) diff --git a/app/helpers/site_customization_helper.rb b/app/helpers/site_customization_helper.rb index 9e54fbf4e..911d4f9d5 100644 --- a/app/helpers/site_customization_helper.rb +++ b/app/helpers/site_customization_helper.rb @@ -4,6 +4,6 @@ module SiteCustomizationHelper end def site_customization_display_translation?(locale) - site_customization_enable_translation?(locale) ? "" : "display: none" + site_customization_enable_translation?(locale) ? "" : "display: none;" end end diff --git a/app/helpers/translatable_form_helper.rb b/app/helpers/translatable_form_helper.rb index 00d143999..82cd10a93 100644 --- a/app/helpers/translatable_form_helper.rb +++ b/app/helpers/translatable_form_helper.rb @@ -15,11 +15,11 @@ module TranslatableFormHelper def merge_translatable_field_options(options, locale) options.merge( class: "#{options[:class]} js-globalize-attribute".strip, - style: display_translation?(locale), + style: "#{options[:style]} #{display_translation?(locale)}".strip, data: options.fetch(:data, {}).merge(locale: locale), label_options: { class: "#{options.dig(:label_options, :class)} js-globalize-attribute".strip, - style: display_translation?(locale), + style: "#{options.dig(:label_options, :style)} #{display_translation?(locale)}".strip, data: (options.dig(:label_options, :data) || {}) .merge(locale: locale) } )