lib/trusty_cms/available_locales.rb in trusty-cms-6.3 vs lib/trusty_cms/available_locales.rb in trusty-cms-6.3.1

- old
+ new

@@ -2,10 +2,10 @@ # Returns the list of available locale files in options_for_select format. # def self.locales available_locales = {} TrustyCms.configuration.i18n.load_path.each do |path| - if File.exists?(path) && path !~ /_available_tags/ + if File.exist?(path) && path !~ /_available_tags/ locale_yaml = YAML.load_file(path) stem = File.basename(path, '.yml') if locale_yaml[stem] && lang = locale_yaml[stem]['this_file_language'] available_locales[lang] = stem end