8000 Avoid button label translation when it's set to false · symfony/symfony@368edd8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 368edd8

Browse files
TeLiXjfabpot
authored andcommitted
Avoid button label translation when it's set to false
Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appear
1 parent de95a37 commit 368edd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,14 @@
216216
{%- endblock range_widget %}
217217

218218
{%- block button_widget -%}
219-
{%- if label is not same as(false) and label is empty -%}
219+
{%- if label is empty -%}
220220
{%- if label_format is not empty -%}
221221
{% set label = label_format|replace({
222222
'%name%': name,
223223
'%id%': id,
224224
}) %}
225+
{%- elseif label is same as(false) -%}
226+
{% set translation_domain = false %}
225227
{%- else -%}
226228
{% set label = name|humanize %}
227229
{%- endif -%}

0 commit comments

Comments
 (0)
0