{"action":"created","issue":{"url":"https://api.github.com/repos/svenfuchs/i18n/issues/327","labels_url":"https://api.github.com/repos/svenfuchs/i18n/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/svenfuchs/i18n/issues/327/comments","events_url":"https://api.github.com/repos/svenfuchs/i18n/issues/327/events","html_url":"https://github.com/svenfuchs/i18n/issues/327","id":110621991,"number":327,"title":"I18n converts underscores into hyphens","user":{"login":"krukgit","id":1926883,"avatar_url":"https://avatars.githubusercontent.com/u/1926883?v=3","gravatar_id":"","url":"https://api.github.com/users/krukgit","html_url":"https://github.com/krukgit","followers_url":"https://api.github.com/users/krukgit/followers","following_url":"https://api.github.com/users/krukgit/following{/other_user}","gists_url":"https://api.github.com/users/krukgit/gists{/gist_id}","starred_url":"https://api.github.com/users/krukgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krukgit/subscriptions","organizations_url":"https://api.github.com/users/krukgit/orgs","repos_url":"https://api.github.com/users/krukgit/repos","events_url":"https://api.github.com/users/krukgit/events{/privacy}","received_events_url":"https://api.github.com/users/krukgit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-09T09:34:18Z","updated_at":"2015-10-09T09:50:50Z","closed_at":null,"body":"I'm migrating a legacy app to rails. It uses locale names in the form of `zh_HK` which get converted to form `zh-HK` by i18n:\r\n\r\n```\r\n2.1.5 :010 > I18n.available_locales\r\n => [\"en\", \"th\", \"zh_CN\", \"zh_HK\"] \r\n2.1.5 :011 > I18n.locale = :en\r\n => :en \r\n2.1.5 :012 > I18n.locale\r\n => :en \r\n2.1.5 :013 > I18n.locale = :zh_HK\r\n => :zh_HK \r\n2.1.5 :014 > I18n.locale \r\n => :\"zh-HK\" \r\n```\r\n\r\nThis results in `I18n::InvalidLocale: :\"zh-HK\" is not a valid locale ` exception\r\nIs there a way to make i18n play nicely with underscores?"},"comment":{"url":"https://api.github.com/repos/svenfuchs/i18n/issues/comments/146816913","html_url":"https://github.com/svenfuchs/i18n/issues/327#issuecomment-146816913","issue_url":"https://api.github.com/repos/svenfuchs/i18n/issues/327","id":146816913,"user":{"login":"krukgit","id":1926883,"avatar_url":"https://avatars.githubusercontent.com/u/1926883?v=3","gravatar_id":"","url":"https://api.github.com/users/krukgit","html_url":"https://github.com/krukgit","followers_url":"https://api.github.com/users/krukgit/followers","following_url":"https://api.github.com/users/krukgit/following{/other_user}","gists_url":"https://api.github.com/users/krukgit/gists{/gist_id}","starred_url":"https://api.github.com/users/krukgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krukgit/subscriptions","organizations_url":"https://api.github.com/users/krukgit/orgs","repos_url":"https://api.github.com/users/krukgit/repos","events_url":"https://api.github.com/users/krukgit/events{/privacy}","received_events_url":"https://api.github.com/users/krukgit/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T09:50:50Z","updated_at":"2015-10-09T09:50:50Z","body":"I apologize, I managed to find the culprit in grosser/gettext_i18n_rails\r\nhttps://github.com/grosser/gettext_i18n_rails/blob/master/lib/gettext_i18n_rails/i18n_hacks.rb"}}