Or don't have a "group content type" translation option in /admin/config/regional/config-translation

CommentFileSizeAuthor
#6 no....png350.74 KBlawxen
#5 test.png163.69 KBlawxen
#2 2992499-2.patch441 byteslawxen
groupcontenttranlstion.png286.99 KBlawxen

Comments

caseylau created an issue. See original summary.

lawxen’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new441 bytes

http://cgit.drupalcode.org/drupal/tree/core/modules/config_translation/c... .

  foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) {
    if ($entity_type_id == 'group_content_type') {
      $aaa = '111';
    }
    // Determine base path for entities automatically if provided via the
    // configuration entity.
    if (
      !$entity_type->entityClassImplements(ConfigEntityInterface::class) ||
      !$entity_type->hasLinkTemplate('edit-form')
    ) {
      // Do not record this entity mapper if the entity type does not
      // provide a base route. We'll surely not be able to do anything with
      // it anyway. Configuration entities with a dynamic base path, such as
      // fields, need special treatment. See above.
      continue;
    }

    // Use the entity type as the plugin ID.
    $base_route_name = "entity.$entity_type_id.edit_form";
    $info[$entity_type_id] = [
      'class' => '\Drupal\config_translation\ConfigEntityMapper',
      'base_route_name' => $base_route_name,
      'title' => $entity_type->getLowercaseLabel(),
      'names' => [],
      'entity_type' => $entity_type_id,
      'weight' => 10,
    ];
  }

.

We can see that we must set config entity type's edit-form definition if want to translate bundle

Status: Needs review » Needs work

The last submitted patch, 2: 2992499-2.patch, failed testing. View results

lawxen’s picture

Title: Can't translate group content's bundle » Can't translate "group content type"
Issue summary: View changes
lawxen’s picture

Status: Needs work » Needs review
StatusFileSize
new163.69 KB

The test failer has nothing relation with this patch, if I don't apply the patch 2992499-2.patch, the test still fail

lawxen’s picture

Issue summary: View changes
StatusFileSize
new350.74 KB
skyredwang’s picture

Status: Needs review » Reviewed & tested by the community

This is a one-line change, and it looks right.

  • 7478646 committed on 8.x-1.x
    Issue #2992499 by caseylau: Can't translate "group content type"
    
kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

This makes total sense, thanks!

  • caseylau authored 616e148 on 8.x-1.x
    Issue #2992499 by caseylau: Random minor fix to provide author credit....

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.