{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/51038850","id":51038850,"diff_hunk":"@@ -0,0 +1,65 @@\n+var edx = edx || {},\n+    Language = (function($) {\n+        'use strict';\n+        var preference_api_url = $('#preference-api-url').val(),\n+            settings_language_selector = $('#settings-language-value'),\n+            self = null;\n+        return {\n+\n+            init: function() {\n+                self = this;\n+                this.listenForLanguagePreferenceChange();\n+            },\n+\n+            /**\n+             * Listener on changing language from selector.\n+             * Send an ajax request to save user language preferences.\n+             */\n+            listenForLanguagePreferenceChange: function() {\n+                settings_language_selector.change(function(event) {\n+                    event.preventDefault();\n+\n+                    // ajax request to save user language preferences.\n+                    self.sendAjaxRequest(preference_api_url, this.value, function () {","path":"common/static/js/lang-edx.js","position":23,"original_position":23,"commit_id":"5a16bc95262e3520254ce998b4141de19dbdaf57","original_commit_id":"ac64050a2cc9d4593d41ab35da3a389df315dc5e","user":{"login":"mattdrayer","id":4520595,"avatar_url":"https://avatars.githubusercontent.com/u/4520595?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdrayer","html_url":"https://github.com/mattdrayer","followers_url":"https://api.github.com/users/mattdrayer/followers","following_url":"https://api.github.com/users/mattdrayer/following{/other_user}","gists_url":"https://api.github.com/users/mattdrayer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdrayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdrayer/subscriptions","organizations_url":"https://api.github.com/users/mattdrayer/orgs","repos_url":"https://api.github.com/users/mattdrayer/repos","events_url":"https://api.github.com/users/mattdrayer/events{/privacy}","received_events_url":"https://api.github.com/users/mattdrayer/received_events","type":"User","site_admin":false},"body":"@asadiqbal08 let's be sure to implement a promise here vs. the callback as @andy-armstrong has recommended, unless doing so is not feasible.","created_at":"2016-01-27T19:45:02Z","updated_at":"2016-01-27T19:45:02Z","html_url":"https://github.com/edx/edx-platform/pull/11242#discussion_r51038850","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/11242","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/51038850"},"html":{"href":"https://github.com/edx/edx-platform/pull/11242#discussion_r51038850"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11242"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11242","id":56164244,"html_url":"https://github.com/edx/edx-platform/pull/11242","diff_url":"https://github.com/edx/edx-platform/pull/11242.diff","patch_url":"https://github.com/edx/edx-platform/pull/11242.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11242","number":11242,"state":"open","locked":false,"title":"WL-243 LMS Language Selection","user":{"login":"asadiqbal08","id":7334669,"avatar_url":"https://avatars.githubusercontent.com/u/7334669?v=3","gravatar_id":"","url":"https://api.github.com/users/asadiqbal08","html_url":"https://github.com/asadiqbal08","followers_url":"https://api.github.com/users/asadiqbal08/followers","following_url":"https://api.github.com/users/asadiqbal08/following{/other_user}","gists_url":"https://api.github.com/users/asadiqbal08/gists{/gist_id}","starred_url":"https://api.github.com/users/asadiqbal08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asadiqbal08/subscriptions","organizations_url":"https://api.github.com/users/asadiqbal08/orgs","repos_url":"https://api.github.com/users/asadiqbal08/repos","events_url":"https://api.github.com/users/asadiqbal08/events{/privacy}","received_events_url":"https://api.github.com/users/asadiqbal08/received_events","type":"User","site_admin":false},"body":"We will update the UI or anything else as per suggestion(s). \r\n\r\n<img width=\"1269\" alt=\"screen shot 2016-01-15 at 5 57 57 pm\" src=\"https://cloud.githubusercontent.com/assets/7334669/12353515/9f2a76fc-bbb1-11e5-9371-f346cd4ef7a7.png\">","created_at":"2016-01-15T12:36:03Z","updated_at":"2016-01-27T19:45:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75449bf24444a18fa0e298b6db311b4c0606b495","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/11242/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/11242/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11242/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/5a16bc95262e3520254ce998b4141de19dbdaf57","head":{"label":"edx:asadiqbal08/WL-243-manual-lang","ref":"asadiqbal08/WL-243-manual-lang","sha":"5a16bc95262e3520254ce998b4141de19dbdaf57","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-01-27T12:59:44Z","pushed_at":"2016-01-27T19:44:56Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":679403,"stargazers_count":2361,"watchers_count":2361,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1435,"mirror_url":null,"open_issues_count":156,"forks":1435,"open_issues":156,"watchers":2361,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"8c26178df36b6beca1036e47047ef56b96c172bd","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-01-27T12:59:44Z","pushed_at":"2016-01-27T19:44:56Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":679403,"stargazers_count":2361,"watchers_count":2361,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1435,"mirror_url":null,"open_issues_count":156,"forks":1435,"open_issues":156,"watchers":2361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11242"},"html":{"href":"https://github.com/edx/edx-platform/pull/11242"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11242"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11242/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11242/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11242/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/5a16bc95262e3520254ce998b4141de19dbdaf57"}}}}