From b7265a6b3f3ee511e6962b26932af740f190e850 Mon Sep 17 00:00:00 2001 From: Rafael Mello Date: Mon, 10 Aug 2015 09:47:35 -0300 Subject: [PATCH 1/4] Update entity.rst Added "choice_translation_domain" and "translation_domain" documentation. --- reference/forms/types/entity.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 5aabfdd5f23..fd4d4afcced 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -13,6 +13,8 @@ objects from the database. | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------+ | Options | - `choice_label`_ | +| | - `choice_translation_domain`_ | +| | - `translation_domain`_ | | | - `class`_ | | | - `data_class`_ | | | - `em`_ | @@ -130,6 +132,26 @@ cast into a string and so must have a ``__toString()`` method. 'choice_label' => 'translations[en].name', )); +choice_translation_domain +~~~~~~~~~~~~~ + +.. versionadded:: 2.7 + The ``choice_translation_domain`` option was introduced in Symfony 2.7. + +**type**: ``boolean`` + +This option determines whether the translation of the data obtained will be informed domain ``translation_domain``. + +translation_domain +~~~~~~~~~~~~~ + +.. versionadded:: 2.7 + The ``translation_domain`` option was introduced in Symfony 2.7. + +**type**: ``string`` + +If specified, use translations of informed domain(e.g. ``AcmeStoreBundle`` to ``Acme\StoreBundle\Resources\translation`` files). + class ~~~~~ From 72ab6a2eb09adeb0c4c1557bc4472232ce28103f Mon Sep 17 00:00:00 2001 From: Rafael Mello Date: Mon, 10 Aug 2015 10:04:44 -0300 Subject: [PATCH 2/4] Travis fix Fixed title underline. --- reference/forms/types/entity.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index fd4d4afcced..8e5c13b4e00 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -133,7 +133,7 @@ cast into a string and so must have a ``__toString()`` method. )); choice_translation_domain -~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.7 The ``choice_translation_domain`` option was introduced in Symfony 2.7. @@ -143,7 +143,7 @@ choice_translation_domain This option determines whether the translation of the data obtained will be informed domain ``translation_domain``. translation_domain -~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.7 The ``translation_domain`` option was introduced in Symfony 2.7. From 76fadbd644d99c54e5f5f7d7d81e769d44b02727 Mon Sep 17 00:00:00 2001 From: Rafael Mello Date: Sun, 30 Aug 2015 23:49:38 -0300 Subject: [PATCH 3/4] choice_translation_domain doc fix "choice_translation_domain" description fixed. --- reference/forms/types/entity.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 8e5c13b4e00..21bae4cd437 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -138,9 +138,9 @@ choice_translation_domain .. versionadded:: 2.7 The ``choice_translation_domain`` option was introduced in Symfony 2.7. -**type**: ``boolean`` +**type**: ``boolean`` | ``null`` | ``string`` -This option determines whether the translation of the data obtained will be informed domain ``translation_domain``. +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. translation_domain ~~~~~~~~~~~~~~~~~~ From 2f4341e9a0cd18bb0dff6ceb629049e8e19e8491 Mon Sep 17 00:00:00 2001 From: Rafael Mello Date: Mon, 31 Aug 2015 00:00:27 -0300 Subject: [PATCH 4/4] translation_domain doc fix "translation_domain" documentation fixed. --- reference/forms/types/entity.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 21bae4cd437..689b310d8e6 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -140,7 +140,7 @@ choice_translation_domain **type**: ``boolean`` | ``null`` | ``string`` -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. +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. translation_domain ~~~~~~~~~~~~~~~~~~ @@ -150,7 +150,7 @@ translation_domain **type**: ``string`` -If specified, use translations of informed domain(e.g. ``AcmeStoreBundle`` to ``Acme\StoreBundle\Resources\translation`` files). +When ``choice_translation_domain`` is ``true`` or ``null``, use translations of informed domain(e.g. ``AcmeStoreBundle`` to ``Acme\StoreBundle\Resources\translation`` files). class ~~~~~