Drupal 8 8.0.2
Describes how to put translatable UI text into annotations.
When providing plugin annotation, properties whose values are displayed in the user interface should be made translatable. Much the same as how user interface text elsewhere is wrapped in t() to make it translatable, in plugin annotation, wrap translatable strings in the @ Translation() annotation. For example:
Remove spaces after @ in your actual plugin - these are put into this sample code so that it is not recognized as annotation.
To provide replacement values for placeholders, use the "arguments" array:
It is also possible to provide a context with the text, similar to t():
Other t() arguments like language code are not valid to pass in. Only context is supported.