diff --git a/core/lib/Drupal/Core/Annotation/Translation.php b/core/lib/Drupal/Core/Annotation/Translation.php index c9c2f75..a2020df 100644 --- a/core/lib/Drupal/Core/Annotation/Translation.php +++ b/core/lib/Drupal/Core/Annotation/Translation.php @@ -10,17 +10,21 @@ use Drupal\Component\Annotation\AnnotationInterface; /** - * @defgroup translatable_plugin_definition Translatable plugin metadata + * @defgroup plugin_translatable Translatable plugin metadata * * @{ - * Plugin definitions like the title of a plugin should be translatable, because - * the string appears in the UI. Therefore there is an Annotation class, which - * allows to mark any string as translatable. + * 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: * @code * title = @Translation("Title of the plugin"), * @endcode - * Additional to the @Translation bit a "use" statement for that class has to be - * added to the file. + * You will also need to make sure that your class file includes the line: + * @code + * use Drupal\Core\Annotation\Translation; + * @endcode * @} */ diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php index cb92deb..38ed5fa 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php @@ -94,7 +94,7 @@ class EntityType extends Plugin { /** * The human-readable name of the type. * - * @ingroup translatable_plugin_definition + * @ingroup plugin_translatable * * @var \Drupal\Core\Annotation\Translation */ @@ -103,7 +103,7 @@ class EntityType extends Plugin { /** * The human-readable name of the entity bundles, e.g. Vocabulary. * - * @ingroup translatable_plugin_definition + * @ingroup plugin_translatable * * @var \Drupal\Core\Annotation\Translation */