diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php index 5f8ee2d..3a4d98b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php @@ -38,6 +38,11 @@ public function setUp() { 'color' => 'yellow', 'uses' => array( 'bread' => t('Banana bread'), + 'loaf' => array( + 'singular' => '1 loaf', + 'plural' => '@count loafs', + 'generic' => t('loafs'), + ), ), 'class' => 'Drupal\plugin_test\Plugin\plugin_test\fruit\Banana', 'provider' => 'plugin_test', diff --git a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/fruit/Banana.php b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/fruit/Banana.php index 55f1d12..73f6996 100644 --- a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/fruit/Banana.php +++ b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/fruit/Banana.php @@ -9,6 +9,7 @@ use Drupal\Component\Annotation\Plugin; use Drupal\Core\Annotation\Translation; +use Drupal\Core\Annotation\PluralTranslation; /** * @Plugin( @@ -16,7 +17,12 @@ * label = "Banana", * color = "yellow", * uses = { - * "bread" = @Translation("Banana bread") + * "bread" = @Translation("Banana bread"), + * "loaf" = @PluralTranslation( + * singular = "1 loaf", + * plural = "@count loafs", + * generic = "loafs" + * ) * } * ) */ diff --git a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php index bd6ba26..6eb403d 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php @@ -59,6 +59,11 @@ protected function setUp() { 'color' => 'yellow', 'uses' => array( 'bread' => 'Banana bread', + 'loaf' => array( + 'singular' => '1 loaf', + 'plural' => '@count loafs', + 'generic' => t('loafs'), + ), ), 'class' => 'Drupal\plugin_test\Plugin\plugin_test\fruit\Banana', ),