Ransack add :cs and :es to app available_locales
Since ransack gem includes locales for Czech and Spanish it's include automatically to your app I18n.available_locales
I think that we should have this files out of the gem (and keep only the english file) like https://github.com/plataformatec/devise or we need a proper configuration methods to set what locales we want to use. Otherwise we should introduce unnecessary locales that could break our application.
+1, problem appears with 0.7.1 release
I don't know what the exact problem here. How is what I18n.available_locales includes a problem?
Add extra locales to I18n.available_locales should break set_locale logic on some applications, if you add some locales that application don't really have, you can break this workaround.
def set_locale
I18n.locale = extract_locale_from_subdomain || I18n.default_locale
end
def extract_locale_from_subdomain
parsed_locale = request.subdomains.first
I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil
end
Examples from http://guides.rubyonrails.org/i18n.html but it's the same situation if you use params[:locale] or if you extract locale from browser.
+1
+1
Closing this for now as it's been adressed by #186. In hindsight, many Ransack users/contributors did not seem to understand or use the locale project for adding translations. They continued to contribute them via PRs here to the locales folder in Ransack.