lib/i18n/tasks/configuration.rb in i18n-tasks-0.6.3 vs lib/i18n/tasks/configuration.rb in i18n-tasks-0.7.0
- old
+ new
@@ -60,25 +60,10 @@
}
end
# @return [Array<String>] all available locales, base_locale is always first
def locales
- @config_sections[:locales] ||= begin
- locales = config[:locales]
- locales ||= data.available_locales
- locales = locales.map(&:to_s)
- locales = if locales.include?(base_locale)
- [base_locale] + (locales - [base_locale])
- else
- [base_locale] + locales
- end
- if config[:locales]
- log_verbose "config.locales set to #{locales}"
- else
- log_verbose "config.locales inferred from data #{locales}"
- end
- locales
- end
+ @config_sections[:locales] ||= data.locales
end
# @return [String] default i18n locale
def base_locale
@config_sections[:base_locale] ||= (config[:base_locale] || 'en').to_s