{"action":"created","issue":{"url":"https://api.github.com/repos/cainlevy/snail/issues/30","repository_url":"https://api.github.com/repos/cainlevy/snail","labels_url":"https://api.github.com/repos/cainlevy/snail/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/cainlevy/snail/issues/30/comments","events_url":"https://api.github.com/repos/cainlevy/snail/issues/30/events","html_url":"https://github.com/cainlevy/snail/pull/30","id":161276594,"number":30,"title":"falls back to english if country not translated","user":{"login":"dbaq","id":1867703,"avatar_url":"https://avatars.githubusercontent.com/u/1867703?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaq","html_url":"https://github.com/dbaq","followers_url":"https://api.github.com/users/dbaq/followers","following_url":"https://api.github.com/users/dbaq/following{/other_user}","gists_url":"https://api.github.com/users/dbaq/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaq/subscriptions","organizations_url":"https://api.github.com/users/dbaq/orgs","repos_url":"https://api.github.com/users/dbaq/repos","events_url":"https://api.github.com/users/dbaq/events{/privacy}","received_events_url":"https://api.github.com/users/dbaq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-20T19:39:01Z","updated_at":"2016-11-18T05:57:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cainlevy/snail/pulls/30","html_url":"https://github.com/cainlevy/snail/pull/30","diff_url":"https://github.com/cainlevy/snail/pull/30.diff","patch_url":"https://github.com/cainlevy/snail/pull/30.patch"},"body":"hi @cainlevy,\r\n\r\nIn some rare cases, the translation might not be present (thinking about AF for instance). The fallback code to english was broken due to the `match` function. Also, if a country is not a valid\r\niso code, we should display the raw value.\r\n"},"comment":{"url":"https://api.github.com/repos/cainlevy/snail/issues/comments/261455193","html_url":"https://github.com/cainlevy/snail/pull/30#issuecomment-261455193","issue_url":"https://api.github.com/repos/cainlevy/snail/issues/30","id":261455193,"user":{"login":"dbaq","id":1867703,"avatar_url":"https://avatars.githubusercontent.com/u/1867703?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaq","html_url":"https://github.com/dbaq","followers_url":"https://api.github.com/users/dbaq/followers","following_url":"https://api.github.com/users/dbaq/following{/other_user}","gists_url":"https://api.github.com/users/dbaq/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaq/subscriptions","organizations_url":"https://api.github.com/users/dbaq/orgs","repos_url":"https://api.github.com/users/dbaq/repos","events_url":"https://api.github.com/users/dbaq/events{/privacy}","received_events_url":"https://api.github.com/users/dbaq/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T05:57:30Z","updated_at":"2016-11-18T05:57:30Z","body":"hey @cainlevy, just went through my open PR and found this one. \r\n\r\nIt's been a while but we have this PR in production since then. The bug fix for `translated_country` is useful. \r\n\r\n>If Snail is provided an unknown country code, can it do its job? It won't be able to translate or provide correct formatting.\r\n\r\nIt is correct, it is a pure design choice. Do you prefer throw an error or a graceful degradation? On my side, I always go try to go for graceful degradations.\r\n\r\nOn our side, why did/do we need it? I migrated 1M addresses from an open country input to a dropdown country list with the iso code as a key. I was able to map 65% of values to an iso code but  at the time we still had to support other values. I understand your point of view but I think such a use case could be common and allow to fallback to default formatting and english is decent enough.\r\n\r\nLet me know your thoughts."}}
{"actor":{"display_login":"dbaq"}}