8000 [TwigBridge] do not translate null placeholders or titles by xabbuh · Pull Request #38595 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[TwigBridge] do not translate null placeholders or titles #38595

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
do not translate null placeholders or titles
  • Loading branch information
xabbuh committed Oct 16, 2020
commit 2ee24a0592633188b22e160660c51fa3737ae27b
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
{%- for attrname, attrvalue in attr -%}
{{- " " -}}
{%- if attrname in ['placeholder', 'title'] -%}
{{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}"
{{- attrname }}="{{ translation_domain is same as(false) or attrvalue is null ? attrvalue : attrvalue|trans({}, translation_domain) }}"
{%- elseif attrvalue is same as(true) -%}
{{- attrname }}="{{ attrname }}"
{%- elseif attrvalue is not same as(false) -%}
Expand Down
0