{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/comments/92930241","pull_request_review_id":13454108,"id":92930241,"diff_hunk":"@@ -40,14 +42,70 @@ public function alterObject(AdminInterface $admin, $object)\n         if ($this->getTranslatableChecker()->isTranslatable($object)) {\n             $translatableListener = $this->getTranslatableListener($admin);\n             $translatableListener->setTranslatableLocale($this->getTranslatableLocale($admin));\n-            $translatableListener->setTranslationFallback('');\n+            $translatableListener->setTranslationFallback(false);\n \n             $this->getContainer($admin)->get('doctrine')->getManager()->refresh($object);\n             $object->setLocale($this->getTranslatableLocale($admin));\n         }\n     }\n \n     /**\n+     * {@inheritdoc}\n+     */\n+    public function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list')\n+    {\n+        $this->getTranslatableListener($admin)->setTranslatableLocale($this->getTranslatableLocale($admin));\n+        $this->getTranslatableListener($admin)->setTranslationFallback(false);\n+    }\n+\n+    /**\n+     * Search on normal field and on translated field, use with a\n+     * doctrine_orm_callback filter type.\n+     *\n+     * @param ProxyQuery $queryBuilder\n+     * @param string     $alias\n+     * @param string     $field\n+     * @param string     $value\n+     *\n+     * @return bool|null\n+     */\n+    public static function translationFieldFilter(ProxyQuery $queryBuilder, $alias, $field, $value)","path":"Admin/Extension/Gedmo/TranslatableAdminExtension.php","position":41,"original_position":41,"commit_id":"fcdbf4de5a3e4aad2a329585ade5b23bd656f7e9","original_commit_id":"fcdbf4de5a3e4aad2a329585ade5b23bd656f7e9","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":"Why did you make this `static` and `public`?","created_at":"2016-12-17T22:34:01Z","updated_at":"2016-12-17T22:34:01Z","html_url":"https://github.com/sonata-project/SonataTranslationBundle/pull/143#discussion_r92930241","pull_request_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/comments/92930241"},"html":{"href":"https://github.com/sonata-project/SonataTranslationBundle/pull/143#discussion_r92930241"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143","id":97476919,"html_url":"https://github.com/sonata-project/SonataTranslationBundle/pull/143","diff_url":"https://github.com/sonata-project/SonataTranslationBundle/pull/143.diff","patch_url":"https://github.com/sonata-project/SonataTranslationBundle/pull/143.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/143","number":143,"state":"open","locked":false,"title":"allow to switch content language on list and filter by language (continued)","user":{"login":"dmarkowicz","id":1571340,"avatar_url":"https://avatars.githubusercontent.com/u/1571340?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarkowicz","html_url":"https://github.com/dmarkowicz","followers_url":"https://api.github.com/users/dmarkowicz/followers","following_url":"https://api.github.com/users/dmarkowicz/following{/other_user}","gists_url":"https://api.github.com/users/dmarkowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarkowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarkowicz/subscriptions","organizations_url":"https://api.github.com/users/dmarkowicz/orgs","repos_url":"https://api.github.com/users/dmarkowicz/repos","events_url":"https://api.github.com/users/dmarkowicz/events{/privacy}","received_events_url":"https://api.github.com/users/dmarkowicz/received_events","type":"User","site_admin":false},"body":"<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT, MAKE SURE YOU READ AND EDIT 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    - 2.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/SonataTranslationBundle/blob/2.x/CONTRIBUTING.md#the-base-branch\r\n-->\r\nI am targetting this branch, because it is BC.\r\n\r\nfix #81, fix #83\r\n\r\ncontinuation of #83, #84, #119\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- [gedmo translations] Added content language switcher to lists\r\n- [gedmo translations] Added available translations filter \r\n```\r\n\r\n## Subject\r\n\r\nFrom original PR:\r\n> In the configureQuery, with the translatable listener the locale is changed for Doctrine and data are translated on the list.\r\n\r\n> translationFieldFilter is a callback method to use on doctrine_orm_callback filter to filter on field and on its translation.\r\n\r\nI merged conflicts, fixed null exception in block template and added documentation for `translationFieldFilter`.","created_at":"2016-12-11T22:58:47Z","updated_at":"2016-12-17T22:34:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18ed914255eccbd6d17e6001a36354103f3d6407","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/143/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/statuses/fcdbf4de5a3e4aad2a329585ade5b23bd656f7e9","head":{"label":"dmarkowicz:translate-gedmo-lists","ref":"translate-gedmo-lists","sha":"fcdbf4de5a3e4aad2a329585ade5b23bd656f7e9","user":{"login":"dmarkowicz","id":1571340,"avatar_url":"https://avatars.githubusercontent.com/u/1571340?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarkowicz","html_url":"https://github.com/dmarkowicz","followers_url":"https://api.github.com/users/dmarkowicz/followers","following_url":"https://api.github.com/users/dmarkowicz/following{/other_user}","gists_url":"https://api.github.com/users/dmarkowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarkowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarkowicz/subscriptions","organizations_url":"https://api.github.com/users/dmarkowicz/orgs","repos_url":"https://api.github.com/users/dmarkowicz/repos","events_url":"https://api.github.com/users/dmarkowicz/events{/privacy}","received_events_url":"https://api.github.com/users/dmarkowicz/received_events","type":"User","site_admin":false},"repo":{"id":65638561,"name":"SonataTranslationBundle","full_name":"dmarkowicz/SonataTranslationBundle","owner":{"login":"dmarkowicz","id":1571340,"avatar_url":"https://avatars.githubusercontent.com/u/1571340?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarkowicz","html_url":"https://github.com/dmarkowicz","followers_url":"https://api.github.com/users/dmarkowicz/followers","following_url":"https://api.github.com/users/dmarkowicz/following{/other_user}","gists_url":"https://api.github.com/users/dmarkowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarkowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarkowicz/subscriptions","organizations_url":"https://api.github.com/users/dmarkowicz/orgs","repos_url":"https://api.github.com/users/dmarkowicz/repos","events_url":"https://api.github.com/users/dmarkowicz/events{/privacy}","received_events_url":"https://api.github.com/users/dmarkowicz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmarkowicz/SonataTranslationBundle","description":"Translate your models in Sonata ","fork":true,"url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle","forks_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/forks","keys_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/teams","hooks_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/hooks","issue_events_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/issues/events{/number}","events_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/events","assignees_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/assignees{/user}","branches_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/branches{/branch}","tags_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/tags","blobs_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/languages","stargazers_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/stargazers","contributors_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/contributors","subscribers_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/subscribers","subscription_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/subscription","commits_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/contents/{+path}","compare_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/merges","archive_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/downloads","issues_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/issues{/number}","pulls_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/labels{/name}","releases_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/releases{/id}","deployments_url":"https://api.github.com/repos/dmarkowicz/SonataTranslationBundle/deployments","created_at":"2016-08-13T21:58:34Z","updated_at":"2016-08-13T21:58:35Z","pushed_at":"2016-12-17T20:36:58Z","git_url":"git://github.com/dmarkowicz/SonataTranslationBundle.git","ssh_url":"git@github.com:dmarkowicz/SonataTranslationBundle.git","clone_url":"https://github.com/dmarkowicz/SonataTranslationBundle.git","svn_url":"https://github.com/dmarkowicz/SonataTranslationBundle","homepage":"http://sonata-project.org/bundles/translation/master/doc/index.html","size":535,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.x"}},"base":{"label":"sonata-project:2.x","ref":"2.x","sha":"5dbf44d6cc431373ebd39c3e494197a2ba3c1cc0","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":17360224,"name":"SonataTranslationBundle","full_name":"sonata-project/SonataTranslationBundle","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/SonataTranslationBundle","description":"Translate your models in Sonata ","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/releases{/id}","deployments_url":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/deployments","created_at":"2014-03-03T08:53:20Z","updated_at":"2016-10-26T11:15:26Z","pushed_at":"2016-12-17T20:36:59Z","git_url":"git://github.com/sonata-project/SonataTranslationBundle.git","ssh_url":"git@github.com:sonata-project/SonataTranslationBundle.git","clone_url":"https://github.com/sonata-project/SonataTranslationBundle.git","svn_url":"https://github.com/sonata-project/SonataTranslationBundle","homepage":"http://sonata-project.org/bundles/translation/master/doc/index.html","size":557,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":10,"forks":42,"open_issues":10,"watchers":17,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143"},"html":{"href":"https://github.com/sonata-project/SonataTranslationBundle/pull/143"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/143"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataTranslationBundle/statuses/fcdbf4de5a3e4aad2a329585ade5b23bd656f7e9"}}}}
{"actor":{"display_login":"core23"}}