{"action":"created","issue":{"url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/374","repository_url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle","labels_url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/374/comments","events_url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/374/events","html_url":"https://github.com/schmittjoh/JMSTranslationBundle/issues/374","id":163837595,"number":374,"title":"Using a FormType without an entity, the extractor doesn't work on constraints","user":{"login":"mneute","id":3141159,"avatar_url":"https://avatars.githubusercontent.com/u/3141159?v=3","gravatar_id":"","url":"https://api.github.com/users/mneute","html_url":"https://github.com/mneute","followers_url":"https://api.github.com/users/mneute/followers","following_url":"https://api.github.com/users/mneute/following{/other_user}","gists_url":"https://api.github.com/users/mneute/gists{/gist_id}","starred_url":"https://api.github.com/users/mneute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mneute/subscriptions","organizations_url":"https://api.github.com/users/mneute/orgs","repos_url":"https://api.github.com/users/mneute/repos","events_url":"https://api.github.com/users/mneute/events{/privacy}","received_events_url":"https://api.github.com/users/mneute/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-05T12:20:54Z","updated_at":"2016-07-12T10:05:15Z","closed_at":null,"body":"| Q                | A\r\n| ---------------- | ---\r\n| Bundle version   | 1.2.3\r\n| Symfony version  | 2.8.8\r\n| PHP version      | 5.4\r\n\r\nI'm using a simple FormType that isn't supposed to populate an entity, I just want the user to answer a simple Yes/No question.\r\n\r\n```php\r\nclass MyFormType extends AbstractType\r\n{\r\n\tpublic function buildForm(FormBuilderInterface $builder, array $options)\r\n\t{\r\n\t\t$builder\r\n\t\t\t->add('myQuestion', 'choice', [\r\n\t\t\t\t// ...\r\n\t\t\t\t'constraints' => [\r\n\t\t\t\t\tnew IsFalse(['message' => 'validator.messages.invalid_answer'])\r\n\t\t\t\t]\r\n\t\t\t]);\r\n\t}\r\n}\r\n```\r\n\r\nSymfony translates the error message if I add it manually to the translation file, but the command `php app/console translation:extract` doesn't detect it, so it always removes it from my translation file.\r\n\r\nIt would be nice if this kind of constraint message could be detected by the extractor.\r\n\r\n**Edit**\r\nPrecised the exact versions"},"comment":{"url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/comments/231995567","html_url":"https://github.com/schmittjoh/JMSTranslationBundle/issues/374#issuecomment-231995567","issue_url":"https://api.github.com/repos/schmittjoh/JMSTranslationBundle/issues/374","id":231995567,"user":{"login":"mneute","id":3141159,"avatar_url":"https://avatars.githubusercontent.com/u/3141159?v=3","gravatar_id":"","url":"https://api.github.com/users/mneute","html_url":"https://github.com/mneute","followers_url":"https://api.github.com/users/mneute/followers","following_url":"https://api.github.com/users/mneute/following{/other_user}","gists_url":"https://api.github.com/users/mneute/gists{/gist_id}","starred_url":"https://api.github.com/users/mneute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mneute/subscriptions","organizations_url":"https://api.github.com/users/mneute/orgs","repos_url":"https://api.github.com/users/mneute/repos","events_url":"https://api.github.com/users/mneute/events{/privacy}","received_events_url":"https://api.github.com/users/mneute/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T10:05:15Z","updated_at":"2016-07-12T10:05:15Z","body":"I edited my answer to add the exact versions.\r\n\r\nYou're right, I could use the `--keep` parameter as a workaround, but the extractor should still detect those messages."}}
{"actor":{"display_login":"mneute"}}