{"action":"created","comment":{"url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments/221342469","pull_request_review_id":159973998,"id":221342469,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTM0MjQ2OQ==","diff_hunk":"@@ -61,9 +61,50 @@ function _adjustDefaultBwEstimate(estimate) {\n     return Defaults.bandwidthEstimate;\n }\n \n+function _copyToLocalization(allOptions) {\n+    const { advertising, related, sharing } = allOptions;\n+    const localization = Object.assign({}, Defaults.localization, allOptions.localization);\n+\n+    if (advertising) {\n+        localization.advertising = Object.assign({}, localization.advertising, {","path":"src/js/api/config.js","position":9,"original_position":9,"commit_id":"1e15d1d67636e4627ac4c90ed8d614fffb00d199","original_commit_id":"1e15d1d67636e4627ac4c90ed8d614fffb00d199","user":{"login":"karimJWP","id":12138319,"node_id":"MDQ6VXNlcjEyMTM4MzE5","avatar_url":"https://avatars1.githubusercontent.com/u/12138319?v=4","gravatar_id":"","url":"https://api.github.com/users/karimJWP","html_url":"https://github.com/karimJWP","followers_url":"https://api.github.com/users/karimJWP/followers","following_url":"https://api.github.com/users/karimJWP/following{/other_user}","gists_url":"https://api.github.com/users/karimJWP/gists{/gist_id}","starred_url":"https://api.github.com/users/karimJWP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimJWP/subscriptions","organizations_url":"https://api.github.com/users/karimJWP/orgs","repos_url":"https://api.github.com/users/karimJWP/repos","events_url":"https://api.github.com/users/karimJWP/events{/privacy}","received_events_url":"https://api.github.com/users/karimJWP/received_events","type":"User","site_admin":false},"body":"since these map to exactly the same fields we can just do \r\n`localization.advertising = Object.assign({}, localization.advertising, advertising);`","created_at":"2018-09-28T18:26:56Z","updated_at":"2018-09-28T18:50:24Z","html_url":"https://github.com/jwplayer/jwplayer/pull/3084#discussion_r221342469","pull_request_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments/221342469"},"html":{"href":"https://github.com/jwplayer/jwplayer/pull/3084#discussion_r221342469"},"pull_request":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084"}}},"pull_request":{"url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084","id":218825960,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4ODI1OTYw","html_url":"https://github.com/jwplayer/jwplayer/pull/3084","diff_url":"https://github.com/jwplayer/jwplayer/pull/3084.diff","patch_url":"https://github.com/jwplayer/jwplayer/pull/3084.patch","issue_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/3084","number":3084,"state":"open","locked":false,"title":"[WIP] Backwards support for localization options","user":{"login":"DanFerrer","id":6787010,"node_id":"MDQ6VXNlcjY3ODcwMTA=","avatar_url":"https://avatars1.githubusercontent.com/u/6787010?v=4","gravatar_id":"","url":"https://api.github.com/users/DanFerrer","html_url":"https://github.com/DanFerrer","followers_url":"https://api.github.com/users/DanFerrer/followers","following_url":"https://api.github.com/users/DanFerrer/following{/other_user}","gists_url":"https://api.github.com/users/DanFerrer/gists{/gist_id}","starred_url":"https://api.github.com/users/DanFerrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanFerrer/subscriptions","organizations_url":"https://api.github.com/users/DanFerrer/orgs","repos_url":"https://api.github.com/users/DanFerrer/repos","events_url":"https://api.github.com/users/DanFerrer/events{/privacy}","received_events_url":"https://api.github.com/users/DanFerrer/received_events","type":"User","site_admin":false},"body":"### This PR will...\r\n\r\n- Provide backwards support for options that were customizable outside of ```config.localization``` (```config.sharing```. ```config.advertising```, ```config.related```,  ```config.abouttext```)\r\n\r\n### Why is this Pull Request needed?\r\n\r\nWe want to use the ```localization``` block for customizable fields in those plugin blocks moving forward without messing with the functionality of customers who still customize it the old way.\r\n\r\n### Are there any points in the code the reviewer needs to double check?\r\n\r\nMaking the function DRYer\r\n\r\n### Are there any Pull Requests open in other repos which need to be merged with this?\r\n\r\nhttps://github.com/jwplayer/jwplayer/pull/3080 (Used as the base for this PR and should be merged first)\r\nhttps://github.com/jwplayer/jwplayer-commercial/pull/5771\r\n\r\n### Todo\r\n\r\n- [ ] Unit tests to make sure objects are copied (or not) properly\r\n- [ ] Make sure ads plugins properly reference ```localization.advertising```\r\n\r\n#### Addresses Issue(s):\r\n\r\nJW8-1349","created_at":"2018-09-28T00:49:05Z","updated_at":"2018-09-28T18:50:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a5e090ce90ed0634903dd0994d4ed56e305a585","assignee":null,"assignees":[],"requested_reviewers":[{"login":"robwalch","id":333258,"node_id":"MDQ6VXNlcjMzMzI1OA==","avatar_url":"https://avatars1.githubusercontent.com/u/333258?v=4","gravatar_id":"","url":"https://api.github.com/users/robwalch","html_url":"https://github.com/robwalch","followers_url":"https://api.github.com/users/robwalch/followers","following_url":"https://api.github.com/users/robwalch/following{/other_user}","gists_url":"https://api.github.com/users/robwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/robwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwalch/subscriptions","organizations_url":"https://api.github.com/users/robwalch/orgs","repos_url":"https://api.github.com/users/robwalch/repos","events_url":"https://api.github.com/users/robwalch/events{/privacy}","received_events_url":"https://api.github.com/users/robwalch/received_events","type":"User","site_admin":false},{"login":"egreaves","id":4603952,"node_id":"MDQ6VXNlcjQ2MDM5NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/4603952?v=4","gravatar_id":"","url":"https://api.github.com/users/egreaves","html_url":"https://github.com/egreaves","followers_url":"https://api.github.com/users/egreaves/followers","following_url":"https://api.github.com/users/egreaves/following{/other_user}","gists_url":"https://api.github.com/users/egreaves/gists{/gist_id}","starred_url":"https://api.github.com/users/egreaves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egreaves/subscriptions","organizations_url":"https://api.github.com/users/egreaves/orgs","repos_url":"https://api.github.com/users/egreaves/repos","events_url":"https://api.github.com/users/egreaves/events{/privacy}","received_events_url":"https://api.github.com/users/egreaves/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/jwplayer/jwplayer/milestones/101","html_url":"https://github.com/jwplayer/jwplayer/milestone/101","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/milestones/101/labels","id":3562667,"node_id":"MDk6TWlsZXN0b25lMzU2MjY2Nw==","number":101,"title":"v8.6.0","description":"","creator":{"login":"robwalch","id":333258,"node_id":"MDQ6VXNlcjMzMzI1OA==","avatar_url":"https://avatars1.githubusercontent.com/u/333258?v=4","gravatar_id":"","url":"https://api.github.com/users/robwalch","html_url":"https://github.com/robwalch","followers_url":"https://api.github.com/users/robwalch/followers","following_url":"https://api.github.com/users/robwalch/following{/other_user}","gists_url":"https://api.github.com/users/robwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/robwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwalch/subscriptions","organizations_url":"https://api.github.com/users/robwalch/orgs","repos_url":"https://api.github.com/users/robwalch/repos","events_url":"https://api.github.com/users/robwalch/events{/privacy}","received_events_url":"https://api.github.com/users/robwalch/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":22,"state":"open","created_at":"2018-08-11T18:49:57Z","updated_at":"2018-09-28T16:13:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084/commits","review_comments_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084/comments","review_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/3084/comments","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/1e15d1d67636e4627ac4c90ed8d614fffb00d199","head":{"label":"jwplayer:feature/localization-backwards-compatibility","ref":"feature/localization-backwards-compatibility","sha":"1e15d1d67636e4627ac4c90ed8d614fffb00d199","user":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":18307175,"node_id":"MDEwOlJlcG9zaXRvcnkxODMwNzE3NQ==","name":"jwplayer","full_name":"jwplayer/jwplayer","private":false,"owner":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/jwplayer/jwplayer","description":"JW Player is the world's most popular embeddable media player.","fork":false,"url":"https://api.github.com/repos/jwplayer/jwplayer","forks_url":"https://api.github.com/repos/jwplayer/jwplayer/forks","keys_url":"https://api.github.com/repos/jwplayer/jwplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/jwplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/jwplayer/teams","hooks_url":"https://api.github.com/repos/jwplayer/jwplayer/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/jwplayer/events","assignees_url":"https://api.github.com/repos/jwplayer/jwplayer/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/jwplayer/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/jwplayer/tags","blobs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/jwplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/jwplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/jwplayer/languages","stargazers_url":"https://api.github.com/repos/jwplayer/jwplayer/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/jwplayer/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/jwplayer/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/jwplayer/subscription","commits_url":"https://api.github.com/repos/jwplayer/jwplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/jwplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/jwplayer/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/jwplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/jwplayer/merges","archive_url":"https://api.github.com/repos/jwplayer/jwplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/jwplayer/downloads","issues_url":"https://api.github.com/repos/jwplayer/jwplayer/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/jwplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/jwplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/jwplayer/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/jwplayer/deployments","created_at":"2014-03-31T20:34:20Z","updated_at":"2018-09-28T16:13:06Z","pushed_at":"2018-09-28T18:05:29Z","git_url":"git://github.com/jwplayer/jwplayer.git","ssh_url":"git@github.com:jwplayer/jwplayer.git","clone_url":"https://github.com/jwplayer/jwplayer.git","svn_url":"https://github.com/jwplayer/jwplayer","homepage":"https://developer.jwplayer.com/","size":86603,"stargazers_count":1726,"watchers_count":1726,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":769,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":769,"open_issues":104,"watchers":1726,"default_branch":"master"}},"base":{"label":"jwplayer:feature/translate-localization","ref":"feature/translate-localization","sha":"911a158d05303a120ec38706bd9dfe3ca810bf46","user":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"repo":{"id":18307175,"node_id":"MDEwOlJlcG9zaXRvcnkxODMwNzE3NQ==","name":"jwplayer","full_name":"jwplayer/jwplayer","private":false,"owner":{"login":"jwplayer","id":5090060,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwOTAwNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/5090060?v=4","gravatar_id":"","url":"https://api.github.com/users/jwplayer","html_url":"https://github.com/jwplayer","followers_url":"https://api.github.com/users/jwplayer/followers","following_url":"https://api.github.com/users/jwplayer/following{/other_user}","gists_url":"https://api.github.com/users/jwplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/jwplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwplayer/subscriptions","organizations_url":"https://api.github.com/users/jwplayer/orgs","repos_url":"https://api.github.com/users/jwplayer/repos","events_url":"https://api.github.com/users/jwplayer/events{/privacy}","received_events_url":"https://api.github.com/users/jwplayer/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/jwplayer/jwplayer","description":"JW Player is the world's most popular embeddable media player.","fork":false,"url":"https://api.github.com/repos/jwplayer/jwplayer","forks_url":"https://api.github.com/repos/jwplayer/jwplayer/forks","keys_url":"https://api.github.com/repos/jwplayer/jwplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwplayer/jwplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwplayer/jwplayer/teams","hooks_url":"https://api.github.com/repos/jwplayer/jwplayer/hooks","issue_events_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/events{/number}","events_url":"https://api.github.com/repos/jwplayer/jwplayer/events","assignees_url":"https://api.github.com/repos/jwplayer/jwplayer/assignees{/user}","branches_url":"https://api.github.com/repos/jwplayer/jwplayer/branches{/branch}","tags_url":"https://api.github.com/repos/jwplayer/jwplayer/tags","blobs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwplayer/jwplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwplayer/jwplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwplayer/jwplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwplayer/jwplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/jwplayer/jwplayer/languages","stargazers_url":"https://api.github.com/repos/jwplayer/jwplayer/stargazers","contributors_url":"https://api.github.com/repos/jwplayer/jwplayer/contributors","subscribers_url":"https://api.github.com/repos/jwplayer/jwplayer/subscribers","subscription_url":"https://api.github.com/repos/jwplayer/jwplayer/subscription","commits_url":"https://api.github.com/repos/jwplayer/jwplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwplayer/jwplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwplayer/jwplayer/contents/{+path}","compare_url":"https://api.github.com/repos/jwplayer/jwplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwplayer/jwplayer/merges","archive_url":"https://api.github.com/repos/jwplayer/jwplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwplayer/jwplayer/downloads","issues_url":"https://api.github.com/repos/jwplayer/jwplayer/issues{/number}","pulls_url":"https://api.github.com/repos/jwplayer/jwplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/jwplayer/jwplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/jwplayer/jwplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/labels{/name}","releases_url":"https://api.github.com/repos/jwplayer/jwplayer/releases{/id}","deployments_url":"https://api.github.com/repos/jwplayer/jwplayer/deployments","created_at":"2014-03-31T20:34:20Z","updated_at":"2018-09-28T16:13:06Z","pushed_at":"2018-09-28T18:05:29Z","git_url":"git://github.com/jwplayer/jwplayer.git","ssh_url":"git@github.com:jwplayer/jwplayer.git","clone_url":"https://github.com/jwplayer/jwplayer.git","svn_url":"https://github.com/jwplayer/jwplayer","homepage":"https://developer.jwplayer.com/","size":86603,"stargazers_count":1726,"watchers_count":1726,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":769,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":769,"open_issues":104,"watchers":1726,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084"},"html":{"href":"https://github.com/jwplayer/jwplayer/pull/3084"},"issue":{"href":"https://api.github.com/repos/jwplayer/jwplayer/issues/3084"},"comments":{"href":"https://api.github.com/repos/jwplayer/jwplayer/issues/3084/comments"},"review_comments":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084/comments"},"review_comment":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwplayer/jwplayer/pulls/3084/commits"},"statuses":{"href":"https://api.github.com/repos/jwplayer/jwplayer/statuses/1e15d1d67636e4627ac4c90ed8d614fffb00d199"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"karimJWP"}}