{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/77125917","id":77125917,"diff_hunk":"@@ -1364,4 +1364,25 @@ protected function preShow(Request $request, $object)\n     protected function preList(Request $request)\n     {\n     }\n+\n+    /**\n+     * translate a message id.\n+     *\n+     * @param string $id\n+     * @param array  $parameters\n+     * @param null   $domain\n+     * @param null   $locale\n+     *\n+     * @return string the translated string\n+     */\n+    final protected function trans($id, array $parameters = array(), $domain = null, $locale = null)\n+    {\n+        $domain = $domain ?: $this->admin->getTranslationDomain();\n+\n+        if (!$this->has('translator')) {\n+            return $id;\n+        }\n+\n+        return $this->get('translator')->trans($id, $parameters, $domain, $locale);\n+    }","path":"Controller/CRUDController.php","position":87,"original_position":87,"commit_id":"17030f4e1deca23dc1ec682ed5d792a9da2eace2","original_commit_id":"4d52408a171ad767b42781ba96e92c00be6887eb","user":{"login":"OskarStark","id":995707,"avatar_url":"https://avatars.githubusercontent.com/u/995707?v=3","gravatar_id":"","url":"https://api.github.com/users/OskarStark","html_url":"https://github.com/OskarStark","followers_url":"https://api.github.com/users/OskarStark/followers","following_url":"https://api.github.com/users/OskarStark/following{/other_user}","gists_url":"https://api.github.com/users/OskarStark/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarStark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarStark/subscriptions","organizations_url":"https://api.github.com/users/OskarStark/orgs","repos_url":"https://api.github.com/users/OskarStark/repos","events_url":"https://api.github.com/users/OskarStark/events{/privacy}","received_events_url":"https://api.github.com/users/OskarStark/received_events","type":"User","site_admin":false},"body":"i don't know :)","created_at":"2016-09-01T07:29:05Z","updated_at":"2016-09-01T07:29:05Z","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4089#discussion_r77125917","pull_request_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/77125917"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/4089#discussion_r77125917"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089","id":82098703,"html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4089","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4089.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4089.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4089","number":4089,"state":"open","locked":false,"title":"Deprecate translation in Admin class","user":{"login":"core23","id":3440437,"avatar_url":"https://avatars.githubusercontent.com/u/3440437?v=3","gravatar_id":"","url":"https://api.github.com/users/core23","html_url":"https://github.com/core23","followers_url":"https://api.github.com/users/core23/followers","following_url":"https://api.github.com/users/core23/following{/other_user}","gists_url":"https://api.github.com/users/core23/gists{/gist_id}","starred_url":"https://api.github.com/users/core23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/core23/subscriptions","organizations_url":"https://api.github.com/users/core23/orgs","repos_url":"https://api.github.com/users/core23/repos","events_url":"https://api.github.com/users/core23/events{/privacy}","received_events_url":"https://api.github.com/users/core23/received_events","type":"User","site_admin":false},"body":"<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT! -->\r\n\r\n<!--\r\n    Show us you choose the right branch.\r\n    Different branches are used for different things :\r\n    - 3.x is for everything backwards compatible, like patches, features and deprecation notices\r\n    - master is for deprecation removals and other changes that cannot be done without a BC-break\r\n    More details here: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/CONTRIBUTING.md#the-base-branch\r\n-->\r\nI am targetting this branch, because this is BC.\r\n\r\n<!--\r\n    Specify which issues will be fixed/closed.\r\n    Remove it if this is not related.\r\n-->\r\n\r\nCloses #4072\r\n\r\n## Changelog\r\n\r\n<!-- MANDATORY\r\n    Fill the changelog part inside the code block.\r\n    Follow this schema: http://keepachangelog.com/\r\n-->\r\n\r\n<!-- REMOVE EMPTY SECTIONS -->\r\n```markdown\r\n### Added\r\n- Added `CRUDController::trans` method\r\n\r\n### Changed\r\n- translation in twig templates uses the twig translation filter\r\n\r\n### Deprecated\r\n- deprecated `AdminInterface::trans` method\r\n- deprecated `AbstractAdmin::$translator` property\r\n- deprecated `AbstractAdmin::trans` method\r\n- deprecated `AbstractAdmin::transChoice` method\r\n- deprecated `AbstractAdmin::getTranslator` method\r\n- deprecated `AbstractAdmin::setTranslator` method\r\n```\r\n\r\n\r\n## Subject\r\n\r\nThis change deprecates the translator in the `AbstractAdmin` and moves all translation logic to the templates and the CRUDController.\r\n\r\n","created_at":"2016-08-21T06:59:00Z","updated_at":"2016-09-01T07:29:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe60d54f670cf497401e5fadc8ec3bc2b0cc7792","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4089/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/17030f4e1deca23dc1ec682ed5d792a9da2eace2","head":{"label":"core23:patch/deprecate-trans","ref":"patch/deprecate-trans","sha":"17030f4e1deca23dc1ec682ed5d792a9da2eace2","user":{"login":"core23","id":3440437,"avatar_url":"https://avatars.githubusercontent.com/u/3440437?v=3","gravatar_id":"","url":"https://api.github.com/users/core23","html_url":"https://github.com/core23","followers_url":"https://api.github.com/users/core23/followers","following_url":"https://api.github.com/users/core23/following{/other_user}","gists_url":"https://api.github.com/users/core23/gists{/gist_id}","starred_url":"https://api.github.com/users/core23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/core23/subscriptions","organizations_url":"https://api.github.com/users/core23/orgs","repos_url":"https://api.github.com/users/core23/repos","events_url":"https://api.github.com/users/core23/events{/privacy}","received_events_url":"https://api.github.com/users/core23/received_events","type":"User","site_admin":false},"repo":{"id":34207278,"name":"SonataAdminBundle","full_name":"core23/SonataAdminBundle","owner":{"login":"core23","id":3440437,"avatar_url":"https://avatars.githubusercontent.com/u/3440437?v=3","gravatar_id":"","url":"https://api.github.com/users/core23","html_url":"https://github.com/core23","followers_url":"https://api.github.com/users/core23/followers","following_url":"https://api.github.com/users/core23/following{/other_user}","gists_url":"https://api.github.com/users/core23/gists{/gist_id}","starred_url":"https://api.github.com/users/core23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/core23/subscriptions","organizations_url":"https://api.github.com/users/core23/orgs","repos_url":"https://api.github.com/users/core23/repos","events_url":"https://api.github.com/users/core23/events{/privacy}","received_events_url":"https://api.github.com/users/core23/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/core23/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":true,"url":"https://api.github.com/repos/core23/SonataAdminBundle","forks_url":"https://api.github.com/repos/core23/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/core23/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/core23/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/core23/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/core23/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/core23/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/core23/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/core23/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/core23/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/core23/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/core23/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/core23/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/core23/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/core23/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/core23/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/core23/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/core23/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/core23/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/core23/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/core23/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/core23/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/core23/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/core23/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/core23/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/core23/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/core23/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/core23/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/core23/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/core23/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/core23/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/core23/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/core23/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/core23/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/core23/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/core23/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/core23/SonataAdminBundle/deployments","created_at":"2015-04-19T13:16:21Z","updated_at":"2015-04-19T13:16:23Z","pushed_at":"2016-08-31T16:59:51Z","git_url":"git://github.com/core23/SonataAdminBundle.git","ssh_url":"git@github.com:core23/SonataAdminBundle.git","clone_url":"https://github.com/core23/SonataAdminBundle.git","svn_url":"https://github.com/core23/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":17786,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"sonata-project:3.x","ref":"3.x","sha":"71a63ac370949c88ad08bf65cb841022d52a01fd","user":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"repo":{"id":1095228,"name":"SonataAdminBundle","full_name":"sonata-project/SonataAdminBundle","owner":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonata-project/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/deployments","created_at":"2010-11-19T17:08:52Z","updated_at":"2016-08-30T12:59:24Z","pushed_at":"2016-09-01T07:27:12Z","git_url":"git://github.com/sonata-project/SonataAdminBundle.git","ssh_url":"git@github.com:sonata-project/SonataAdminBundle.git","clone_url":"https://github.com/sonata-project/SonataAdminBundle.git","svn_url":"https://github.com/sonata-project/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":22312,"stargazers_count":1410,"watchers_count":1410,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1011,"mirror_url":null,"open_issues_count":268,"forks":1011,"open_issues":268,"watchers":1410,"default_branch":"3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/4089"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4089"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4089/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4089/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/17030f4e1deca23dc1ec682ed5d792a9da2eace2"}}}}
{"actor":{"display_login":"OskarStark"}}