8000 bug #38595 [TwigBridge] do not translate null placeholders or titles … · symfony/symfony@1eead3f · GitHub
[go: up one dir, main page]

Skip to content

Commit 1eead3f

Browse files
committed
bug #38595 [TwigBridge] do not translate null placeholders or titles (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBridge] do not translate null placeholders or titles | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #37573 | License | MIT | Doc PR | Commits ------- 2ee24a0 do not translate null placeholders or titles
2 parents 3ff9384 + 2ee24a0 commit 1eead3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
{%- for attrname, attrvalue in attr -%}
400400
{{- " " -}}
401401
{%- if attrname in ['placeholder', 'title'] -%}
402-
{{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}"
402+
{{- attrname }}="{{ translation_domain is same as(false) or attrvalue is null ? attrvalue : attrvalue|trans({}, translation_domain) }}"
403403
{%- elseif attrvalue is same as(true) -%}
404404
{{- attrname }}="{{ attrname }}"
405405
{%- elseif attrvalue is not same as(false) -%}

0 commit comments

Comments
 (0)
0