Commit 29f60ce5 authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #1969970 by Gábor Hojtsy: Add context information to documentation of Translation annotation

parent 2463750d
......@@ -28,6 +28,13 @@
* @code
* use Drupal\Core\Annotation\Translation;
* @endcode
*
* It is also possible to provide a context with the text, similar to t():
* @code
* title = @ Translation("Bundle", context = "Validation"),
* @endcode
* Other t() arguments like language code are not valid to pass in. Only
* context is supported.
* @}
*/
......@@ -36,8 +43,8 @@
*
* Some metadata within an annotation needs to be translatable. This class
* supports that need by allowing both the translatable string and, if
* specified, a context for that string. This class is essentially a wrapper
* around the traditional t() function in drupal.
* specified, a context for that string. The string (with optional context)
* is passed into t().
*
* @Annotation
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment