Skip to content

Commit 4b92e88

Browse files
committed
Document translation_domain setting for choice fields
1 parent 92998d8 commit 4b92e88

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

reference/forms/types/choice.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
1717
| | - `choice_loader`_ |
1818
| | - `choice_label`_ |
1919
| | - `choice_attr`_ |
20+
| | - `choice_translation_domain`_ |
2021
| | - `placeholder`_ |
2122
| | - `expanded`_ |
2223
| | - `multiple`_ |
@@ -41,6 +42,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
4142
| | - `mapped`_ |
4243
| | - `read_only`_ |
4344
| | - `required`_ |
45+
| | - `translation_domain`_ |
4446
+-------------+------------------------------------------------------------------------------+
4547
| Parent type | :doc:`form </reference/forms/types/form>` |
4648
+-------------+------------------------------------------------------------------------------+
@@ -348,6 +350,8 @@ type:
348350

349351
.. include:: /reference/forms/types/options/required.rst.inc
350352

353+
.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc
354+
351355
Field Variables
352356
---------------
353357

reference/forms/types/entity.rst

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ objects from the database.
1616
| | - `choice_label`_ |
1717
| | - `query_builder`_ |
1818
| | - `em`_ |
19-
| | - `choice_translation_domain`_ |
20-
| | - `translation_domain`_ |
2119
+-------------+------------------------------------------------------------------+
2220
| Overridden | - `choices`_ |
2321
| options | |
@@ -26,6 +24,7 @@ objects from the database.
2624
| options | |
2725
| | - `placeholder`_ |
2826
| | - `choice_translation_domain`_ |
27+
| | - `translation_domain`_ |
2928
| | - `expanded`_ |
3029
| | - `multiple`_ |
3130
| | - `preferred_choices`_ |
@@ -178,27 +177,6 @@ em
178177
If specified, this entity manager will be used to load the choices
179178
instead of the ``default`` entity manager.
180179

181-
choice_translation_domain
182-
~~~~~~~~~~~~~~~~~~~~~~~~~
183-
184-
.. versionadded:: 2.7
185-
The ``choice_translation_domain`` option was introduced in Symfony 2.7.
186-
187-
**type**: ``boolean`` | ``null`` | ``string``
188-
189-
If specified ``null`` value, corresponds to parents ``translation_domain`` or default domain (messages). If the value is ``string``, corresponds to explicit domain(e.g. ``AcmeStoreBundle``). If the value is ``true``, reuse current ``translation_domain`` and ``false`` to disabled.
190-
191-
translation_domain
192-
~~~~~~~~~~~~~~~~~~
193-
194-
.. versionadded:: 2.7
195-
The ``translation_domain`` option was introduced in Symfony 2.7.
196-
197-
**type**: ``string``
198-
199-
When ``choice_translation_domain`` is ``true`` or ``null``, use translations of informed domain(e.g. ``AcmeStoreBundle`` to ``Acme\StoreBundle\Resources\translation`` files).
200-
201-
202180
Overridden Options
203181
------------------
204182

@@ -221,6 +199,8 @@ type:
221199

222200
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
223201

202+
.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc
203+
224204
.. include:: /reference/forms/types/options/expanded.rst.inc
225205

226206
.. include:: /reference/forms/types/options/multiple.rst.inc
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
translation_domain
2+
~~~~~~~~~~~~~~~~~~
3+
4+
**type**: ``string`` **default**: ``messages``
5+
6+
In case `choice_translation_domain`_ is set to ``true`` or ``null``, this
7+
configures the exact translation domain that will be used for any labels or
8+
options that are rendered for this field

0 commit comments

Comments
 (0)