Skip to content

Commit bef2b66

Browse files
committed
feature #6233 Document translation_domain for choice fields (merorafael, WouterJ)
This PR was merged into the 2.7 branch. Discussion ---------- Document translation_domain for choice fields It has a slightly different behaviour, I think it's interested to document it. This finishes #5614. | Q | A | --- | --- | Doc fix? | no | New docs? | yes | Applies to | 2.7+ | Fixed tickets | - Commits ------- 4b92e88 Document translation_domain setting for choice fields 92998d8 translation_domain doc fix 2fa2386 choice_translation_domain doc fix 3ad5111 Travis fix 5957927 Update entity.rst
2 parents 0cbea24 + 4b92e88 commit bef2b66

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ objects from the database.
2424
| options | |
2525
| | - `placeholder`_ |
2626
| | - `choice_translation_domain`_ |
27+
| | - `translation_domain`_ |
2728
| | - `expanded`_ |
2829
| | - `multiple`_ |
2930
| | - `preferred_choices`_ |
@@ -176,7 +177,6 @@ em
176177
If specified, this entity manager will be used to load the choices
177178
instead of the ``default`` entity manager.
178179

179-
180180
Overridden Options
181181
------------------
182182

@@ -199,6 +199,8 @@ type:
199199

200200
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
201201

202+
.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc
203+
202204
.. include:: /reference/forms/types/options/expanded.rst.inc
203205

204206
.. 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)