{"action":"closed","issue":{"url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/607","labels_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/607/comments","events_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/607/events","html_url":"https://github.com/activerecord-hackery/ransack/issues/607","id":111724850,"number":607,"title":"Loading all locales should be configurable","user":{"login":"why-el","id":1326771,"avatar_url":"https://avatars.githubusercontent.com/u/1326771?v=3","gravatar_id":"","url":"https://api.github.com/users/why-el","html_url":"https://github.com/why-el","followers_url":"https://api.github.com/users/why-el/followers","following_url":"https://api.github.com/users/why-el/following{/other_user}","gists_url":"https://api.github.com/users/why-el/gists{/gist_id}","starred_url":"https://api.github.com/users/why-el/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/why-el/subscriptions","organizations_url":"https://api.github.com/users/why-el/orgs","repos_url":"https://api.github.com/users/why-el/repos","events_url":"https://api.github.com/users/why-el/events{/privacy}","received_events_url":"https://api.github.com/users/why-el/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-15T22:59:10Z","updated_at":"2015-11-14T21:41:17Z","closed_at":"2015-11-14T21:41:17Z","body":"One consequence of ransack's loading of all its I18n YAML files is that all of them end up being added to `I18n.available_locales`. This will break for apps that rely on `I18n.available_locales` to hold the primary locales of the application. \r\n\r\nFor instance in our app we loop over `I18n.available_locales` to show a dropdown of languages for users to translate the app to (similar to what Airbnb does). \r\n\r\nI suggest we add a simple configuration option that instructs Ransack to load only its translations that match locales returned by `I18n.available_locales`. "}}