{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/35510412","id":35510412,"diff_hunk":"@@ -112,6 +119,49 @@ YUI.add('ez-translateactionview', function (Y) {\n             }\n \n             return moreTranslations.join(', ');\n+        },\n+\n+        /**\n+         * Tap event handler on New Translation button. It opens language selection box.\n+         *\n+         * @method _newTranslationLanguageSelectionBox\n+         * @private\n+         * @param {EventFacade} e\n+         */\n+        _newTranslationLanguageSelectionBox: function (e) {\n+            e.preventDefault();\n+            this.fire('languageSelect', {\n+                config: {\n+                    title: \"Select a language for your new translation:\",\n+                    confirmHandler: Y.bind(this._newTranslation, this),\n+                    cancelHandler: null,\n+                    canBaseTranslation: true,\n+                    existingTranslations: this.get('content').get('currentVersion').getTranslationsList()\n+                },\n+            });\n+        },\n+\n+        /**\n+         * Fires `translate` event after making a selection on LanguageSelectionBox\n+         *\n+         * @method _newTranslation\n+         * @private\n+         * @param {EventFacade} e\n+         */\n+        _newTranslation: function (e) {\n+            var languageCode = e.target.get('selectedNewTranslation'),\n+                isBaseLanguage = e.target.get('baseTranslation'),\n+                data = {\n+                    content: this.get('content'),\n+                    languageCode: languageCode,","path":"Resources/public/js/views/actions/ez-translateactionview.js","position":68,"original_position":68,"commit_id":"ea1e23f98a5876d284f796a5d3f5511d7c964750","original_commit_id":"ea1e23f98a5876d284f796a5d3f5511d7c964750","user":{"login":"dpobel","id":305563,"avatar_url":"https://avatars.githubusercontent.com/u/305563?v=3","gravatar_id":"","url":"https://api.github.com/users/dpobel","html_url":"https://github.com/dpobel","followers_url":"https://api.github.com/users/dpobel/followers","following_url":"https://api.github.com/users/dpobel/following{/other_user}","gists_url":"https://api.github.com/users/dpobel/gists{/gist_id}","starred_url":"https://api.github.com/users/dpobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpobel/subscriptions","organizations_url":"https://api.github.com/users/dpobel/orgs","repos_url":"https://api.github.com/users/dpobel/repos","events_url":"https://api.github.com/users/dpobel/events{/privacy}","received_events_url":"https://api.github.com/users/dpobel/received_events","type":"User","site_admin":false},"body":"to improve the readability, I would call it to `toLanguageCode`","created_at":"2015-07-27T07:20:17Z","updated_at":"2015-07-27T07:20:17Z","html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/280#discussion_r35510412","pull_request_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/35510412"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/280#discussion_r35510412"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280","id":39926267,"html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/280","diff_url":"https://github.com/ezsystems/PlatformUIBundle/pull/280.diff","patch_url":"https://github.com/ezsystems/PlatformUIBundle/pull/280.patch","issue_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/280","number":280,"state":"open","locked":false,"title":"[WIP] EZP-23767: create new translation basing on existing one","user":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"body":"### Work In Progress\r\nJira: https://jira.ez.no/browse/EZP-23767\r\n\r\n# Description:\r\nThe goal of this issue is to add \"New Translation\" button under the list of existing content's translations (after clicking \"Translations\" action button). Clicking \"New Translation\" button should open a box which allow the user to choose the language for which he wants to create the translation. There should be also possibility to choose the existing content's translation on which user want to base his new translation.\r\n\r\n# Tasks:\r\n- [ ] Implementation\r\n- [ ] CSS\r\n- [ ] Tests\r\n- [ ] Rebase\r\n\r\n# PR notes:\r\nCurrently branch is based on another PR: https://github.com/ezsystems/PlatformUIBundle/pull/277 after merging it into master I will rebase this one on master.","created_at":"2015-07-14T15:11:31Z","updated_at":"2015-07-27T07:20:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfa471e8842f6744f6c35dfa0dc0875edd119fb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280/commits","review_comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280/comments","review_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/280/comments","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/ea1e23f98a5876d284f796a5d3f5511d7c964750","head":{"label":"mhyndle:ezp-23767_create_new_translation_basing_on_existing_one-BASED_ON_EZP-23766_BRANCH","ref":"ezp-23767_create_new_translation_basing_on_existing_one-BASED_ON_EZP-23766_BRANCH","sha":"ea1e23f98a5876d284f796a5d3f5511d7c964750","user":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"repo":{"id":35097865,"name":"PlatformUIBundle","full_name":"mhyndle/PlatformUIBundle","owner":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhyndle/PlatformUIBundle","description":"","fork":true,"url":"https://api.github.com/repos/mhyndle/PlatformUIBundle","forks_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/releases{/id}","created_at":"2015-05-05T12:29:16Z","updated_at":"2015-05-05T12:29:17Z","pushed_at":"2015-07-24T17:16:59Z","git_url":"git://github.com/mhyndle/PlatformUIBundle.git","ssh_url":"git@github.com:mhyndle/PlatformUIBundle.git","clone_url":"https://github.com/mhyndle/PlatformUIBundle.git","svn_url":"https://github.com/mhyndle/PlatformUIBundle","homepage":null,"size":3379,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"b2f71a3d6d132f6fdb66cf8e1a62a9480b270b4e","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":11221607,"name":"PlatformUIBundle","full_name":"ezsystems/PlatformUIBundle","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/PlatformUIBundle","description":"","fork":false,"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle","forks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/releases{/id}","created_at":"2013-07-06T17:21:40Z","updated_at":"2015-05-30T10:16:57Z","pushed_at":"2015-07-24T17:17:00Z","git_url":"git://github.com/ezsystems/PlatformUIBundle.git","ssh_url":"git@github.com:ezsystems/PlatformUIBundle.git","clone_url":"https://github.com/ezsystems/PlatformUIBundle.git","svn_url":"https://github.com/ezsystems/PlatformUIBundle","homepage":null,"size":7873,"stargazers_count":21,"watchers_count":21,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":16,"forks":18,"open_issues":16,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/280"},"issue":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/280"},"comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/280/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/280/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/ea1e23f98a5876d284f796a5d3f5511d7c964750"}}}}