Cover special translation interface behavior at admin information texts

When not yet exists I18nContentTranslation languages,
SiteCustomization::InformationText section render I18n.locale by
default. This was causing that `languages in use` description and
default selected language were incorrectly initialized.
This commit is contained in:
taitus
2019-06-01 22:53:31 +02:00
committed by Senén Rodero Rodríguez
parent 0bbc6be141
commit 07577a050c

View File

@@ -60,6 +60,11 @@ module GlobalizeHelper
end
end
def languages_count
count = I18nContentTranslation.existing_languages.count
count > 0 ? count : 1
end
def display_translation_style(resource, locale)
"display: none;" unless display_translation?(resource, locale)
end