Skip to content

Commit 38503b1

Browse files
committed
minor symfony#14220 fix default value of choice_translation_domain for choice types (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- fix default value of choice_translation_domain for choice types fixes symfony/symfony#37521 (comment) Commits ------- c0a42de fix default value of choice_translation_domain for choice types
2 parents c0fb447 + c0a42de commit 38503b1

13 files changed

+38
-14
lines changed

reference/forms/types/birthday.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Inherited Options
6464

6565
These options inherit from the :doc:`DateType </reference/forms/types/date>`:
6666

67-
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
67+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
6868

6969
.. include:: /reference/forms/types/options/days.rst.inc
7070

reference/forms/types/choice.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ the choice options would need to be resolved thus triggering the callback.
236236

237237
.. include:: /reference/forms/types/options/choice_name.rst.inc
238238

239-
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
239+
.. include:: /reference/forms/types/options/choice_translation_domain_enabled.rst.inc
240240

241241
.. include:: /reference/forms/types/options/choice_value.rst.inc
242242

reference/forms/types/country.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
2222
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2323
+-------------+-----------------------------------------------------------------------+
2424
| Overridden | - `choices`_ |
25-
| options | |
25+
| options | - `choice_translation_domain`_ |
2626
+-------------+-----------------------------------------------------------------------+
2727
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2828
| options | |
@@ -67,6 +67,8 @@ The locale is used to translate the countries names.
6767
will also have to set the ``choice_loader`` option to ``null``. Not doing
6868
so is deprecated since Symfony 3.3.
6969

70+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
71+
7072
Inherited Options
7173
-----------------
7274

reference/forms/types/currency.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
1515
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1616
+-------------+------------------------------------------------------------------------+
1717
| Overridden | - `choices`_ |
18-
| options | |
18+
| options | - `choice_translation_domain`_ |
1919
+-------------+------------------------------------------------------------------------+
2020
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2121
| options | |
@@ -58,6 +58,8 @@ The choices option defaults to all currencies.
5858
will also have to set the ``choice_loader`` option to ``null``. Not doing
5959
so is deprecated since Symfony 3.3.
6060

61+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
62+
6163
Inherited Options
6264
-----------------
6365

reference/forms/types/date.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ and can understand a number of different input formats via the `input`_ option.
1515
+----------------------+-----------------------------------------------------------------------------+
1616
| Rendered as | single text box or three select fields |
1717
+----------------------+-----------------------------------------------------------------------------+
18-
| Options | - `choice_translation_domain`_ |
19-
| | - `days`_ |
18+
| Options | - `days`_ |
2019
| | - `placeholder`_ |
2120
| | - `format`_ |
2221
| | - `html5`_ |
@@ -28,6 +27,7 @@ and can understand a number of different input formats via the `input`_ option.
2827
| | - `years`_ |
2928
+----------------------+-----------------------------------------------------------------------------+
3029
| Overridden options | - `by_reference`_ |
30+
| | - `choice_translation_domain`_ |
3131
| | - `compound`_ |
3232
| | - `data_class`_ |
3333
| | - `error_bubbling`_ |
@@ -135,8 +135,6 @@ that Symfony should expect via the `format`_ option.
135135
Field Options
136136
-------------
137137

138-
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
139-
140138
.. include:: /reference/forms/types/options/days.rst.inc
141139

142140
``placeholder``
@@ -191,6 +189,8 @@ Overridden Options
191189

192190
The ``DateTime`` classes are treated as immutable objects.
193191

192+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
193+
194194
.. include:: /reference/forms/types/options/compound_type.rst.inc
195195

196196
.. include:: /reference/forms/types/options/data_class_date.rst.inc

reference/forms/types/entity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
258258

259259
.. include:: /reference/forms/types/options/choice_attr.rst.inc
260260

261-
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
261+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
262262

263263
.. include:: /reference/forms/types/options/expanded.rst.inc
264264

reference/forms/types/language.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
2424
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2525
+-------------+------------------------------------------------------------------------+
2626
| Overridden | - `choices`_ |
27-
| options | |
27+
| options | - `choice_translation_domain`_ |
2828
+-------------+------------------------------------------------------------------------+
2929
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
3030
| options | |
@@ -69,6 +69,8 @@ The default locale is used to translate the languages names.
6969
will also have to set the ``choice_loader`` option to ``null``. Not doing
7070
so is deprecated since Symfony 3.3.
7171

72+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
73+
7274
Inherited Options
7375
-----------------
7476

reference/forms/types/locale.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
2525
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2626
+-------------+------------------------------------------------------------------------+
2727
| Overridden | - `choices`_ |
28-
| options | |
28+
| options | - `choice_translation_domain`_ |
2929
+-------------+------------------------------------------------------------------------+
3030
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
3131
| options | |
@@ -70,6 +70,8 @@ specify the language.
7070
will also have to set the ``choice_loader`` option to ``null``. Not doing
7171
so is deprecated since Symfony 3.3.
7272

73+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
74+
7375
Inherited Options
7476
-----------------
7577

reference/forms/types/options/choice_translation_domain.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
``choice_translation_domain``
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

4-
**type**: ``string``, ``boolean`` or ``null``
4+
DEFAULT_VALUE
55

66
This option determines if the choice values should be translated and in which
77
translation domain.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
2+
:end-before: DEFAULT_VALUE
3+
4+
**type**: ``string``, ``boolean`` or ``null`` **default**: ``false``
5+
6+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
7+
:start-after: DEFAULT_VALUE
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
2+
:end-before: DEFAULT_VALUE
3+
4+
**type**: ``string``, ``boolean`` or ``null`` **default**: ``true``
5+
6+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
7+
:start-after: DEFAULT_VALUE

reference/forms/types/time.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ values.
8181
Field Options
8282
-------------
8383

84-
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
84+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
8585

8686
``placeholder``
8787
~~~~~~~~~~~~~~~

reference/forms/types/timezone.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
2121
| | - `regions`_ |
2222
+-------------+------------------------------------------------------------------------+
2323
| Overridden | - `choices`_ |
24-
| options | |
24+
| options | - `choice_translation_domain`_ |
2525
+-------------+------------------------------------------------------------------------+
2626
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2727
| options | |
@@ -87,6 +87,8 @@ The Timezone type defaults the choices to all timezones returned by
8787
will also have to set the ``choice_loader`` option to ``null``. Not doing
8888
so is deprecated since Symfony 3.3.
8989

90+
.. include:: /reference/forms/types/options/choice_translation_domain_disabled.rst.inc
91+
9092
Inherited Options
9193
-----------------
9294

0 commit comments

Comments
 (0)