{"action":"closed","issue":{"url":"https://api.github.com/repos/rails/rails/issues/21939","labels_url":"https://api.github.com/repos/rails/rails/issues/21939/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/21939/comments","events_url":"https://api.github.com/repos/rails/rails/issues/21939/events","html_url":"https://github.com/rails/rails/issues/21939","id":111023255,"number":21939,"title":"config.i18n.default_locale is not respected after using .parameterize in a gem","user":{"login":"alexhanh","id":386490,"avatar_url":"https://avatars.githubusercontent.com/u/386490?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhanh","html_url":"https://github.com/alexhanh","followers_url":"https://api.github.com/users/alexhanh/followers","following_url":"https://api.github.com/users/alexhanh/following{/other_user}","gists_url":"https://api.github.com/users/alexhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhanh/subscriptions","organizations_url":"https://api.github.com/users/alexhanh/orgs","repos_url":"https://api.github.com/users/alexhanh/repos","events_url":"https://api.github.com/users/alexhanh/events{/privacy}","received_events_url":"https://api.github.com/users/alexhanh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/railties","name":"railties","color":"8BE06E"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T17:50:11Z","updated_at":"2015-10-20T12:03:16Z","closed_at":"2015-10-20T12:03:16Z","body":"We have a gem that simply does the following\r\n```\r\nmodule Foo\r\n  BAR = 'öäå'.parameterize\r\nend\r\n```\r\n\r\nwe then have a Rails 4.2.4 project that uses that gem. In that project, we have `config.i18n.default_locale = :fi`. Without the gem, we get the following output\r\n\r\n```\r\nLoading development environment (Rails 4.2.4)\r\n2.2.1 :001 > I18n.locale\r\n => :fi\r\n```\r\nwith the gem\r\n```\r\nLoading development environment (Rails 4.2.4)\r\n2.2.1 :001 > I18n.locale\r\n => :en\r\n```\r\n\r\n`parameterize` uses `transliterate`, which again uses the `I18n.transliterate`. For some reason, calling parameterize before setting the default_locale will prevent the default_locale to be set afterwards.\r\n\r\nIs this a bug or intended behaviour? If the latter, how are we supposed to use parameterize without affecting default_locale later on?"}}