{"action":"opened","issue":{"url":"https://api.github.com/repos/lingui/js-lingui/issues/207","repository_url":"https://api.github.com/repos/lingui/js-lingui","labels_url":"https://api.github.com/repos/lingui/js-lingui/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/lingui/js-lingui/issues/207/comments","events_url":"https://api.github.com/repos/lingui/js-lingui/issues/207/events","html_url":"https://github.com/lingui/js-lingui/issues/207","id":315091227,"number":207,"title":"CLI: add-locale doesn't support hyphens","user":{"login":"adamgruber","id":2378900,"avatar_url":"https://avatars2.githubusercontent.com/u/2378900?v=4","gravatar_id":"","url":"https://api.github.com/users/adamgruber","html_url":"https://github.com/adamgruber","followers_url":"https://api.github.com/users/adamgruber/followers","following_url":"https://api.github.com/users/adamgruber/following{/other_user}","gists_url":"https://api.github.com/users/adamgruber/gists{/gist_id}","starred_url":"https://api.github.com/users/adamgruber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamgruber/subscriptions","organizations_url":"https://api.github.com/users/adamgruber/orgs","repos_url":"https://api.github.com/users/adamgruber/repos","events_url":"https://api.github.com/users/adamgruber/events{/privacy}","received_events_url":"https://api.github.com/users/adamgruber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-17T14:38:21Z","updated_at":"2018-04-17T14:38:21Z","closed_at":null,"author_association":"NONE","body":"I want to use `en-US` as my locale but the cli says it is unknown. Looking at the code, it seems like it would be a minor change to add support.\r\n\r\nThis RegExp\r\n```js\r\n// packages/cli/src/api/formats/utils/locales.js\r\nexport const localeRe = new RegExp(/(([a-z]+)(_([a-zA-Z]+))?)(\\\\|\\/)?/)\r\n```\r\ncould be changed to\r\n```js\r\nexport const localeRe = new RegExp(/(([a-z]+)([_-]([a-zA-Z]+))?)(\\\\|\\/)?/)\r\n```\r\n\r\nI can open a PR for the change but wasn't sure if there was a specific reason not to support hyphens?\r\n"}}
{"actor":{"display_login":"adamgruber"}}