Setting @Ignore to fully ignore the string
I think the default behaviour for @Ignore is misleading. It sounds like it should ignore the whole string, not just the error message. This PR adds the ability to @Ignore a string in a Controller or FormType class. I don't currently see a way of implementing for twig yet.
Fixes #162 and #20
:+1:
@ollietb Could you retrigger travis?
@hacfi I think I need to be the owner to retrigger travis.
@ollietb No..just add a new commit. For example remove a blank line in the usage.rst file.
what happened to this ? i think this is a good integration when will it be merged with the master branch ?
politely ping @schmittjoh :)
Cool @ollietb. Thank you for this PR.
Would you mind rebasing this on master?
@Nyholm is this still needed?
I politely ask you the same question. =)
The two referenced tickets are closed. I was not familiar with the code base at the time you first made this PR.
What I really want to know is if you have time and interest if updating the PR and push it through a review process? If not we can close this for now until someone picks ut up.
@Nyholm Yep I can do it, I was just making sure that this hadn't been done by someone else in another PR
@Nyholm I've updated the PR
When testing this with the following code in a controller:
$form = $this->createFormBuilder();
$form->add('status','choice', [
'choices' => [
"1" => 'Yes',
"0" => 'No'
],
'required' => false,
]);
I get following result:
<trans-unit id="356a192b7913b04c54574d18c28d46e6395428ab" resname="1">
<source>1</source>
<target state="new">1</target>
<jms:reference-file line="26">/Users/tobias/Workspace/PHPStorm/SymfonyBundle/app/../src/AppBundle/Controller/DefaultController.php</jms:reference-file>
</trans-unit>
With the current dev-master I get
<trans-unit id="b6589fc6ab0dc82cf12099d1c2d40ab994e8410c" resname="0">
<source>0</source>
<target state="new">0</target>
<jms:reference-file line="27">/Users/tobias/Workspace/PHPStorm/SymfonyBundle/app/../src/AppBundle/Controller/DefaultController.php</jms:reference-file>
</trans-unit>
<trans-unit id="356a192b7913b04c54574d18c28d46e6395428ab" resname="1">
<source>1</source>
<target state="new">1</target>
<jms:reference-file line="26">/Users/tobias/Workspace/PHPStorm/SymfonyBundle/app/../src/AppBundle/Controller/DefaultController.php</jms:reference-file>
</trans-unit>
Without any ignore this is not fetching all my translations.
@Nyholm is there a test for that controller code? I can't seem to see it in the tests?
Any updates on this or has it been abandoned @Nyholm @ollietb