Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 372bc1a

Browse filesBrowse files
committed
bug #25249 [Form] Avoid button label translation when it's set to false (TeLiXj)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #25249). Discussion ---------- [Form] Avoid button label translation when it's set to false | Q | A | ------------- | --- | Branch? | 4.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | | License | MIT | Doc PR | Improve my previous contribution to hide button label when it's set to false (#24148) because a missing translation error appears Commits ------- 368edd8 Avoid button label translation when it's set to false
2 parents de95a37 + 368edd8 commit 372bc1a
Copy full SHA for 372bc1a

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+3-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.