Skip to content

Document translation_domain for choice fields #6233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
| | - `choice_loader`_ |
| | - `choice_label`_ |
| | - `choice_attr`_ |
| | - `choice_translation_domain`_ |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the option was already included, but it just didn't exist in this list.

| | - `placeholder`_ |
| | - `expanded`_ |
| | - `multiple`_ |
Expand All @@ -41,6 +42,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
| | - `mapped`_ |
| | - `read_only`_ |
| | - `required`_ |
| | - `translation_domain`_ |
+-------------+------------------------------------------------------------------------------+
| Parent type | :doc:`form </reference/forms/types/form>` |
+-------------+------------------------------------------------------------------------------+
Expand Down Expand Up @@ -348,6 +350,8 @@ type:

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

.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc

Field Variables
---------------

Expand Down
4 changes: 3 additions & 1 deletion reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ objects from the database.
| options | |
| | - `placeholder`_ |
| | - `choice_translation_domain`_ |
| | - `translation_domain`_ |
| | - `expanded`_ |
| | - `multiple`_ |
| | - `preferred_choices`_ |
Expand Down Expand Up @@ -176,7 +177,6 @@ em
If specified, this entity manager will be used to load the choices
instead of the ``default`` entity manager.


Overridden Options
------------------

Expand All @@ -199,6 +199,8 @@ type:

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

.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc

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

.. include:: /reference/forms/types/options/multiple.rst.inc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
translation_domain
~~~~~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``messages``

In case `choice_translation_domain`_ is set to ``true`` or ``null``, this
configures the exact translation domain that will be used for any labels or
options that are rendered for this field