Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[TwigBridge] Removed strict check when found variables inside a translation #10643

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

goetas commented Apr 7, 2014

Q A
Bug fix? yes
New feature? no
BC breaks? no?
Deprecations? no
Tests pass? yes
Fixed tickets #10638
License MIT
Member

jakzal commented Apr 8, 2014

Tests are broken on PHP 5.3.

@jakzal jakzal added Translator and removed Translator labels Apr 8, 2014

Contributor

goetas commented Apr 8, 2014

I've fixed the tests. May be useful to create a single commit?

@stof stof commented on an outdated diff Apr 8, 2014

src/Symfony/Bridge/Twig/Node/TransNode.php
@@ -36,7 +36,7 @@ public function compile(\Twig_Compiler $compiler)
$defaults = $this->getNode('vars');
$vars = null;
}
- list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults);
+ list($msg, $defaults) = $this->compileString($this->getNode('body'), $defaults, !!$vars);
@stof

stof Apr 8, 2014

Member

please use (Boolean) to cast to boolean rather than !!. This trick can be used in JS to be shorter, but we don't have this constraint in PHP

@stof stof added the TwigBundle label Apr 9, 2014

@goetas goetas changed the title from Removed strict check when found variables inside a translation to [TwigBridge] Removed strict check when found variables inside a translation Apr 11, 2014

Contributor

goetas commented Apr 16, 2014

news on this?

Owner

fabpot commented Apr 28, 2014

Thanks for fixing this bug @goetas.

fabpot added a commit that referenced this pull request Apr 28, 2014

bug #10643 [TwigBridge] Removed strict check when found variables ins…
…ide a translation (goetas)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10643).

Discussion
----------

[TwigBridge] Removed strict check when found variables inside a translation

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no?
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10638
| License       | MIT

Commits
-------

074191e Removed strict check when found variables inside a translation

@fabpot fabpot closed this Apr 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment