Commit fad3ada0 authored by idebr's avatar idebr Committed by Berdir

Issue #2955550 by idebr: Implement plural labels for Paragraphs, Paragraph...

Issue #2955550 by idebr: Implement plural labels for Paragraphs, Paragraph types, Paragraphs library item
parent 8cf342c0
......@@ -17,6 +17,13 @@ use Drupal\user\UserInterface;
* @ContentEntityType(
* id = "paragraphs_library_item",
* label = @Translation("Paragraphs library item"),
* label_collection = @Translation("Paragraphs library items"),
* label_singular = @Translation("Paragraphs library item"),
* label_plural = @Translation("Paragraphs library items"),
* label_count = @PluralTranslation(
* singular = "@count Paragraphs library item",
* plural = "@count Paragraphs library items",
* ),
* handlers = {
* "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
* "list_builder" = "Drupal\Core\Entity\EntityListBuilder",
......
......@@ -29,6 +29,13 @@ use Drupal\user\UserInterface;
* @ContentEntityType(
* id = "paragraph",
* label = @Translation("Paragraph"),
* label_collection = @Translation("Paragraphs"),
* label_singular = @Translation("Paragraph"),
* label_plural = @Translation("Paragraphs"),
* label_count = @PluralTranslation(
* singular = "@count Paragraph",
* plural = "@count Paragraphs",
* ),
* bundle_label = @Translation("Paragraph type"),
* handlers = {
* "view_builder" = "Drupal\paragraphs\ParagraphViewBuilder",
......
......@@ -14,6 +14,13 @@ use Drupal\paragraphs\ParagraphsTypeInterface;
* @ConfigEntityType(
* id = "paragraphs_type",
* label = @Translation("Paragraphs type"),
* label_collection = @Translation("Paragraphs types"),
* label_singular = @Translation("Paragraphs type"),
* label_plural = @Translation("Paragraphs types"),
* label_count = @PluralTranslation(
* singular = "@count Paragraphs type",
* plural = "@count Paragraphs types",
* ),
* handlers = {
* "access" = "Drupal\paragraphs\ParagraphsTypeAccessControlHandler",
* "list_builder" = "Drupal\paragraphs\Controller\ParagraphsTypeListBuilder",
......
......@@ -41,16 +41,16 @@ class ParagraphsUninstallTest extends WebTestBase {
$this->drupalPostForm(NULL, [], t('Uninstall'));
// Delete library data.
$this->clickLink('Remove paragraphs library item entities');
$this->drupalPostForm(NULL, [], t('Delete all paragraphs library item entities'));
$this->clickLink('Remove Paragraphs library items');
$this->drupalPostForm(NULL, [], t('Delete all Paragraphs library items'));
// Uninstall the library module.
$this->drupalPostForm('admin/modules/uninstall', ['uninstall[paragraphs_library]' => TRUE], t('Uninstall'));
$this->drupalPostForm(NULL, [], t('Uninstall'));
// Delete paragraphs data.
$this->clickLink('Remove paragraph entities');
$this->drupalPostForm(NULL, [], t('Delete all paragraph entities'));
$this->clickLink('Remove Paragraphs');
$this->drupalPostForm(NULL, [], t('Delete all Paragraphs'));
// Uninstall the module paragraphs.
$this->drupalPostForm('admin/modules/uninstall', ['uninstall[paragraphs]' => TRUE], t('Uninstall'));
......
Markdown is supported
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