{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/comments/72615633","id":72615633,"diff_hunk":"@@ -227,6 +227,23 @@ I18N.prototype.getLocaleSlug = function() {\n \treturn this.state.localeSlug;\n };\n \n+\n+/**\n+ * Adds new translations to the locale data, overwriting any existing translations with a matching key\n+ **/\n+I18N.prototype.addTranslations = function( localeData ) {\n+\tfor ( var prop in localeData ) {","path":"lib/index.js","position":9,"original_position":9,"commit_id":"8f4b3602a3fc2436ba2a6f3d8c3a2d30cf479bb7","original_commit_id":"8f4b3602a3fc2436ba2a6f3d8c3a2d30cf479bb7","user":{"login":"akirk","id":203408,"avatar_url":"https://avatars.githubusercontent.com/u/203408?v=3","gravatar_id":"","url":"https://api.github.com/users/akirk","html_url":"https://github.com/akirk","followers_url":"https://api.github.com/users/akirk/followers","following_url":"https://api.github.com/users/akirk/following{/other_user}","gists_url":"https://api.github.com/users/akirk/gists{/gist_id}","starred_url":"https://api.github.com/users/akirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akirk/subscriptions","organizations_url":"https://api.github.com/users/akirk/orgs","repos_url":"https://api.github.com/users/akirk/repos","events_url":"https://api.github.com/users/akirk/events{/privacy}","received_events_url":"https://api.github.com/users/akirk/received_events","type":"User","site_admin":false},"body":"Can we use ES5 here? then we could do:\r\n```\r\ndelete localeData[''];\r\nObject.assign( this.state.jed.options.locale_data.messages, localeData );\r\n```","created_at":"2016-07-28T12:52:57Z","updated_at":"2016-07-28T12:52:57Z","html_url":"https://github.com/Automattic/i18n-calypso/pull/10#discussion_r72615633","pull_request_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/comments/72615633"},"html":{"href":"https://github.com/Automattic/i18n-calypso/pull/10#discussion_r72615633"},"pull_request":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10","id":79160155,"html_url":"https://github.com/Automattic/i18n-calypso/pull/10","diff_url":"https://github.com/Automattic/i18n-calypso/pull/10.diff","patch_url":"https://github.com/Automattic/i18n-calypso/pull/10.patch","issue_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/10","number":10,"state":"open","locked":false,"title":"Allow adding translations to an existing jed object","user":{"login":"yoavf","id":844866,"avatar_url":"https://avatars.githubusercontent.com/u/844866?v=3","gravatar_id":"","url":"https://api.github.com/users/yoavf","html_url":"https://github.com/yoavf","followers_url":"https://api.github.com/users/yoavf/followers","following_url":"https://api.github.com/users/yoavf/following{/other_user}","gists_url":"https://api.github.com/users/yoavf/gists{/gist_id}","starred_url":"https://api.github.com/users/yoavf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoavf/subscriptions","organizations_url":"https://api.github.com/users/yoavf/orgs","repos_url":"https://api.github.com/users/yoavf/repos","events_url":"https://api.github.com/users/yoavf/events{/privacy}","received_events_url":"https://api.github.com/users/yoavf/received_events","type":"User","site_admin":false},"body":"This introduces `addTranslations()` which takes a translations object and adds it do the existing one. Fixes #8 ","created_at":"2016-07-28T09:05:13Z","updated_at":"2016-07-28T12:52:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e72cb7a9ced03e262d976de80f5d2a073461415","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10/commits","review_comments_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10/comments","review_comment_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/10/comments","statuses_url":"https://api.github.com/repos/Automattic/i18n-calypso/statuses/8f4b3602a3fc2436ba2a6f3d8c3a2d30cf479bb7","head":{"label":"Automattic:add/addTranslations","ref":"add/addTranslations","sha":"8f4b3602a3fc2436ba2a6f3d8c3a2d30cf479bb7","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":58388996,"name":"i18n-calypso","full_name":"Automattic/i18n-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/i18n-calypso","description":"i18n JavaScript library on top of Jed originally used in Calypso","fork":false,"url":"https://api.github.com/repos/Automattic/i18n-calypso","forks_url":"https://api.github.com/repos/Automattic/i18n-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/i18n-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/i18n-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/i18n-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/i18n-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/i18n-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/i18n-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/i18n-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/i18n-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/i18n-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/i18n-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/i18n-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/i18n-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/i18n-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/i18n-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/i18n-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/i18n-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/i18n-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/i18n-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/i18n-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/i18n-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/i18n-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/i18n-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/i18n-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/i18n-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/i18n-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/i18n-calypso/deployments","created_at":"2016-05-09T15:49:33Z","updated_at":"2016-06-28T15:37:13Z","pushed_at":"2016-07-28T12:26:58Z","git_url":"git://github.com/Automattic/i18n-calypso.git","ssh_url":"git@github.com:Automattic/i18n-calypso.git","clone_url":"https://github.com/Automattic/i18n-calypso.git","svn_url":"https://github.com/Automattic/i18n-calypso","homepage":"","size":93,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":4,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"2fa9f6813d4826b5c0e9aa62ceb6c59e108b042c","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":58388996,"name":"i18n-calypso","full_name":"Automattic/i18n-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/i18n-calypso","description":"i18n JavaScript library on top of Jed originally used in Calypso","fork":false,"url":"https://api.github.com/repos/Automattic/i18n-calypso","forks_url":"https://api.github.com/repos/Automattic/i18n-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/i18n-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/i18n-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/i18n-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/i18n-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/i18n-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/i18n-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/i18n-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/i18n-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/i18n-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/i18n-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/i18n-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/i18n-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/i18n-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/i18n-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/i18n-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/i18n-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/i18n-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/i18n-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/i18n-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/i18n-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/i18n-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/i18n-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/i18n-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/i18n-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/i18n-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/i18n-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/i18n-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/i18n-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/i18n-calypso/deployments","created_at":"2016-05-09T15:49:33Z","updated_at":"2016-06-28T15:37:13Z","pushed_at":"2016-07-28T12:26:58Z","git_url":"git://github.com/Automattic/i18n-calypso.git","ssh_url":"git@github.com:Automattic/i18n-calypso.git","clone_url":"https://github.com/Automattic/i18n-calypso.git","svn_url":"https://github.com/Automattic/i18n-calypso","homepage":"","size":93,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10"},"html":{"href":"https://github.com/Automattic/i18n-calypso/pull/10"},"issue":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/issues/10"},"comments":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/i18n-calypso/statuses/8f4b3602a3fc2436ba2a6f3d8c3a2d30cf479bb7"}}}}
{"actor":{"display_login":"akirk"}}