Use standard locale names for Globalize

It turns out it is not necessary to downcase and underscore
locale names to use the globalize-accessor gem. The gem
will automatically underscore the locale name when defining and
calling the accessor methods.
This commit is contained in:
Marko Lovic
2018-08-24 12:01:47 +02:00
committed by Javi Martín
parent 6fe7dc22bc
commit c7fcdd9b0e
10 changed files with 21 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
module SiteCustomizationHelper
def site_customization_enable_translation?(locale)
I18nContentTranslation.existing_languages.include?(neutral_locale(locale)) || locale == I18n.locale
I18nContentTranslation.existing_languages.include?(locale) || locale == I18n.locale
end
def site_customization_display_translation?(locale)