{"action":"created","comment":{"url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/comments/35267309","id":35267309,"diff_hunk":"@@ -262,7 +262,7 @@ angular.module('ngLocalize')\n             return currentLocale;\n         }\n \n-        setLocale(cookieStore ? cookieStore.get(localeConf.cookieName) : $window.navigator.userLanguage || $window.navigator.language);\n+        setLocale(cookieStore.get(localeConf.cookieName) ? cookieStore.get(localeConf.cookieName) : $window.navigator.userLanguage || $window.navigator.language);","path":"src/localization.js","position":5,"original_position":5,"commit_id":"de63650b8639237d9a4e8e4c4f65739d6241282e","original_commit_id":"de63650b8639237d9a4e8e4c4f65739d6241282e","user":{"login":"doshprompt","id":1147078,"avatar_url":"https://avatars.githubusercontent.com/u/1147078?v=3","gravatar_id":"","url":"https://api.github.com/users/doshprompt","html_url":"https://github.com/doshprompt","followers_url":"https://api.github.com/users/doshprompt/followers","following_url":"https://api.github.com/users/doshprompt/following{/other_user}","gists_url":"https://api.github.com/users/doshprompt/gists{/gist_id}","starred_url":"https://api.github.com/users/doshprompt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doshprompt/subscriptions","organizations_url":"https://api.github.com/users/doshprompt/orgs","repos_url":"https://api.github.com/users/doshprompt/repos","events_url":"https://api.github.com/users/doshprompt/events{/privacy}","received_events_url":"https://api.github.com/users/doshprompt/received_events","type":"User","site_admin":false},"body":"```js\r\nsetLocale(cookieStore && cookieStore.get(localeConf.cookieName) ? /* ... */);\r\n```","created_at":"2015-07-22T21:37:03Z","updated_at":"2015-07-22T21:37:03Z","html_url":"https://github.com/doshprompt/angular-localization/pull/53#discussion_r35267309","pull_request_url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/comments/35267309"},"html":{"href":"https://github.com/doshprompt/angular-localization/pull/53#discussion_r35267309"},"pull_request":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53","id":40614236,"html_url":"https://github.com/doshprompt/angular-localization/pull/53","diff_url":"https://github.com/doshprompt/angular-localization/pull/53.diff","patch_url":"https://github.com/doshprompt/angular-localization/pull/53.patch","issue_url":"https://api.github.com/repos/doshprompt/angular-localization/issues/53","number":53,"state":"open","locked":false,"title":"Use window.navigator.language if no language cookie is set.","user":{"login":"bretmorris","id":765000,"avatar_url":"https://avatars.githubusercontent.com/u/765000?v=3","gravatar_id":"","url":"https://api.github.com/users/bretmorris","html_url":"https://github.com/bretmorris","followers_url":"https://api.github.com/users/bretmorris/followers","following_url":"https://api.github.com/users/bretmorris/following{/other_user}","gists_url":"https://api.github.com/users/bretmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bretmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bretmorris/subscriptions","organizations_url":"https://api.github.com/users/bretmorris/orgs","repos_url":"https://api.github.com/users/bretmorris/repos","events_url":"https://api.github.com/users/bretmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bretmorris/received_events","type":"User","site_admin":false},"body":"`cookieStore` always evaluates to `true` if `persistSelection` is `true` and `$injector.has('$cookieStore')`. This means that ngLocalize will not use a user's default language. Instead, it will just default to the `defaultLocale`. In my opinion, this is not the desired behavior.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/doshprompt/angular-localization/53)\n<!-- Reviewable:end -->\n","created_at":"2015-07-22T21:32:21Z","updated_at":"2015-07-22T21:37:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9883b6fd6e40be92ada056340388bf881bf20699","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53/commits","review_comments_url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53/comments","review_comment_url":"https://api.github.com/repos/doshprompt/angular-localization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doshprompt/angular-localization/issues/53/comments","statuses_url":"https://api.github.com/repos/doshprompt/angular-localization/statuses/de63650b8639237d9a4e8e4c4f65739d6241282e","head":{"label":"bretmorris:patch-1","ref":"patch-1","sha":"de63650b8639237d9a4e8e4c4f65739d6241282e","user":{"login":"bretmorris","id":765000,"avatar_url":"https://avatars.githubusercontent.com/u/765000?v=3","gravatar_id":"","url":"https://api.github.com/users/bretmorris","html_url":"https://github.com/bretmorris","followers_url":"https://api.github.com/users/bretmorris/followers","following_url":"https://api.github.com/users/bretmorris/following{/other_user}","gists_url":"https://api.github.com/users/bretmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bretmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bretmorris/subscriptions","organizations_url":"https://api.github.com/users/bretmorris/orgs","repos_url":"https://api.github.com/users/bretmorris/repos","events_url":"https://api.github.com/users/bretmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bretmorris/received_events","type":"User","site_admin":false},"repo":{"id":39531214,"name":"angular-localization","full_name":"bretmorris/angular-localization","owner":{"login":"bretmorris","id":765000,"avatar_url":"https://avatars.githubusercontent.com/u/765000?v=3","gravatar_id":"","url":"https://api.github.com/users/bretmorris","html_url":"https://github.com/bretmorris","followers_url":"https://api.github.com/users/bretmorris/followers","following_url":"https://api.github.com/users/bretmorris/following{/other_user}","gists_url":"https://api.github.com/users/bretmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bretmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bretmorris/subscriptions","organizations_url":"https://api.github.com/users/bretmorris/orgs","repos_url":"https://api.github.com/users/bretmorris/repos","events_url":"https://api.github.com/users/bretmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bretmorris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bretmorris/angular-localization","description":"angularjs localization done right.","fork":true,"url":"https://api.github.com/repos/bretmorris/angular-localization","forks_url":"https://api.github.com/repos/bretmorris/angular-localization/forks","keys_url":"https://api.github.com/repos/bretmorris/angular-localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bretmorris/angular-localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bretmorris/angular-localization/teams","hooks_url":"https://api.github.com/repos/bretmorris/angular-localization/hooks","issue_events_url":"https://api.github.com/repos/bretmorris/angular-localization/issues/events{/number}","events_url":"https://api.github.com/repos/bretmorris/angular-localization/events","assignees_url":"https://api.github.com/repos/bretmorris/angular-localization/assignees{/user}","branches_url":"https://api.github.com/repos/bretmorris/angular-localization/branches{/branch}","tags_url":"https://api.github.com/repos/bretmorris/angular-localization/tags","blobs_url":"https://api.github.com/repos/bretmorris/angular-localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bretmorris/angular-localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bretmorris/angular-localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/bretmorris/angular-localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bretmorris/angular-localization/statuses/{sha}","languages_url":"https://api.github.com/repos/bretmorris/angular-localization/languages","stargazers_url":"https://api.github.com/repos/bretmorris/angular-localization/stargazers","contributors_url":"https://api.github.com/repos/bretmorris/angular-localization/contributors","subscribers_url":"https://api.github.com/repos/bretmorris/angular-localization/subscribers","subscription_url":"https://api.github.com/repos/bretmorris/angular-localization/subscription","commits_url":"https://api.github.com/repos/bretmorris/angular-localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/bretmorris/angular-localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/bretmorris/angular-localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/bretmorris/angular-localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/bretmorris/angular-localization/contents/{+path}","compare_url":"https://api.github.com/repos/bretmorris/angular-localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bretmorris/angular-localization/merges","archive_url":"https://api.github.com/repos/bretmorris/angular-localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bretmorris/angular-localization/downloads","issues_url":"https://api.github.com/repos/bretmorris/angular-localization/issues{/number}","pulls_url":"https://api.github.com/repos/bretmorris/angular-localization/pulls{/number}","milestones_url":"https://api.github.com/repos/bretmorris/angular-localization/milestones{/number}","notifications_url":"https://api.github.com/repos/bretmorris/angular-localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bretmorris/angular-localization/labels{/name}","releases_url":"https://api.github.com/repos/bretmorris/angular-localization/releases{/id}","created_at":"2015-07-22T21:28:08Z","updated_at":"2015-07-22T21:28:09Z","pushed_at":"2015-07-22T21:32:04Z","git_url":"git://github.com/bretmorris/angular-localization.git","ssh_url":"git@github.com:bretmorris/angular-localization.git","clone_url":"https://github.com/bretmorris/angular-localization.git","svn_url":"https://github.com/bretmorris/angular-localization","homepage":"http://doshprompt.github.io/angular-localization","size":1760,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"doshprompt:master","ref":"master","sha":"14fb6636430c9bf95a861d2ffc91d75505adc2d0","user":{"login":"doshprompt","id":1147078,"avatar_url":"https://avatars.githubusercontent.com/u/1147078?v=3","gravatar_id":"","url":"https://api.github.com/users/doshprompt","html_url":"https://github.com/doshprompt","followers_url":"https://api.github.com/users/doshprompt/followers","following_url":"https://api.github.com/users/doshprompt/following{/other_user}","gists_url":"https://api.github.com/users/doshprompt/gists{/gist_id}","starred_url":"https://api.github.com/users/doshprompt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doshprompt/subscriptions","organizations_url":"https://api.github.com/users/doshprompt/orgs","repos_url":"https://api.github.com/users/doshprompt/repos","events_url":"https://api.github.com/users/doshprompt/events{/privacy}","received_events_url":"https://api.github.com/users/doshprompt/received_events","type":"User","site_admin":false},"repo":{"id":20308557,"name":"angular-localization","full_name":"doshprompt/angular-localization","owner":{"login":"doshprompt","id":1147078,"avatar_url":"https://avatars.githubusercontent.com/u/1147078?v=3","gravatar_id":"","url":"https://api.github.com/users/doshprompt","html_url":"https://github.com/doshprompt","followers_url":"https://api.github.com/users/doshprompt/followers","following_url":"https://api.github.com/users/doshprompt/following{/other_user}","gists_url":"https://api.github.com/users/doshprompt/gists{/gist_id}","starred_url":"https://api.github.com/users/doshprompt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doshprompt/subscriptions","organizations_url":"https://api.github.com/users/doshprompt/orgs","repos_url":"https://api.github.com/users/doshprompt/repos","events_url":"https://api.github.com/users/doshprompt/events{/privacy}","received_events_url":"https://api.github.com/users/doshprompt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/doshprompt/angular-localization","description":"angularjs localization done right.","fork":false,"url":"https://api.github.com/repos/doshprompt/angular-localization","forks_url":"https://api.github.com/repos/doshprompt/angular-localization/forks","keys_url":"https://api.github.com/repos/doshprompt/angular-localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doshprompt/angular-localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doshprompt/angular-localization/teams","hooks_url":"https://api.github.com/repos/doshprompt/angular-localization/hooks","issue_events_url":"https://api.github.com/repos/doshprompt/angular-localization/issues/events{/number}","events_url":"https://api.github.com/repos/doshprompt/angular-localization/events","assignees_url":"https://api.github.com/repos/doshprompt/angular-localization/assignees{/user}","branches_url":"https://api.github.com/repos/doshprompt/angular-localization/branches{/branch}","tags_url":"https://api.github.com/repos/doshprompt/angular-localization/tags","blobs_url":"https://api.github.com/repos/doshprompt/angular-localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doshprompt/angular-localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doshprompt/angular-localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/doshprompt/angular-localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doshprompt/angular-localization/statuses/{sha}","languages_url":"https://api.github.com/repos/doshprompt/angular-localization/languages","stargazers_url":"https://api.github.com/repos/doshprompt/angular-localization/stargazers","contributors_url":"https://api.github.com/repos/doshprompt/angular-localization/contributors","subscribers_url":"https://api.github.com/repos/doshprompt/angular-localization/subscribers","subscription_url":"https://api.github.com/repos/doshprompt/angular-localization/subscription","commits_url":"https://api.github.com/repos/doshprompt/angular-localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/doshprompt/angular-localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/doshprompt/angular-localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/doshprompt/angular-localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/doshprompt/angular-localization/contents/{+path}","compare_url":"https://api.github.com/repos/doshprompt/angular-localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doshprompt/angular-localization/merges","archive_url":"https://api.github.com/repos/doshprompt/angular-localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doshprompt/angular-localization/downloads","issues_url":"https://api.github.com/repos/doshprompt/angular-localization/issues{/number}","pulls_url":"https://api.github.com/repos/doshprompt/angular-localization/pulls{/number}","milestones_url":"https://api.github.com/repos/doshprompt/angular-localization/milestones{/number}","notifications_url":"https://api.github.com/repos/doshprompt/angular-localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doshprompt/angular-localization/labels{/name}","releases_url":"https://api.github.com/repos/doshprompt/angular-localization/releases{/id}","created_at":"2014-05-29T21:08:45Z","updated_at":"2015-07-22T08:18:57Z","pushed_at":"2015-07-22T21:32:26Z","git_url":"git://github.com/doshprompt/angular-localization.git","ssh_url":"git@github.com:doshprompt/angular-localization.git","clone_url":"https://github.com/doshprompt/angular-localization.git","svn_url":"https://github.com/doshprompt/angular-localization","homepage":"http://doshprompt.github.io/angular-localization","size":1760,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":30,"mirror_url":null,"open_issues_count":30,"forks":30,"open_issues":30,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53"},"html":{"href":"https://github.com/doshprompt/angular-localization/pull/53"},"issue":{"href":"https://api.github.com/repos/doshprompt/angular-localization/issues/53"},"comments":{"href":"https://api.github.com/repos/doshprompt/angular-localization/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doshprompt/angular-localization/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/doshprompt/angular-localization/statuses/de63650b8639237d9a4e8e4c4f65739d6241282e"}}}}