{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/6942","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/6942/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/6942/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/6942/events","html_url":"https://github.com/godotengine/godot/issues/6942","id":185604479,"number":6942,"title":"Invalid locale en-CA on MacOS Sierra (conversion needed to en_CA)","user":{"login":"hcorion","id":9814000,"avatar_url":"https://avatars.githubusercontent.com/u/9814000?v=3","gravatar_id":"","url":"https://api.github.com/users/hcorion","html_url":"https://github.com/hcorion","followers_url":"https://api.github.com/users/hcorion/followers","following_url":"https://api.github.com/users/hcorion/following{/other_user}","gists_url":"https://api.github.com/users/hcorion/gists{/gist_id}","starred_url":"https://api.github.com/users/hcorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hcorion/subscriptions","organizations_url":"https://api.github.com/users/hcorion/orgs","repos_url":"https://api.github.com/users/hcorion/repos","events_url":"https://api.github.com/users/hcorion/events{/privacy}","received_events_url":"https://api.github.com/users/hcorion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222"},{"url":"https://api.github.com/repos/godotengine/godot/labels/hacktoberfest","name":"hacktoberfest","color":"00eeee"},{"url":"https://api.github.com/repos/godotengine/godot/labels/platform:osx","name":"platform:osx","color":"dddddd"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/4","html_url":"https://github.com/godotengine/godot/milestones/3.0","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/4/labels","id":1449702,"number":4,"title":"3.0","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars.githubusercontent.com/u/4701338?v=3","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":190,"closed_issues":102,"state":"open","created_at":"2015-12-08T11:42:08Z","updated_at":"2016-10-27T08:39:46Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-10-27T08:29:30Z","updated_at":"2016-10-27T10:59:36Z","closed_at":null,"body":"**Operating system or device - Godot version:**\r\nOS: MacOS Sierra 10.12.1\r\nGodot version: latest git\r\n**Issue description** (what happened, and what was expected):\r\nWhen running godot engine I noticed I got the error: \r\n```\r\nERROR: set_locale: Invalid Locale: en-CA\r\n   At: core/translation.cpp:910.\r\n```\r\nen_CA is a valid locale though. MacOS Sierra (possibly older version I don't know) seems to use a different locale naming scheme that screws the detection up. I also noticed that in issue #6301's log it mentioned that `set_locale: Invalid Locale: en-US` further proving my point.\r\n**Steps to reproduce:**\r\nBuild godot engine on MacOS sierra, run it, observe log for Invalid Locale errors."},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/256610927","html_url":"https://github.com/godotengine/godot/issues/6942#issuecomment-256610927","issue_url":"https://api.github.com/repos/godotengine/godot/issues/6942","id":256610927,"user":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars.githubusercontent.com/u/4701338?v=3","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T10:59:36Z","updated_at":"2016-10-27T10:59:36Z","body":"Regarding the fix, I think the most straightforward way would be to just do:\r\n```\r\np_locale = p_locale.replace(\"-\", \"_\");\r\n```\r\nbefore using the `p_locale`."}}
{"actor":{"display_login":"akien-mga"}}