- First commit to issue fork.
- Merge request !251Issue #3257756: [pp-1] Content type names are not being translated in /group/GID/node/create → (Open) created by akalam
When you access to /group/GID/node/create in order to create a content related with a group, the content type will be always shown in the language that was used when cleared the cache the last time.
There is already an issue for this https://www.drupal.org/project/drupal/issues/3038717 🐛 Block/menu/views derivative labels are always shown in the first language they are view in after cache rebuild Needs work . What we have to do is to use the TranslatableEntityLabelMarkup new class provided in this issue instead of using the name Content Type name coming from the entity's label method.
Add the Spanish language in Drupal
Translate the Basic Page content type name to the new language ("Página" in this case)
Configure a group type to be able to have nodes of type Basic Page
Create a group of this type
Go to /en/group/GID/node/create and check that the item name is "Group node (Basic Page)"
Go to /es/group/GID/node/create and check that the item name is "Group node (Page) " when it should be "Group node (Página)"
Go to /es/admin and clear the Drupal cache (ensuring you are in the Spanish administration interface)
Go to /en/group/GID/node/create and check that the item name is "Group node (Página)" when it should be "Group node (Basic Page)"
Go to /es/group/GID/node/create and check that the item name is "Group node (Página) "
Use the TranslatableEntityLabelMarkup when building the plugin label in the \Drupal\gnode\Plugin\GroupContentEnabler\GroupNodeDeriver
Active
1.4
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.